Refactor text rendering
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec4 gColor;
|
||||
in vec2 gTex;
|
||||
in vec2 gTexCoord;
|
||||
|
||||
uniform sampler2D aTexture;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = texture(aTexture, gTex) * gColor;
|
||||
FragColor = texture(aTexture, vec2 (gTexCoord.x * 0.0078125, gTexCoord.y)) * gColor;
|
||||
// FragColor = texture(aTexture, vTexCoord);
|
||||
// FragColor = gColor;
|
||||
// FragColor = vec4 (1,1,1,1);
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#version 430 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec4 aColor;
|
||||
layout (location = 2) in vec3 aTexCoord;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
|
||||
uniform mat4 worldMat;
|
||||
|
||||
out vec4 vColor;
|
||||
out vec3 vTexCoord;
|
||||
out vec4 gColor;
|
||||
out vec2 gTexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(aPos, 1.0);
|
||||
vColor = aColor;
|
||||
vTexCoord = aTexCoord;
|
||||
gColor = aColor;
|
||||
gTexCoord = aTexCoord;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user