Game-aware shader thread
Alright, so game aware shading is mostly implemented in SNES9x-PS3. Since it might be a somewhat daunting feature to use, I chose to write up a tutorial for the (aspiring) developers of Cg shaders. It discusses features of the current spec, and game aware shading. The mario water effect is used as an example on how you can implement such a shader. Hopefully it'll be useful to someone :)
PS3 Cg Shader Tutorial PDF + Game Aware Shading Tutorial: Multiupload.com - upload your files to multiple file hosting sites!
[ame="http://www.youtube.com/watch?v=4VzaE9q735k"]YouTube - ‪SSNES - Game aware shading - test 2‬‏[/ame]
I really apreciate this work! Thanks, TheMaister!
And, that "stupid" blur shader in your tutorial is very good as a second shader. It does a soft blur over the work of the first shader, some kind of anti-aliasing.
To complement this excellent initiative from TheMaister, I want to encourage new shader developers here too.
Here's my experience so far:
Initially I was totally noob in these shaders. I'm not a professional of this area, I'm just an amateur. My only experience was with math and c programming. If you have these two pre-requisites, you can play with shaders easily.
Some tips that worked with me:
1- You'll learn many things examining other shaders. The knowledge is there; I learned many things examining TheMaister's and Guest's shaders;
2- You can have an initial understanding of Cg Language reading only the chapters 1, 2 and 3 from Nvidia Cg Tutorial. The other chapters treat of 3D effects that are useless with 2D emulators;
3- Concerning references, you can always consult Appendice E from the tutorial to know what the functions do. Other page with good reference is this;
4- After reading the cg tutorial, you need to begin playing with shaders, get the most basic from snes9x-ps3 repository: stock.cg. It does nearest neighbor filtering. The code is really simple. From this shader, try playing by changing some things according to this page. I'm sure you'll learn many things really fast. From this you can try to understand shaders more complex.
5- After understanding how a 2D shader works, you'll see that many of them share the same infrastructure, which you can reuse in new shaders. From here, it'll be easy to try new things.
A Proof-of-concept for a manual scrolling shader. It's aimed at SD3, but uses SMW as game since I need to peek into WRAM values for now, and I couldn't find the proper addresses for SD3, guess I'll need to implement proper ways to capture input directly to make it simpler.
[ame=http://www.youtube.com/watch?v=cuaJoPoi2hU]YouTube - ‪Game aware shading - Manual scrolling‬‏[/ame]
One question: Does this manual scrolling occur when something happens in the game or when you just push some button (useless to the game itself)?
Originally Posted by Themaister
I was watching this video: watch
...and when they show an old game, instead of using a static border to keep the 4:3 aspect ratio, a blurred version of the game is used on each side of the screen. See pic below:
Is this even possible to do in real-time?
That's just fancy video editing surely? Looks cool in places though.
Originally Posted by tisurame
It's like applying a shader to a region. You just need to define that region in the shader.
Very cool. Would it be safe to assume that it's theoretically possible to make a picture slideshow using the borders in the same way as a windows 7 wallpaper where you can have the image change automatically every X number of seconds?
Originally Posted by Themaister
I know next to nothing about this game-aware shaders stuff but I do find it very interesting :)