我想在我的Vulkan渲染器中使用HLSL片段着色器。着色器讀取緩衝區:在Vulkan中使用HLSL着色器時,Buffer <float4>的正確描述符類型是什麼?
layout(set=0, binding=3) Buffer<float4> pointLightBufferCenterAndRadius : register(t1);
我不知道我應該使用哪種描述符來描述符槽。我試圖用VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
但驗證層給了我以下錯誤:
Type mismatch on descriptor slot 0.3 (used as type ptr to const uniform image(dim=5, sampled=1)) but descriptor of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
什麼是Buffer<float4>
正確的描述符類型?