我刚写了这个着色器,它没有编译,我已经搜索了几个小时,甚至检查了验证器,我找不到编译错误是什么。这是我最后的手段,有人能发现这里有什么问题吗?
#version 150 core
uniform sampler2D texture1;
in vec4 pass_Color;
in vec2 pass_TextureCoord;
in vec2 pass_Velocity;
out vec4 out_Color;
void main(void) {
out_Color = pass_Color;
vec4 color = texture(texture1, pass_TextureCoord) * pass_Color ;
pass_TextureCoord += pass_Velocity;
for(int i = 1; i < 6; ++i, pass_TextureCoord += pass_Velocity)
{
vec4 currentColor = texture(texture1, pass_TextureCoord) * pass_Color ;
color += currentColor;
}
out_Color = (color / 6.0f);
}