@@ -276,6 +276,12 @@ 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
+
279
285
if ( ! this . _meshInfo [ i ] ) {
280
286
this . _meshInfo [ i ] = new MeshInfo ( ) ;
281
287
} else {
@@ -286,21 +292,10 @@ Object.assign(pc, function () {
286
292
mi . setParameter ( "font_pxrange" , this . _getPxRange ( this . _font ) ) ;
287
293
mi . setParameter ( "font_textureWidth" , this . _font . data . info . maps [ ti ] . width ) ;
288
294
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
- }
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 ) ;
296
297
}
297
298
}
298
-
299
- if ( multiPassNeeded ) {
300
- this . _meshInfo [ i ] . renderPass = passes [ p ] ;
301
- } else {
302
- this . _meshInfo [ i ] . renderPass = RenderPass . ALL_IN_ONE ;
303
- }
304
299
}
305
300
306
301
// destroy any excess mesh instances
0 commit comments