Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uniform vec4 color;
- uniform vec2 center;
- uniform float radius;
- uniform sampler2D texture;
- void main()
- {
- vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);
- float difference = distance(vec2(gl_FragCoord), center) / radius;
- float alpha = 1.0 - difference;
- vec4 light = vec4(color.x, color.y, color.z, alpha);
- vec4 col = pixel + light;
- gl_FragColor = vec4(col.xyz, alpha);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement