From f6a0e340bc82cb5fb96f836686bd59aaffd5db97 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Mon, 23 Sep 2019 22:14:13 -0400 Subject: Fixed text rendering --- Shaders/ui.frag | 8 +++++++- Shaders/ui.vert | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'Shaders') diff --git a/Shaders/ui.frag b/Shaders/ui.frag index 118108c..63e7eb0 100644 --- a/Shaders/ui.frag +++ b/Shaders/ui.frag @@ -1,5 +1,11 @@ #version 130 +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + uniform sampler2D sampler; in vec2 texCoord; @@ -12,5 +18,5 @@ void main(){ //TODO allow antialiasing //if (pixelColor.w != 1.0f) // discard; - FragColor = pixelColor * color; + FragColor = pixelColor.r * color; } diff --git a/Shaders/ui.vert b/Shaders/ui.vert index ee4f92c..d2e3902 100644 --- a/Shaders/ui.vert +++ b/Shaders/ui.vert @@ -12,8 +12,8 @@ out vec4 color; void main(){ texCoord = tex_coord; - color = vec4(1.0, 1.0, 1.0, 1.0); + color = vec4(0.0f, 0.0f, 0.0f, 1.0f); //color = tex_color; - //gl_Position = ortho * vec4(coord2d.xyz, 1.0); - gl_Position = projection * view * model * vec4(coord2d, 1.0f); + //gl_Position = ortho * vec4(coord2d.xyz, 1.0f); + gl_Position = projection * view * model * vec4(coord2d.xyz, 1.0f); } -- cgit v1.2.3