18 lines
378 B
GLSL
18 lines
378 B
GLSL
#version 330
|
|
|
|
uniform sampler2D tex0;
|
|
uniform sampler2D tex1;
|
|
uniform float zoom;
|
|
|
|
in vec2 vsoTexCoord;
|
|
out vec4 fragColor;
|
|
|
|
void main() {
|
|
vec2 center = vec2(0.5);
|
|
vec2 zoomedTexCoord = mix(center, vsoTexCoord, zoom);
|
|
|
|
vec4 color1 = texture(tex0, vsoTexCoord);
|
|
vec4 color2 = texture(tex1, zoomedTexCoord);
|
|
|
|
fragColor = mix(color1, color2, smoothstep(0., 1., zoom));
|
|
}
|