Created
July 14, 2020 11:48
-
-
Save arifd/96ebfb53aff2de600358e11df8e0eda7 to your computer and use it in GitHub Desktop.
Overlay a gradient to every pixel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adds a cinematic sheen by overlaying a glossy radial gradient to every pixel | |
float gloss(vec2 uv) { | |
uv = abs(uv - 0.5); | |
float length2 = dot(uv,uv); | |
return exp(-length2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment