adjust shaders

This commit is contained in:
nek0 2022-12-03 08:41:13 +01:00
parent 1107ea91da
commit 45d180484f
3 changed files with 9 additions and 9 deletions

View file

@ -2,9 +2,9 @@
layout (location = 0) in vec3 vPosition;
layout (location = 1) in vec3 vNormal;
layout (location = 2) in vec3 vColor;
layout (location = 2) in vec4 vColor;
layout (location = 0) out vec3 outColor;
layout (location = 0) out vec4 outColor;
void main()
{

View file

@ -1,9 +1,9 @@
#version 450
layout(location = 0) in vec3 fragColor;
layout(location = 0) in vec4 fragColor;
layout(location = 0) out vec4 outColor;
void main() {
outColor = vec4(fragColor, 1.0);
outColor = fragColor;
}

View file

@ -1,6 +1,6 @@
#version 450
layout(location = 0) out vec3 fragColor;
layout(location = 0) out vec4 fragColor;
vec2 positions[3] = vec2[](
vec2(0.0, -0.5),
@ -8,10 +8,10 @@ vec2 positions[3] = vec2[](
vec2(-0.5, 0.5)
);
vec3 colors[3] = vec3[](
vec3(1.0, 0.0, 0.0),
vec3(0.0, 1.0, 0.0),
vec3(0.0, 0.0, 1.0)
vec4 colors[3] = vec4[](
vec4(1.0, 0.0, 0.0, 1.0),
vec4(0.0, 1.0, 0.0, 1.0),
vec4(0.0, 0.0, 1.0, 1.0)
);
void main() {