优化shader性能

This commit is contained in:
ALIENJACK\alien 2024-09-13 14:24:18 +08:00
parent e4bbc5eee1
commit fea833734d

View File

@ -138,10 +138,8 @@
float waveCol2 = waveColor(uv, waveHeight2, maxHeight2, frequency2, power2);
float3 col = bg;
if (uv.y < waveHeight1)
col = waveCol1 * col;
if (uv.y < waveHeight2)
col = waveCol2 * col;
col = lerp(col, waveCol1 * col, step(uv.y, waveHeight1));
col = lerp(col, waveCol2 * col, step(uv.y, waveHeight2));
// Output to screen
fixed4 fragColor = float4(col,1.0);