Hacker News new | past | comments | ask | show | jobs | submit login

In a project a while back we had a problem with too many potential shader variations which needed to be precompiled because there was no way of determining which variants were actually used in advance. I think it was well past the 20k mark. Through some clever sharing of feature bits and using flags in the uniform buffer we managed to get it down to 4096, though I suspect we could have gone further and just used a big uber shader since the shader logic wasn't really that complicated compared to a current gen PBR-heavy game.

And on top of that you need to add in all the other fixed function states like blending, pixel formats, etc. Unless you can make use of dynamic states.

It's definitely a mind boggling problem for sure... one which needs collaboration between the technical artists and whoever is working on the renderer (unless you are using unreal/unity/godot, in which case its all on the artist).




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: