ugui.c3l/text_rendering/font_fragshader.glsl

19 lines
390 B
Plaintext
Raw Normal View History

2023-02-22 21:39:29 +01:00
#version 330 core
2023-02-21 22:05:28 +01:00
// viewsize.x = viewport width in pixels; viewsize.y = viewport height in pixels
2023-02-22 21:39:29 +01:00
uniform ivec2 viewsize;
uniform ivec2 texturesize;
2023-02-21 22:05:28 +01:00
2023-02-22 21:39:29 +01:00
// texture uv coordinate in texture space
in vec2 uv;
2023-02-23 23:39:34 +01:00
uniform sampler2DRect ts;
const vec3 textcolor = vec3(1.0, 1.0, 1.0);
2023-02-21 22:05:28 +01:00
void main()
{
2023-02-22 21:39:29 +01:00
//gl_FragColor = vec4(1.0f,0.0f,0.0f,1.0f);
2023-02-23 23:39:34 +01:00
gl_FragColor = vec4(textcolor, texture(ts, uv));
2023-02-21 22:05:28 +01:00
}