1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#version 330 core in vec2 fragTexCoord; // from raylib uniform sampler2D texture0; // from raylib uniform vec2 target; uniform float dimness; uniform float radius; out vec4 color; void main() { color = mix (texture (texture0, fragTexCoord), vec4(0), length (target - gl_FragCoord.xy) < radius ? 0.0 : dimness); }