-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shader for PPSSPP's Hybrid Method #86
Comments
can you get some screenshots for reference? |
There is also a blog entry about the technique. Some Screeshots: http://abload.de/img/gedosatotexzmo3e.jpg The posterisation effect of xbr is very reduced. |
Hmm this isn't really possible in the shader pipeline. What you want is specific to the emulator and what it actually does is apply post-processing to the textures before applying them to the final output. |
I don't want texture filtering within the shader pipeline. As an example: In case of a 2D game, PPSSPP and the Retroarch Hybrid Filter should lead to the same result. In case of a 3D game, PPSSPP will only filter the textures but the the Retroarch Hybrid Filter will filter the complete image. Unfortunately I only have examples from 3D games. |
Now I understand your post. :) The limitation in retroarch is the iterative approach. So you can only apply a certain processing on the final picture, which will be the input for the next stage. However this filter needs a complex algorithm. Maybe a recursive approach could be helpful in general for the future. |
RetroArch is capable of referencing previous passes. We also already have a variety of upscalers and even some edge-detection shaders. It should just be a matter of running each one in a pass and then making a pass that says "if it was an edge, show the xbr result; if not, show bilinear (or whatever)". I'll try to take a stab at it soon. |
Alright, I got something worked up in slang but I can port it to Cg pretty easily if it does what you're looking for. I based it on sabr instead of xbr because I already had a single-pass slang version of sabr handy but I can base on whatever in Cg: |
Wow this looks awesome. Especially the skin texture looks great. Thank you so much. |
The Hybrid method from PPSSPP combines the sharp color transitions from xbr with smooth gradiants.
The algorithm is as follows:
Step 1) and 3) needs a shader file to create the Hybrid look.
For 2) xBR/ Super xBR / or any other filter can be used.
PPSSPP Source Header:
https://github.com/hrydgard/ppsspp/blob/c2f4fad56aada331bbd8dd7db99037285bab853f/GPU/Common/TextureScalerCommon.h
PPSSPP Source CPP:
https://github.com/hrydgard/ppsspp/blob/c2f4fad56aada331bbd8dd7db99037285bab853f/GPU/Common/TextureScalerCommon.cpp
The text was updated successfully, but these errors were encountered: