(02-21-2016, 02:53 PM)shockdude Wrote: Well I attempted to port lanczos4 to Ishiiruka and, uh, got this:
This is at 1x IR. I don't know what I did wrong lol.
I used the libretro implementation and the GeDoSaTo implementation as references. The shader source code is here: http://pastebin.com/eQBLEZ1g
Edit: After poring over the code and doing some experiments, I've come to the conclusion that the shader code is correct, but the coordinate systems that I'm using are wrong.
In fact, if I set stepxy = GetInvTargetResolution() / 4.0, I get pretty good results out of the shader, but I don't know if it's correct per se.
What exactly do GetInvTargetResolution() and GetInvResolution() return?
I know what's your problem. It's the same problem I'm getting to port my shaders (jinc seems to be so flexible that can overcome it):
Ishiiruka pass some graphics to the shader input framebuffer using Linear Sampling, even when you choose native 1x internal res. For the majority of shaders to work properly, it's mandatory to have access to the RAW native res (that is, all the square pixels at native res).
Your solution using GetInvTargetResolution isn't solving this problem, you are just making your shader pass the linear input directly to the output. What you're getting is indeed a Bilinear output thtough your shader.