imgui icon indicating copy to clipboard operation
imgui copied to clipboard

Backends: vulkan: add possibility for custom frag and vertex shaders

Open johan0A opened this issue 8 months ago • 2 comments

This is my fix I use for: https://github.com/ocornut/imgui/issues/8271

johan0A avatar Apr 22 '25 17:04 johan0A

I am tempted to accept it (maybe with VkShaderModule inputs instead? so if vkCreateShaderModule() ever adds flags that'd be in control of the user), but it seems like it would be a better general-purpose feature to make it easier to change shaders in the render loop.

ocornut avatar Apr 26 '25 13:04 ocornut

Jus to clarify I dont think this really solves https://github.com/ocornut/imgui/issues/8271 but it does offer a good workaround for it.

(maybe with VkShaderModule inputs instead? so if vkCreateShaderModule() ever adds flags that'd be in control of the user)

Or with a VkShaderModuleCreateInfo?

johan0A avatar Apr 26 '25 14:04 johan0A

Just adding my 2 cents : having custom VkShaderModuleCreateInfo fields look nice has it hosts user flags. Sharing VkShaderModule objects with main app is more complex as they shall be destroyed and responsibility of this may be unclear.

olivier-gerard avatar Sep 24 '25 10:09 olivier-gerard

I have reworked this to use VkShaderModuleCreateInfo and merged as 01686c6. Thanks both for your input!

ocornut avatar Sep 26 '25 13:09 ocornut