Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- half Grayscale(half3 c)
- {
- return dot(c, half3(0.22, 0.707, 0.071));
- }
- half3 Saturation(half3 c, half saturation)
- {
- half gray = Grayscale(c.rgb);
- c = lerp(fixed3(gray, gray, gray), c.rgb, saturation);
- return saturate(c);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement