I’m suprised to see that Ubershaders still exist, most game engines have settled on a set of fit-for-purpose custom shaders with almost no conditionals (for performance reasons), which is the opposite of UberShaders.
Why would a lack of conditionals remove the need for uber shaders..? Or why would the presence of conditionals cause a need for uber shaders? How are these connected?
It's common to have many shader variants exactly because you want to avoid 'if' statements; conditionals are turned into shader-compile-time options. Uber shaders are about turning those compile-time options back into runtime options to have a fallback shader to run while the right shader variant is being compiled.
It's common to have many shader variants exactly because you want to avoid 'if' statements; conditionals are turned into shader-compile-time options. Uber shaders are about turning those compile-time options back into runtime options to have a fallback shader to run while the right shader variant is being compiled.