Pārlūkot izejas kodu

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

clementlandrin 2 mēneši atpakaļ
vecāks
revīzija
f10c737892

+ 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() {