Print text in OpenGl Context first implementation
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
18
shaders/StylishShaders/TextFrag.glsl
Normal file
18
shaders/StylishShaders/TextFrag.glsl
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user