Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a really neat article because the Godot engine is adding Ubershaders as well to fix shader compilation stuttering: https://github.com/godotengine/godot/pull/90400


Pretty sure these are very different phenomena both called "ubershaders". As far as I understand it, outside of Dolphin, when people say "ubershader" they mostly mean a large material shader that has branches and constants to handle all the material variants used in one game (e.g. wood door, metal shield, shiny forcefield). It's produced by the engine so it's under full control of the engine developers. This means instead of loading separate shaders for the wood door and metal shield you can just tweak pipeline parameters. It's a work around for the various overheads, like compilation, involved in creating specialized shaders.

But Dolphin's "Ubershader" is a different beast. It's about handling all the shader variants for _all_ Dolphin games (which are made in different engines) with one shader, and the variant parameters aren't passed as nice constants (data) but as shader programs (code) that need to be interpreted to be understood. It's more like a meta-shader that takes shaders as input and produces shaders as opposed to a "normal" ubershader which takes configuration to specialize it at runtime.

I think that's right anyway. I haven't worked directly with ubershaders in either variety and my knowledge comes from building my own hobby engine and 3D pipelines.


It sounded to me like an interpreter that emulates the GameCube / Wii GPU inside a shader, but I didn't read it closely


Yup, the whole vertex and pixel stages I believe.




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

Search: