Feature List

  • Floor reflection shader that seems like planar mirror reflection.
  • UV based fake depth fade of reflection added.

Source code here

Click to go Git-hub

Code Snippet below

float node_8816 = (sceneUVs.r+_ReflectionCoordinater);
                float2 node_2055 = (float2(sceneUVs.r,sceneUVs.g)+(float2(node_8816,node_8816)*(float2(_normal_var.r,_normal_var.g)*_NormalJitter)));
                half4 _ReflectionTex_var = tex2D(_ReflectionTex,node_2055);
                fixed3 FlatMirror = ((_ReflectionTex_var.rgb+(pow((1.0 - lerp( _ReflectionTex_var.rgb.g, _ReflectionTex_var.rgb.r, _ChannelSwap )),exp2(_ReflectionBrightSubScale))*_ReflectionBrightSubScale))*_ReflectionsIntensity);
                half Fresnel = dot(pow(1.0-max(0,dot(normalDirection, viewDirection)),exp2((1.0 - _ReflectionFresnel))),lightDirection);
                float3 node_9903 = (FlatMirror*Fresnel);
                half3 FlatMirrorBlended = saturate(max(_MainTex_var.rgb,node_9903));
                half3 node_9232 = FlatMirrorBlended;
                half3 Albedo = _MainTex_var.rgb;
                float node_6753 = (i.uv0.g+(_ReflectionFadeOffset*0.5+0.0)).r;
                half3 FlatMirrorFade = lerp(node_9232,Albedo,node_6753);
                float3 diffuseColor = FlatMirrorFade;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s