Why does unreal need to compile shaders?
I'm just curious. some times, even when just having a material with a vec3 for color and nothing else, it needs to compile tens of shaders. and seeing how other engines pull this of without any compilation time, or at least a noticeable one, i was wondering what unreal's doing and why? is it just to achieve better quality at better performance and better support for all shadermodels or just how unreal works? thanks for your time :D
When you compile a material, Unreal will create optimized low-level shaders for every usage and combination of your material, like one for static usage, dynamic lighting, instanced meshes, etc. These shaders will then be used for PIE and packaging, not directly your graph.
answered Mar 28 '19 at 08:33 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here