Fix shader compile

This commit is contained in:
luboslenco
2019-11-11 22:22:41 +01:00
parent 497f078037
commit 3fe5478454
2 changed files with 14 additions and 14 deletions
+5 -9
View File
@@ -1,12 +1,8 @@
#version 330
in vec3 pos;
in vec2 tex;
in vec4 col;
uniform mat4 projectionMatrix;
out vec2 texCoord;
out vec4 color;
uniform sampler2D tex;
in vec2 texCoord;
in vec4 color;
out vec4 FragColor;
void main() {
gl_Position = projectionMatrix * vec4(pos, 1.0);
texCoord = tex;
color = col;
FragColor = textureLod(tex, texCoord, 0) * color;
}
+9 -5
View File
@@ -1,8 +1,12 @@
#version 330
uniform sampler2D tex;
in vec2 texCoord;
in vec4 color;
out vec4 FragColor;
in vec3 pos;
in vec2 tex;
in vec4 col;
uniform mat4 projectionMatrix;
out vec2 texCoord;
out vec4 color;
void main() {
FragColor = textureLod(tex, texCoord, 0) * color;
gl_Position = projectionMatrix * vec4(pos, 1.0);
texCoord = tex;
color = col;
}