mirror of
https://github.com/tsoding/boomer
synced 2024-11-18 09:28:37 +00:00
18 lines
461 B
GLSL
18 lines
461 B
GLSL
#version 130
|
|
out mediump vec4 color;
|
|
in mediump vec2 texcoord;
|
|
uniform sampler2D tex;
|
|
uniform vec2 cursorPos;
|
|
uniform vec2 windowSize;
|
|
uniform float flShadow;
|
|
uniform float flRadius;
|
|
uniform float cameraScale;
|
|
|
|
void main()
|
|
{
|
|
vec4 cursor = vec4(cursorPos.x, windowSize.y - cursorPos.y, 0.0, 1.0);
|
|
color = mix(
|
|
texture(tex, texcoord), vec4(0.0, 0.0, 0.0, 0.0),
|
|
length(cursor - gl_FragCoord) < (flRadius * cameraScale) ? 0.0 : flShadow);
|
|
}
|