Skip to content

Commit 68585f1

Browse files
committed
The Text Game Object now supports rendering in Light2d, no matter which font, stroke or style it is using.
1 parent 76de5c2 commit 68585f1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/gameobjects/text/static/TextWebGLRenderer.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera
3232
var width = frame.width;
3333
var height = frame.height;
3434
var getTint = Utils.getTintAppendFloatAlpha;
35+
var pipeline = this.pipeline;
3536

36-
this.pipeline.batchTexture(
37+
var textureUnit = pipeline.setTexture2D(frame.glTexture, src);
38+
39+
pipeline.batchTexture(
3740
src,
3841
frame.glTexture,
3942
width, height,
@@ -52,7 +55,9 @@ var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera
5255
(src._isTinted && src.tintFill),
5356
0, 0,
5457
camera,
55-
parentMatrix
58+
parentMatrix,
59+
false,
60+
textureUnit
5661
);
5762
};
5863

0 commit comments

Comments
 (0)