Przeglądaj źródła

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

trethaller 6 lat temu
rodzic
commit
559109122f
1 zmienionych plików z 1 dodań i 1 usunięć
  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);
 		updateParticles(dt);
 
 
 		if( full && batch != null ) {
 		if( full && batch != null ) {
-			batch.begin(maxCount);
+			batch.begin(hxd.Math.nextPOT(maxCount));
 			if( particleVisibility ) {
 			if( particleVisibility ) {
 				camPosTmp = getScene().camera.pos;
 				camPosTmp = getScene().camera.pos;
 				instances.sort(sortZ);
 				instances.sort(sortZ);