version 1.2.0

fixed framebuffer size feature
This commit is contained in:
2023-05-17 15:58:39 +03:00
parent 484a7f972f
commit 292f68a574
15 changed files with 73 additions and 23 deletions

15
shaders/rescale.glsl Normal file
View File

@@ -0,0 +1,15 @@
// vert //
void main(void) {
qgl_FragTexture = qgl_Texture;
gl_Position = qgl_ftransform();
}
// frag //
uniform sampler2D tex_0;
void main(void) {
qgl_FragColor = texture(tex_0, qgl_FragTexture.xy);
}

View File

@@ -11,9 +11,10 @@ void main(void) {
uniform sampler2D fb_out, fb_hover, fb_select;
void main(void) {
ivec2 tc = ivec2(gl_FragCoord.xy);
//ivec2 tc = ivec2(gl_FragCoord.xy);
//vec4 src = texelFetch(fb_out , tc, 0);
vec2 stc = qgl_FragTexture.xy;
vec4 src = texelFetch(fb_out , tc, 0);
vec4 src = texture(fb_out , stc);
vec4 hov = texture(fb_hover , stc);
vec4 sel = texture(fb_select, stc);
src.rgb = clamp(src.rgb, vec3(0), vec3(1));