Explorar el Código

Fix texture dce issue on RelativeTransformSimulation.hx if there's no curve.

clementlandrin hace 2 meses
padre
commit
f10c737892
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      hrt/prefab/fx/gpuemitter/RelativeTransformSimulation.hx

+ 4 - 1
hrt/prefab/fx/gpuemitter/RelativeTransformSimulation.hx

@@ -37,7 +37,10 @@ class RelativeTransformSimulationShader extends ComputeUtils {
 		}
 
 		function getCurve(n : Int) : Float {
-			return curveTexture.getLod(vec2(life / lifeTime, (n + 0.5) / 9.0), 0.0).r;
+			var c = 0.0;
+			if ( CURVE_MASK != 0 )
+				c = curveTexture.getLod(vec2(life / lifeTime, (n + 0.5) / 9.0), 0.0).r;
+			return c;
 		}
 
 		function main() {