git-svn-id: svn://db.shs.com.ru/libs@655 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-12-06 10:13:41 +00:00
parent d5eaa289b2
commit edfe165f90
3 changed files with 10 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
// vert //
void main(void) {
qgl_FragTexture = qgl_Texture;
gl_Position = qgl_ftransform();
}
@@ -11,9 +12,10 @@ uniform sampler2D fb_out, fb_hover, fb_select;
void main(void) {
ivec2 tc = ivec2(gl_FragCoord.xy);
vec2 stc = qgl_FragTexture.xy;
vec4 src = texelFetch(fb_out , tc, 0);
vec4 hov = texelFetch(fb_hover , tc, 0);
vec4 sel = texelFetch(fb_select, tc, 0);
vec4 hov = texture(fb_hover , stc);
vec4 sel = texture(fb_select, stc);
src.rgb = mix(src.rgb, sel.rgb, sel.a);
src.rgb = mix(src.rgb, hov.rgb, hov.a * 0.667f);
//src.rgb = src.rgb + (sel.rgb*sel.a);