我的应用程序返回错误:
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
Run Code Online (Sandbox Code Playgroud)
每当我执行以下代码时:
fragment.fs
#version 330
in vec4 color
out vec4 fragColor;
void main() {
fragColor = color;
}
Run Code Online (Sandbox Code Playgroud)
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);
}
Run Code Online (Sandbox Code Playgroud)
我怎么能解决这个问题?
| 归档时间: |
|
| 查看次数: |
1104 次 |
| 最近记录: |