Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by slaymaker1907 on Sunday July 30, 2017 @12:46PM
(#14886741)
Why not take a profiling approach and cache the configurations rather than the compiled shader? You could then compile them on startup. By caching the configurations, you could then share this data between hosts and don't have to invalidate them as often.
[ Parent
| on HN ]
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by GavinMcG on Sunday July 30, 2017 @12:53PM
(#14886773)
I don't know much about this topic. Is what you're suggesting distinct from the approach they addressed in the "Sharing Shaders" section?
https://dolphin-emu.org/blog/2017/07/30/ubershaders/#sharing...
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by DougBTX on Sunday July 30, 2017 @01:31PM
(#14886945)
Each configuration has a Unique ID, and they discuss building up a list of all the required UIDs beforehand:
> Users refer to this as "sharing shaders" and in theory if users shared UID files, they could compile shaders ahead of time and not encounter stuttering.
They list a few reasons why they didn't go for this, but the tl;dr is that it is hard to build a complete list, so many users in many games would still see stuttering.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by ZenoArrow on Sunday July 30, 2017 @02:33PM
(#14887185)
It still seems like a good supplementary approach to the ubershader hybrid mode. Perhaps it'll be an idea that gets revisited at a later date, after the speed of changes to the graphics emulation code have slowed down.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by rasz on Sunday July 30, 2017 @06:25PM
(#14888183)
this is kind of BS, all it takes is one cheap shared hosted server collecting shaders from users(upload every time you check for new version/once a day), you would build 95% complete list in couple of months.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by ketralnis on Sunday July 30, 2017 @08:14PM
(#14888646)
Awesome, go build it and prove them wrong
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by vvanders on Sunday July 30, 2017 @08:06PM
(#14888610)
Except that formats change between driver versions, among other things. I know of few games that aggregate their shaders, most just generate them during loading. There's a good chance you'd uncover some amusing bugs.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by rasz on Sunday July 30, 2017 @10:27PM
(#14889098)
we are talking about caching TEV configuration, not compiled shaders.
They were against this solution for ~3 years, how much coverage would they get in 3 years of users uploading missing Unique ID" objects?
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by Tarean on Monday July 31, 2017 @07:30AM
(#14890973)
The UID's are a dolphin invention, though, on the hardware level there are just a bunch of registers set. So either you store a complete dump of the cpu state for each shader configuration or you invalidate all shared shaders when dolphin internals change.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by vvanders on Monday July 31, 2017 @12:26AM
(#14889450)
At the end of the day you still have to compile the shader though. A shader cache is the only way around that.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by mort96 on Monday July 31, 2017 @04:28AM
(#14890320)
Yes, and the parent comments are talking about a way to make it possible to compile all the shaders on startup instead of in the middle of the game. Longer loading times > stuttering.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by shitlord on Sunday July 30, 2017 @06:53PM
(#14888301)
Citation needed
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by quadcore on Sunday July 30, 2017 @02:18PM
(#14887121)
What I did was using two modes: in development mode, the shaders would be (re)compiled on the fly (causing some latency), and stored in a bank. In release mode, the shader-bank is used, and a shader compilation would be done if a shader wasnt found - supposedly rarely.
As far as I can tell it worked pretty well.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by specialist on Sunday July 30, 2017 @01:01PM
(#14886815)
Could they use the "cut scenes" (?) to prime the shader cache(s)?
I mean those bits of animation between levels. I understood that many animations are scripted, vs movie recordings.
Apologies if I'm using the wrong words. I don't play many games.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by zeta0134 on Sunday July 30, 2017 @03:14PM
(#14887357)
In a traditional game this is exactly how it's done. Dolphin is a bit different though, because it's an emulator. It is aware that a game is using the GPU, but isn't aware of the inner workings of each game's logic. Dolphin doesn't know the difference between a cutscene, gameplay, a pre-rendered movie, or a credits sequence. Because of this, it has to be written in a more general manner, so that a game running inside of it can ask it to do anything a Gamecube or Wii would be able to do, and still come up with the right result.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by sly010 on Sunday July 30, 2017 @01:27PM
(#14886926)
This is an emulator. I assume they don't have the option of modifying the games to include high level optimizations like that.
Re:Ubershaders: A Ridiculous Solution to an Impossible Problem
by throwmeaway32 on Sunday July 30, 2017 @04:48PM
(#14887740)
Cut scene might have different shaders than in game, generally cut scenes are far more controlled and so might have higher quality shaders than in actual levels. And also that solution would only work in games with cut scenes and you would have to assume so cut scenes occur before the levels with the needed shaders in. So it would end up being a very brittle solution.