Hello everyone, i need help regarding shader
so i just wanna lerp 2 image using main texture uv.
its working in editor mode but its not working in play mode.
anybody knows something about this ?
Editor Mode
![alt text][1]
Play Mode
![alt text][2]
Fragment code is simple code like this
float4 main = tex2D(_MainTex, i.uv);
float2 tiling = _GradientTex_ST.xy;
float2 offset = _GradientTex_ST.zw;
float4 grad = tex2D(_GradientTex, i.uv * tiling + offset);
// float2 u = i.uv;
// float4 gradient = float4(i.uv.x, i.uv.x, i.uv.x, i.uv.x);
// gradient = step(_LerpValue, gradient);
// float4 color = lerp(main, 0, gradient);
return grad;
i would appreciate any help thank you so much.
[1]: /storage/temp/202180-screen-shot-2022-11-24-at-113620.png
[2]: /storage/temp/202181-screen-shot-2022-11-24-at-113429.png
↧