不使用基于推送常量的顶点属性
Not using vertex attributes based on push constants
我有一个 GLSL 顶点着色器,其中一个属性仅在设置了推送常量时才使用:
layout(location = 0) in ivec2 a_pos;
layout(location = 1) in ivec2 a_nrm;
layout(location = 2) in float a_Height;
void main()
{
<...>
float Offset = ( u_enabling_flag > 0.0 ) ? a_Height : 0.0;
< some calculation involving Offset >
我收到以下验证错误:
vkDebug:验证:0:验证错误:[UNASSIGNED-CoreValidation-Shader-InputNotProduced] 对象 0:句柄 = 0x3a000000003a,类型 = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x23e43bb7 |顶点着色器消耗位置 2 处的输入但未提供
图形输出看起来不错,但是否有可能消除错误?
此致。
The graphical output looks fine but is there a possibility to get rid of the error?
"Vertex shader consumes input at location 2 but not provided"
从着色器中删除位置 2 的输入,或在该位置附加缓冲区绑定。
我有一个 GLSL 顶点着色器,其中一个属性仅在设置了推送常量时才使用:
layout(location = 0) in ivec2 a_pos;
layout(location = 1) in ivec2 a_nrm;
layout(location = 2) in float a_Height;
void main()
{
<...>
float Offset = ( u_enabling_flag > 0.0 ) ? a_Height : 0.0;
< some calculation involving Offset >
我收到以下验证错误:
vkDebug:验证:0:验证错误:[UNASSIGNED-CoreValidation-Shader-InputNotProduced] 对象 0:句柄 = 0x3a000000003a,类型 = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x23e43bb7 |顶点着色器消耗位置 2 处的输入但未提供
图形输出看起来不错,但是否有可能消除错误?
此致。
The graphical output looks fine but is there a possibility to get rid of the error?
"Vertex shader consumes input at location 2 but not provided"
从着色器中删除位置 2 的输入,或在该位置附加缓冲区绑定。