Teorically it could be done, you have to detect the usage of a specific material, then on a geometry shader generate the new geometry using the original material plane as a reference for the position.
Is doable but not easy.

(06-17-2016, 03:33 AM)Tino Wrote: [ -> ]Teorically it could be done, you have to detect the usage of a specific material, then on a geometry shader generate the new geometry using the original material plane as a reference for the position.
Is doable but not easy. 
Not easy is scary. XDÂ
Though I had my suspensions. Honestly I thought it would be something you would have to hack in specific games, so it's somewhat better than I expected. Knowing more than one game could benefit from it is a relief.
updated latest folder with a new version. Added the ability to generate a shader usage database.
this database will store usage data for all the shaders, with this info users will be able to, once the databace is generated, precompile the shaders on startup, reducing even more stutering and what is best you can share the database with other users to allow them to play without shader issues.
2 new options added to the ui, shader profiling and shader compilation on startup.
when enabled, shader profiling will register shader usage to the databases.
shader compilation on startup will allow precompilation of the shaders on game boot time.
Added a start version of the databases (I dont have many games) and i hope that people with more games will share their databases to allow a better game experience to everyone.
testing and feedback are welcome. be warned that on dx9 in some games precompilation can take up to 20 minutes the first time, dx11 and 12 up to 1 minute. After that loading time will be normal.
the other good news is that database is available for opengl so ogl user can have stutter free gameplay now.
please share your databases i will make a tool later to join them and share them on new versions.
This is really cool. Nice work.
@Helios: Thanks to you all guys recent changes in master are making my life a lot easy and dolphin a lot better

.
hope this can get to master as is usefull even with no async shader compilation. hope they merge phire changes soon so this can be applicable.
Wow, Tino is always good for a nice surprise

I guess Ishiiruka doesn't even need this so much but maybe it'll get into master at some point.
However, do these shader files even carry over to future builds? It wouldn't be very helpful if one needed new ones for every new build...
database files, can stay as long as the uid structure does not change, so even if shader generator code changes as long as uid is the same the database will be valid, and even in that case you can always create a migration app to allow reuse of old databases.
Sorry for n00b-question, but what is the uid and when does it change? Only when there are changes in Dolphin that directly affect shaders?
EDIT: So now I just played a bit of Mario Kart Wii with that Shader Usage Profiling option enabled. Is Idx12-RMCE01-pso.cache in the Cache->Shader folder now the file that should be uploaded?
Also, would I have to play through the whole game to get a 'complete' shader profile?
What I find weird: Apart from said file there are also five IDX11-RMCE01 files in the folder (I deleted all shader files before playing), and one of them is even 5.6 MB, even though I only used DX12...
Hey Tino,
We're going to merge
https://github.com/dolphin-emu/dolphin/pull/3905 soon-ish (in all likelihood). Could you make sure that your Ishiiruka builds are considered as a separate "distributor" from our official builds by setting the DOLPHIN_DISTRIBUTOR environment variable to something like "Ishiiruka" on the machine you use to build Dolphin?
Thanks!
(06-19-2016, 07:43 AM)StripTheSoul Wrote: [ -> ]Sorry for n00b-question, but what is the uid and when does it change? Only when there are changes in Dolphin that directly affect shaders?
EDIT: So now I just played a bit of Mario Kart Wii with that Shader Usage Profiling option enabled. Is Idx12-RMCE01-pso.cache in the Cache->Shader folder now the file that should be uploaded?
Also, would I have to play through the whole game to get a 'complete' shader profile?
What I find weird: Apart from said file there are also five IDX11-RMCE01 files in the folder (I deleted all shader files before playing), and one of them is even 5.6 MB, even though I only used DX12...
Inside the same folder the executable is located there are 4 files ishiiruka.ps.usage ishiiruka.vs.usage ishiiruka.gs.usage and ishiiruka.ts.usage those files are the database for dx11 and dx12. The files you were looking at are the bytecode cache filles.