Skip to content

Instantly share code, notes, and snippets.

@arifd
Created July 14, 2020 11:48
Show Gist options
  • Save arifd/96ebfb53aff2de600358e11df8e0eda7 to your computer and use it in GitHub Desktop.
Save arifd/96ebfb53aff2de600358e11df8e0eda7 to your computer and use it in GitHub Desktop.
Overlay a gradient to every pixel
// 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