瀏覽代碼

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

trethaller 6 年之前
父節點
當前提交
559109122f
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);