Reputation: 442
I'm quite new to Vulkan and I try to understand the descriptor set feature.
For a given shader, I would like to bind my uniforms separately at different steps during rendering :
per subpass binding (ex: camera stuff)
per material binding (ex: texture stuff)
per object binding (ex: gameplay instance stuff)
But I would like to do automatic grouping of uniforms by 'set' (I don't want the user to be forced to know what variable should go in which set).
Is it possible to create multiple Descriptor sets without explicitely marking the uniforms in the GLSL shader with "set = X"? Can we do this "grouping" manually with the Vulkan API?
Upvotes: 3
Views: 842
Reputation: 474226
Is it possible to create multiple Descriptor sets without explicitely marking the uniforms in the GLSL shader with "set = X" ?
Not unless you hack the shader code itself before giving it to Vulkan. As an explicit API, Vulkan expects all contributors to its data to know what's going on. So if you don't want your users to know what's going on, then you need to modify their shaders before sending them along to Vulkan.
Upvotes: 4