1
我的应用程序返回的错误:编译错误
Fragment shader failed to compile with the following errors:
ERROR: 0:5: error(#132) Syntax error: 'out' parse error
ERROR: error(#273) 1 compilation errors. No code generated
每当我执行下面的代码:
fragment.fs
#version 330
in vec4 color
out vec4 fragColor;
void main() {
fragColor = color;
}
vertex.vs
#version 330
layout (location = 0) in vec3 position;
out vec4 color;
uniform float uniformFloat;
void main() {
color = vec4(clamp(position, 0.0, 1.0), 1.0);
gl_Position = vec4(position, 1.0);
}
我该如何解决这个问题?
是的!不能相信我错过了!谢谢,我是GLSL编程新手。 – Jadd23