Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //RadialBlur
- #ifdef RADIALBLUR_ON
- current_step += direction * _ds * dstf; //ds is blur range/distance (0,1)
- #else
- #endif
- //Vignette
- float OuterVig = 1.0; // Position for the Outer vignette
- float InnerVig = 0.05; // Position for the inner Vignette Ring
- float4 color = tex2D(_CGrabPass, uv);
- float2 center = float2(0.5,.5); // Center of Screen
- float dist = distance(center,uv )*1.414213; // Distance between center and the current Uv. Multiplyed by 1.414213 to fit in the range of 0.0 to 1.0
- float vig = clamp((OuterVig-dist) / (OuterVig-InnerVig),0.0,1.0); // Generate the Vignette with Clamp which go from outer Viggnet ring to inner vignette ring with smooth steps
- color *= vig; // Multiply the Vignette with the texture color
- }
- total /= amount;
- float vig = total;
- float gray = total.g * 0.6 + total.r * 0.3 + total.b * 0.1;
- float3(gray, gray, gray);
- #ifdef GRAYSCALE_ON
- total = lerp(total, gray.xxx, dstf * _gsvalue);
- #endif
- return float4( total, 1.0 );
- }
- }
- ENDCG
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement