Created
September 14, 2018 23:42
-
-
Save ngokevin/fc3e3a6be9d06b377cddb20bab1766ec to your computer and use it in GitHub Desktop.
fade shader
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
void main() { | |
float alpha = 1.0 - smoothstep(2.25, 3.75, length(vWorldPosition.xz)); | |
vec4 tex = texture2D(src, vUv) * vec4(color, 1.0); | |
gl_FragColor = vec4(tex.xyz, min(1.0, tex.w * alpha * opacity)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment