Postprocessing effect and AntiAliasing

Posted By: sinnlos

Postprocessing effect and AntiAliasing - 08/24/08 12:40

Dear Conitec

We are trying to get postprocessing effects like a bloom or a sharpening shader working together with Anti-Aliasing turned on.

Since Version V7.08.1b beta (released 5-March-2008) this should be possible.
Quote:
bmap_zbuffer can be used to render into bitmaps bigger than the screen, and to use render targets even when d3d_antialiasing was enabled.
(quote from the beta features page)

Somehow we just can't get it working. We tried alot but failed. We also asked people from this forum (Slin for example) with no sucess yet. That's why we now contact you.

With this little Test-Demo you can see our problem.
<< Link (4MB) >>

Execute the "Main.c"-file when the application starts bloom is deactivated, by pressing "F1" you enable bloom on and off.
Without bloom we have a nicely AA, as soon as we enable bloom, you can see the stair-effect at the edges of the model.

Here are 2 screenshots of this issue.




What are we doing wrong?
We would be very thankful for your help, since we have another architecture visualisation-project coming up and we would like to use AA and Bloom together then.

Thanks a lot for your help,

Sinnlos & Zwecklos
Posted By: ChrisB

Re: Postprocessing effect and AntiAliasing - 08/24/08 13:01

Originally Posted By: JCL on the beta forum
Still, even with bmap_zbuffer() antialiasing only works on the screen, not in a target bitmap as in your code.

Posted By: sinnlos

Re: Postprocessing effect and AntiAliasing - 08/24/08 14:02

This means that the view which is rendered for the bloom, is not anti-aliased and combining the screens is resulting in stair effects?

then our question is: is there any way to anti-alias the bloom-screen?
Posted By: jcl

Re: Postprocessing effect and AntiAliasing - 08/25/08 08:42

The problem is that antialiasing only works when rendering on the screen, not when rendering into a bitmap. You can not antialias a postprocessed screen because it does not contain edge information anymore.

It's theoretically possible to implement antialiasing for bitmaps also, but that's a little tricky.
Posted By: sinnlos

Re: Postprocessing effect and AntiAliasing - 08/25/08 08:58

dear jcl, thanks for your answer.

is there any workaround for this problem?
because in our architecture visuals we have alot of straight edges, when not antialiased they look very ugly.
And on the other hand we would like to have a bloom shader in it to get more "living" atmosphere.

Do you have a idea or could you point us in a direction what we could do to get an antialiased scene with bloom?

greetings

sinnlos - zwecklos
Posted By: jcl

Re: Postprocessing effect and AntiAliasing - 08/25/08 09:03

The workaround I can think of at the moment is to render it on the screen, then do a screenshot into a bitmap, set the render_target pointer to that bitmap, followed by a view stage processing the render_target with a bloom effect.

This would probably only work with 7.2 however - the feature for a non-delayed screenshot into a bitmap was implemented only recently.
Posted By: PHeMoX

Re: Postprocessing effect and AntiAliasing - 08/25/08 21:25

You might get away with not using anti-aliasing at all, but still achieving the same effect by using a stronger edge blur in your (post-processing) shader though.
© 2024 lite-C Forums