2
0
Эх сурвалжийг харах

ShaderTarget: fix shader target disabled that was still used

lviguier 7 сар өмнө
parent
commit
91ea48357a
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      hrt/prefab/fx/FX.hx

+ 4 - 1
hrt/prefab/fx/FX.hx

@@ -53,8 +53,11 @@ class FXAnimation extends h3d.scene.Object {
 		if(root == null)
 			root = def;
 
-		for (shaderTarget in def.flatten(hrt.prefab.fx.ShaderTarget))
+		for (shaderTarget in def.flatten(hrt.prefab.fx.ShaderTarget)) {
+			if (!shaderTarget.enabled)
+				continue;
 			shaderTarget.applyShaderTarget(def, shaderTarget.target);
+		}
 
 		initObjAnimations(root);
 		initEmitters(root);