This repository has been archived on 2020-09-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
libs/qglview/shaders/ssr_merge.frag

13 lines
293 B
GLSL

#version 150
uniform sampler2D t0, ts;
void main(void) {
ivec2 tc = ivec2(gl_FragCoord.xy);
vec4 v0 = texelFetch(t0, tc, 0), vs = texelFetch(ts, tc, 0);
float rad;
float coeff = modf(v0.a, rad);
qgl_FragData[0].rgb = mix(vs.rgb, v0.rgb, coeff);
//qgl_FragData[0].rgb = vec3(v0.rgb);
}