mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-11-15 22:43:02 +01:00
22 lines
448 B
GLSL
22 lines
448 B
GLSL
#version 300 es
|
|
|
|
precision highp float;
|
|
|
|
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);
|
|
}
|
|
|