使用glslc --targe-env="vulkan1.1" -fentry-point="mainColor" test.frag
时出现错误
test.frag: error: Linking fragment stage: Missing entry point: Each stage requires one entry point
test.frag 内容:
#version 450
layout (location=0) in vec4 color;
layout (location=0) out vec4 fragColor;
void mainColor()
{
fragColor = color;
}
void mainWhite()
{
fragColor = vec4(1, 1, 1, 1);
}
我究竟做错了什么 ?
如何修复此编译错误?