DescriptorSet Update Binding Point

Hi, is it possible to tell a DescriptorSet that for a texture2D binding point there is currently no image available?
The shader gets a uniform bool flag whether it can savely use or not use a texture.
Some of the objects I have to render simply dont have any textures attached to them and instead use a default color.

You could just not change the texture at all. Just set the UBO or push-constant and move on.

But you are allowed to set descriptors to NULL if they are not going to be used by a particular shader.

I have one shader program for all objects. Just some objects dont have all textures (albedo/normals/etc) set that can be used by the shader and rather use a default color or something like that.
So the shader does not really require set texture uniforms since it checks a bool beforehand.
Vulkan on the other hand always demands valid data for the texture uniforms, no matter whether they are used or not.
Is there a way to tell Vulkan that a specific uniform is just “optional” in that sense?
Or do I need to use a “placeholder” aka 1x1px transparent picture(-buffer) for that?

[QUOTE=Habor1;42500]Vulkan on the other hand always demands valid data for the texture uniforms, no matter whether they are used or not.
Is there a way to tell Vulkan that a specific uniform is just “optional” in that sense? [/quote]

Vulkan does not have “uniforms”; it has descriptors. And I was wrong earlier; you cannot set them to “NULL”. From the specification:

All entries [of a bound descriptor set] that are statically used by a pipeline in a drawing or dispatching command must have been populated before the descriptor set is bound for use by that command.

Your texture is statically used, and therefore it must have been populated by a legitimate texture value. So you’ll have to either change shaders or use a dummy texture.

Of course but you know what I meant. :wink:

Thank you for your support and clarification!