Posts: 21.718
Threads: 401
Joined: Sep 2013
Reputation:
476
Location: 私の夢の中
@gregory
If I wanted to implement a different type of texture upscaling, where in GSdx would I look?
Like where is the EXACT point the filtering operation happens?
It's prolly beyond me but I'd like to look into adding something like xBRZ.
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
It might worth to open a separate thread.
Could you explain me the algorithm? However it will likely bring back most of upscaling issue (at least the one related to the texture size).
Posts: 3.526
Threads: 6
Joined: Dec 2013
04-10-2015, 08:20 AM
(This post was last modified: 04-10-2015, 08:24 AM by dabore.)
the fastest way to do that? render native without filters and use the fx shader pass and upscale the final render.
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
Well I don't doubt that it will be popular.
Is it implemented as post processing filter or as a texture filter? Most emulators are sw renderer so it might be a bit easier. (They can use the if statement efficiently). Or maybe directly create 2d sprite upscaled and filtered (before gpu upload) but it might be impossible to do.
Posts: 21.718
Threads: 401
Joined: Sep 2013
Reputation:
476
Location: 私の夢の中
@gregory - it can be implemented as either, I think.
PPSSPP does it in hardware, so it's definitely possible. I'll look into how they do it and see if I can find anything useful.
@dogen - Yeah, I said not everyone likes it. Also I agree on that pic it looks pretty *****.
Oh the thing is, if you want to use it for 3d textures(which I do, and which is what PPSSPP does) it needs to be a filter and not a post process.
E.G. it is used at the same stage bilinear normally is.
As a post process it would affect poly edges and things as well and not be nice(with 3d) but fine for 2d.
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD
Posts: 3.526
Threads: 6
Joined: Dec 2013
for 3d textures? ugh.
does that look good? isn't it like a "painting" shader? i might think... if you do it wrong you destroy interpolated alpha channels. for "colorkey alpha" on 3d it's useless overkill cause it's basicly already done with bilinear. smudge that further? i know that alphatest look damn good. you might want to dither and implement alpha to coverage rather. but...
it might be an intersting idea for sprites like pixel art. really. but it's not really pixel anymore then.
and... well... you gotta make sure to check what type of alpha you deal with. you can't throw that at everything.
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
So I commited my latest fix for bilinear sprite. I didn't touch textures that are draw in reverse. Anyway it is much better for 2D games.
When you know that bilinear filtering on 2D sprite even at native resolution break rendering. You don't see it because factors are like 98%/2% on the good/bad pixels.
I guess, pixel art filtering won't be easy. Game dev plays a lots with the alpha channel on texture, so it might be possible to detect edge this way.