Browse Source

Emitter: round batch size to next POT to reduce number of shader combinations

trethaller 6 years ago
parent
commit
559109122f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hrt/prefab/fx/Emitter.hx

+ 1 - 1
hrt/prefab/fx/Emitter.hx

@@ -524,7 +524,7 @@ class EmitterObject extends h3d.scene.Object {
 		updateParticles(dt);
 
 		if( full && batch != null ) {
-			batch.begin(maxCount);
+			batch.begin(hxd.Math.nextPOT(maxCount));
 			if( particleVisibility ) {
 				camPosTmp = getScene().camera.pos;
 				instances.sort(sortZ);