The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The potential of the programmable pipeline
12-05-2014, 09:56 PM (This post was last modified: 12-14-2014 08:02 PM by SkyBladeCloud.)
Post: #1
Photo The potential of the programmable pipeline
Just passing by to share my experience tweaking PPSSPP's shader generator.

As you may already know, the emulator uses OpenGL ES's programmable pipeline to emulate the PSP's fixed one. This is done generating GLSL shaders based on the state of the GE.

Now the interesting thing here is that the shader generator can be tweaked to implement custom blending algorithms or even new lightning models. This is different than custom post-processing shaders, since one can even apply effects based of the actual geometry.

For example, in the following video I show FF Type-0 using a very basic Phong implementation (a per-fragment color illumination model), as opposed to the default per-vertex lightning it originally uses for characters:

dailymotion.com/video/x2buwaw_ppsspp-custom-lightning-model_videogames

Notice how lightning flows through the model. The downside is that PSP games don't normally upload enough material information for complex lightning models to look 100% ok. This is why characters look like porcelain in my video xD. Of course, it can be tweaked further until it matches one's expectations (lowering the specular component on the Phong shading lightning looks more realistic, and not so plastic).

Another example are custom blending models + on-the-fly normal mapping. Given this original scene:

i57.tinypic.com/2ujjfqc.jpg

We can generate in-shader normal maps (reading surroinding texels) and apply them to slightly increase the level of detail. Possibilities are endless, here is one possible result (and yeah, I messed up character's shaders on this one lol):

i58.tinypic.com/xbfl1h.jpg

Again, tweaking the shader generator it's possible to achieve different (and most likely better) result. In this case, there was no light information for static meshes, so normal mapping hardly works with hard coded lights, showing a crispier image.

Aaaand.... here's is a mix of both, to kinda keep the original color feel ^_^":

i59.tinypic.com/2por78k.jpg

I bet many games could benefit from alternative (probably game-specific) shader generators. One could argue if possible improvements do worth it, considering you'd be getting altered results, which is opposed to the concept of emulation. At least type-0 looks pretty good like this, and I think I'm gonna use it to finally (win!) play the game ^_^".

UPDATE: Video showing some cool effects:





Regards:

~Sky
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
The potential of the programmable pipeline - SkyBladeCloud - 12-05-2014 09:56 PM

Forum Jump: