Print text in OpenGl Context first implementation

This commit is contained in:
Antoine
2021-06-03 16:55:54 +02:00
parent f55bc8b2c1
commit 6a93931f68
6 changed files with 77 additions and 9 deletions

View File

@ -1,4 +1,4 @@
#version 410
#version 410 core
out vec4 FragColor;
@ -20,7 +20,7 @@ void main(){
if (tex.a == 0.0){
FragColor = tex;
} else{
FragColor = mix(tex, flash, 0.5f);
FragColor = mix(tex, flash, 0.3f);
FragColor.a = 1.0f;
}
}

View File

@ -0,0 +1,18 @@
#version 410 core
out vec4 FragColor;
in vec4 color;
in vec2 fragCoord;
in vec2 texCoord;
uniform sampler2D texture1;
void main(){
vec3 black = vec3(0.0f, 0.0f , 0.0f);
vec4 tex = texture(texture1, texCoord);
if (tex.xyz == black){
tex.a = 0.0f;
}
FragColor = tex;
}