Re:Ubershaders: A Ridiculous Solution to an Impossible Probl...
by naikrovek on Friday May 17, 2024 @10:51PM
(#40396161)
I don’t get it (this is not your fault, it’s mine) but I believe you.
Re:Ubershaders: A Ridiculous Solution to an Impossible Probl...
by rkachowski on Saturday May 18, 2024 @04:02AM
(#40397238)
if I understand correctly
1. "shader" is just a metaphor, the actual code running on the gamecube gpu is a custom pipeline that has a dynamic structure and is updated aggressively throughout the lifetime of the app - there is no static "shader" program to run on the host GPU.
2. The architectures of the gamecube and modern GPUs are so distinct as to require an intricate translation layer in order to map gamecube rendering operations to first class shader operations on a modern GPU. This very process causes the stuttering that starts the issue.
Many games actually dynamically generate new "shaders" on the fly, based on which lights are near an object, and in which order.
Second we can't use those vertex/pixel pipeline states directly on modern GPU, they need to be translated into modern shaders, and then compiled by the driver for your graphics card. It's actually that compile step which causes the stuttering, dolphin's translation is plenty fast enough.
The combination of these two facts means Dolphin can't depend on any pre-computation at all.