Custom PPSSPP shaders
|
11-05-2013, 04:17 PM
(This post was last modified: 11-06-2013 05:56 AM by KillaMaaki.)
![]() |
|||
|
|||
RE: Custom PPSSPP shaders
(11-05-2013 09:39 AM)naoan Wrote:(11-05-2013 02:23 AM)KillaMaaki Wrote: Hello all. This is my first post in the PPSSPP community! That's the thing though - without a time value I can't do any animation in the shader. I actually prototyped this shader with the Unity game engine first - there they expose a global _Time vector which contains various multiples of the current time. I use that to offset scan position per pixel (which scrolls the scanlines). To give a bit more detail on the shader, it first calculates scanlines - per pixel it's either 1 or 0, forming horizontal stripes. It uses that to offset UV position, so on 1 it offsets a few pixels to the right, on 0 it doesn't offset. Makes it look a bit like those staggered phosphor TVs. It also splits the red and green channels, shifting each left and right slightly to kind of simulate NTSC color bleed. It actually looks really good when I animate the scanlines (in my Unity prototype), but without the animation it kind of looks boring. EDIT: Actually, on a side note, anybody know how to implement multipass shaders? Thinking about porting over an actual NTSC shader, but they're all 3-pass and I'm unsure how to do this with PPSSPP. EDIT 2: Got the first pass of the NTSC shader ported. Currently looks exactly like what happens when you connect a Y cable to a composite connection (you get a grayscale image with a few color artifacts/bleeding) EDIT 3: Here's a prototype I made with the Unity game engine https://dl.dropboxusercontent.com/u/9910...TDemo.html It's off by default, hit "Toggle NTSC" to turn it on/off. If I could make a multipass shader in PPSSPP (and have access to some kind of Time or frame count value) I would really love to get this ported over. |
|||
« Next Oldest | Next Newest »
|