這是我的以下錯誤,它是GLSL中的錯誤#160。GLSL頂點着色器編譯錯誤
#version 330 core
layout (location = 0) in vec3 position;
out vec4 pos;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
void main()
{
gl_Position = projection * view * model * vec4(position, 1.0f);
pos = position;
}
這是試圖編譯此GLSL程序時創建的錯誤。
ERROR: Vertex Shader Program Compilation Failed! Vertex shader failed to compile with the following errors:
ERROR: 0:13: error(#160) Cannot convert from: "in highp 3-component vector of vec3" to: "default out highp 4-component vector of vec4"
ERROR: error(#273) 1 compilation errors. No code generated
我沒有關於調試GLSL的知識,所以如果有人能夠幫助它將非常感激。
修復編譯錯誤不是「調試」。 –