mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2025-01-06 14:33:40 +01:00
19 lines
420 B
GLSL
19 lines
420 B
GLSL
#version 430
|
|
|
|
uniform sampler2D bg;
|
|
|
|
uniform vec2 cursorPos;
|
|
uniform float hasCursor;
|
|
|
|
in vec2 fragCoord;
|
|
in vec2 fragUv;
|
|
|
|
out vec4 fragColor;
|
|
|
|
void main() {
|
|
vec2 diff = cursorPos - fragUv;
|
|
float light = clamp(.1 - (diff.x * diff.x + diff.y * diff.y), 0.0, 1.0);
|
|
|
|
vec2 zoomedUv = fragUv * .9 + (.1 / 2.0);
|
|
fragColor = mix(texture(bg, zoomedUv + (cursorPos - .5) / 10.0), vec4(1.0), light * hasCursor);
|
|
}
|