Hi! I created a scene to implement a differential rendering example in AR. Even though I achieved the desired behavior, the color of my object is rendered as completely white(saturated).
In the first picture, the cube is saturated but normally, in editor view and also left bottom corner, in render textures, object is rendered as red.
In my shader code, I combine these render layers to achieve differential rendering.
Left bottom corner indicates from left to right, c_camera, c_shadow, c_noshadow and c_mask
float4 frag (v2f_img i) : COLOR
{
float4 c_camera = tex2D(_MainTex, i.uv);
float4 c_noshadow = tex2D(_NoShadowTex, i.uv);
float4 c_shadow = tex2D(_ShadowTex, i.uv);
bool c_mask = tex2D(_MaskTexture, i.uv).a > 0.0;
float4 c_final=c_camera+(c_shadow-c_noshadow)+c_mask;
return c_final;
}
How may I fix this?
Thanks.
