Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by 7th_zorro. 04/16/24 13:19
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, alibaba, rki), 425 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Antialias and render_target #453753
08/11/15 09:07
08/11/15 09:07
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
As you probably know activating the render target bmap of a view disables the full scene antialias on the view.

The only solution I can imagine is building a 2x supersampling in order to get a fake antialias before post process. Is this a valueable solution? I never did it before.

And here comes the question for a DX master... there could be a way to capture the 'antialiased' scene in order to use it on a pp effect?

Thanks in advance,
txes

Re: Antialias and render_target [Re: txesmi] #453828
08/16/15 19:26
08/16/15 19:26
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
I think it has something to do with MSAA in dx9 and I'm afraid it's not possible.

I don't know very much about it but enabling MSAA even bypasses external postprocessing by programs like sweetfx for example. (I'm using this one to add custom pp shaders to other games :3)

Supersampling works fine, as long as the user has a PC that's beefy enough for this task.
Also, afaik MSAA is pretty much the same as SSAA - it just does some polygon edge detection and only supersamples these edges.
That's why it doesn't smooth off alpha tested stuff (vegetation, for example) and also doesn't improve texture quality, aswell as aliasing caused by things like specular highlights, etc.


POTATO-MAN saves the day! - Random
Re: Antialias and render_target [Re: Kartoffel] #453829
08/16/15 21:28
08/16/15 21:28
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Thank you Kartoffel,
I had read about this issue before but I was not sure. Too much time from that read. Anyway supersampling works pretty well and does not blur the scene too much for my taste. My graphic card does not notice it. I got the same frame rate. Some details are lost, it is true but good enough I think.

Re: Antialias and render_target [Re: txesmi] #453832
08/16/15 21:54
08/16/15 21:54
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Well, in my opinion SSAA is always better than no SSAA grin

Yeah, some people say it's blurry but I don't think so (maybe they're doing it wrong?). It improves texture quality a lot and if it needs to be sharper you can add some sharpening to the downsampling aswell as mess around with the sample offsets.

If done right it can look sharper than the original image, especially the texture filtering I was talking about:


no AA vs SSAA

full image no aa
full image ssaa

Last edited by Kartoffel; 08/16/15 22:03.

POTATO-MAN saves the day! - Random
Re: Antialias and render_target [Re: Kartoffel] #453858
08/17/15 11:00
08/17/15 11:00
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
That looks incredible. Congratulations!
Could you throw some words (or code lines :D) about your downsampling technique?

Are not the pawns a bit tall?

Re: Antialias and render_target [Re: txesmi] #453888
08/18/15 07:51
08/18/15 07:51
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Well, I'm simply using multiple samples for the downsampling (like a small blur).

In addition to that I'm applying a bit of sharpening (in this case with a slightly bigger blur radius than the downsampling).
Note that I'm doing it in the same shader. I'm usually not a fan of sharpen filters but it's a different story here since there is a high-res source image.

So.. this isn't really 'fast', but there's room for performance improvements.
For example, using the same samples for the downsampling and sharpening would decrease the number of texture instructions a lot.
Also, using point filtering and then applying a predefined weight to every pixel could be faster, too. (Not sure about that though)

Let me know if you need to know more.

And yeah, the pawns are a bit tall. I didn't make them, though ;P


POTATO-MAN saves the day! - Random
Re: Antialias and render_target [Re: Kartoffel] #453944
08/19/15 19:47
08/19/15 19:47
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline OP
Serious User
txesmi  Offline OP
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Thanks a lot,
I will need to make some test for the case.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1