testo nero

This commit is contained in:
Alessandro Mauri 2023-02-22 21:39:29 +01:00
parent e80d426872
commit 4939fd7068
No known key found for this signature in database
GPG key ID: 2B7BF9531FF03BE8
6 changed files with 90 additions and 40 deletions

View file

@ -1,14 +1,15 @@
#version 330
#version 330 core
// viewsize.x = viewport width in pixels; viewsize.y = viewport height in pixels
uniform vec2 viewsize;
// texture uv coordinate in texture space
in vec2 texture_coord;
uniform sampler2D texture_sampler;
uniform ivec2 viewsize;
uniform ivec2 texturesize;
out vec4 color;
// texture uv coordinate in texture space
in vec2 uv;
uniform sampler2D ts;
void main()
{
color = mix(vec4(0.0f,0.0f,0.0f,1.0f), vec4(1.0f,1.0f,1.0f,1.0f), texture(texture_sampler, texture_coord)) + vec4(1.0f,0.0f,0.0f,1.0f);
//gl_FragColor = vec4(1.0f,0.0f,0.0f,1.0f);
gl_FragColor = texture(ts, uv);
}