Advertisement
Guest User

Shadery03_Saturation

a guest
Mar 1st, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. half Grayscale(half3 c)
  2. {
  3.     return dot(c, half3(0.22, 0.707, 0.071));
  4. }
  5.  
  6. half3 Saturation(half3 c, half saturation)
  7. {
  8.     half gray = Grayscale(c.rgb);
  9.     c = lerp(fixed3(gray, gray, gray), c.rgb, saturation);
  10.     return saturate(c);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement