Having read about anti-aliasing I came to realise that I could render my scene 8X times the original size of the screen and then shrink it to render it on my original screen to improve the effect that I have rendered on the screen. Could someone help me on how to achieve this and is shaders the only way to achieve this?
|
|
If you're using D3D there's no need for shaders to implement this. Just create your extra large render target, render your scene to that, and at the end of the frame call StretchRect() to do the resizing of the big render target to the back buffer. Depending on where the aliasing is coming from, this may not look any better than MSAA, and MSAA is much quicker because it only runs the pixel shader once for each output pixel, and not eight times. Note that even when using the fixed function pipeline any modern card will convert those settings into pixel shaders in the driver. You should also make sure you're using the right texture filter settings, and that your textures have mip maps, as both of those are cheap to fix and can cause some nasty aliasing if they aren't right. |
|||||
|
|
Um, why don't you just use multisampling like everyone else? Even if you're using deferred rendering, there are ways to use multisampling in tandem with that. Multisampling covers triangle edge aliasing, while anisotropic filtering covers texture aliasing. Between those two, you pretty much have all the antialiasing techniques you need. Unless you're procedurally generating textures, of course. |
|||
|
|
|
The modern technique is to render your scene to one or several framebuffer objects of the desired size, then use these framebuffer objects as textures and render them to the screen. Basic usage means setting the texture to Another way is to use the accumulation buffer (tutorial here). This will make advanced usage such as gamma correction more difficult to implement, but the basic idea is very simple. It doesn't require shaders either. |
|||||||
|