@@ -276,12 +276,6 @@ Object.assign(pc, function () {
276
276
var ti = i % this . _font . textures [ 0 ] . length ;
277
277
var p = ( i - ti ) / this . _font . textures [ 0 ] . length ;
278
278
279
- if ( multiPassNeeded ) {
280
- this . _meshInfo [ i ] . renderPass = passes [ p ] ;
281
- } else {
282
- this . _meshInfo [ i ] . renderPass = RenderPass . ALL_IN_ONE ;
283
- }
284
-
285
279
if ( ! this . _meshInfo [ i ] ) {
286
280
this . _meshInfo [ i ] = new MeshInfo ( ) ;
287
281
} else {
@@ -292,10 +286,21 @@ Object.assign(pc, function () {
292
286
mi . setParameter ( "font_pxrange" , this . _getPxRange ( this . _font ) ) ;
293
287
mi . setParameter ( "font_textureWidth" , this . _font . data . info . maps [ ti ] . width ) ;
294
288
295
- mi . setParameter ( "render_pass" , this . _meshInfo [ i ] . renderPass ) ;
296
- this . _setTextureParams ( mi , this . _font . textures [ 0 ] [ ti ] , ( multiPassNeeded ) ? this . _font . textures [ 1 ] [ ti ] : null ) ;
289
+ if ( multiPassNeeded ) {
290
+ this . _setTextureParams ( mi , this . _font . textures [ 0 ] [ ti ] , this . _font . textures [ 1 ] [ ti ] ) ;
291
+ mi . setParameter ( "render_pass" , passes [ p ] ) ;
292
+ } else {
293
+ this . _setTextureParams ( mi , this . _font . textures [ 0 ] [ ti ] , null ) ;
294
+ mi . setParameter ( "render_pass" , RenderPass . ALL_IN_ONE ) ;
295
+ }
297
296
}
298
297
}
298
+
299
+ if ( multiPassNeeded ) {
300
+ this . _meshInfo [ i ] . renderPass = passes [ p ] ;
301
+ } else {
302
+ this . _meshInfo [ i ] . renderPass = RenderPass . ALL_IN_ONE ;
303
+ }
299
304
}
300
305
301
306
// destroy any excess mesh instances
0 commit comments