Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Anti-Aliasing

Author
Message
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Nov 2007 16:03 Edited at: 24th Nov 2007 16:25
So while working on my game I noticed that I can achieve AA without actually enabling it via the GPU, I am fully aware that this is not true AA, however the method used is similar to what GPUs do(though far slower from my tests).

Basically I am rendering a 2nd camera to a render target plane which the default camera renders. By default this uses the display resolution, which gives the same results(but lower FPS) than without the 2nd camera and rendering it normally. All I then do is multiply the resolution of the camera's image by 2,4 and the GPU down-samples the image resulting in AA. Because the GPU isn't exactly designed for this task, using 2x AA in my example looks better than 4x and 8x didn't even work on my GPU.

This doesn't really have much practical use as enabling it properly(when the d3d device is created) is much faster, and allows you to use 4x,8x,16x etc, however it is a code snippet nonetheless.



Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 24th Nov 2007 16:31
This is pretty cool. It'd be great if one were to find a way to properly set AA in DBP though.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 5th Dec 2007 09:22
Quote: "Error 504. Cannot grab image due to illegal area at line 55."


I have a feeling that some pc's (including my laptop apparently) can't set the camera to an image where the width and height are not equal.



Visit www.andromedus.com today!
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Dec 2007 21:10 Edited at: 6th Dec 2007 21:10
i have problems too, an `error report` Message Appears, and i have to close.

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 6th Dec 2007 22:57
Pretty cool indeed

sp3ng
18
Years of Service
User Offline
Joined: 15th Jan 2006
Location:
Posted: 22nd Mar 2008 14:21
yea my pc crashes at mode 3 (that would be 4x am i right?)


Add Me

Login to post a reply

Server time is: 2024-11-25 02:36:26
Your offset time is: 2024-11-25 02:36:26