Shader compilation in bgfx #343
-
There are 3 options for shader compilation in bgfx:
Pros and cons: ============================ Anyway, I want that you also think and say which option do you like best? And what performance problems can you see in different options? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thanks for bringing this up. |
Beta Was this translation helpful? Give feedback.
-
Consider the games using this engine are often heavily modded, the more things we can update at runtime, the better. I do think that in time, it may be useful to have a caching mechanism so shaders only have to be compiled once (unless changed) to speed up startup times. But then I would also opt for a runtime caching system. |
Beta Was this translation helpful? Give feedback.
Thanks for bringing this up.
Usually games precompile shaders for release builds. In debug it's better to have them compiled at runtime to make shader development faster.
For us at this point I would prefer the runtime compilation. We can always optimize it in the future when bgfx is fully integrated.