From 4a355deb54b48eee5432ee617d6d3916121b0816 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Wed, 11 Feb 2026 06:47:31 +0300 Subject: add sources --- res/spotlight.frag | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 res/spotlight.frag (limited to 'res/spotlight.frag') diff --git a/res/spotlight.frag b/res/spotlight.frag new file mode 100644 index 0000000..91e4d0b --- /dev/null +++ b/res/spotlight.frag @@ -0,0 +1,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); +} -- cgit v1.3