Antialias and render_target

Posted By: txesmi

Antialias and render_target - 08/11/15 09:07

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
Posted By: Kartoffel

Re: Antialias and render_target - 08/16/15 19:26

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.
Posted By: txesmi

Re: Antialias and render_target - 08/16/15 21:28

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.
Posted By: Kartoffel

Re: Antialias and render_target - 08/16/15 21:54

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
Posted By: txesmi

Re: Antialias and render_target - 08/17/15 11:00

That looks incredible. Congratulations!
Could you throw some words (or code lines :D) about your downsampling technique?

Are not the pawns a bit tall?
Posted By: Kartoffel

Re: Antialias and render_target - 08/18/15 07:51

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
Posted By: txesmi

Re: Antialias and render_target - 08/19/15 19:47

Thanks a lot,
I will need to make some test for the case.
© 2024 lite-C Forums