fix: UBO binding 0 visible to fragment shader — lights now work
Root cause: descriptor set layout binding 0 (SceneUBO) had stageFlags=Vertex only. Fragment shader reads numLights, lights[], shadowParams[] from UBO but couldn't access it. Changed to Vertex|Fragment.
This commit is contained in:
@@ -28,3 +28,8 @@ Pos=772,456
|
||||
Size=507,263
|
||||
Collapsed=0
|
||||
|
||||
[Window][Shadow & Light Parameters]
|
||||
Pos=-1,195
|
||||
Size=427,372
|
||||
Collapsed=0
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ internal sealed unsafe class VulkanPipeline : IDisposable
|
||||
binding = 0,
|
||||
descriptorType = VkDescriptorType.UniformBuffer,
|
||||
descriptorCount = 1,
|
||||
stageFlags = VkShaderStageFlags.Vertex,
|
||||
stageFlags = VkShaderStageFlags.Vertex | VkShaderStageFlags.Fragment,
|
||||
};
|
||||
bindings[1] = new VkDescriptorSetLayoutBinding
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user