[osg-submissions] FrameBuffer AntiAliasing with OSG 2.5
Michael Platings
mplatings at pixelpower.com
Tue Jun 3 05:05:08 PDT 2008
Hi Robert,
Sorry for my bad timing, but I would also like to make the same submission, based on Paul's previous submission.
Improvements over Paul's latest submission:
- Readbacks to image attachments, and copy to texture in RenderStage::drawInner() will work with multisampling.
- Naming is more correct. e.g. "Depth Samples" in Paul's submission is incorrect - I have used "samples" (from EXT_framebuffer_multisample, and equivalent to coverage samples in NV_framebuffer_multisample_coverage), and "color samples" (from NV_framebuffer_multisample_coverage). In RenderStage, Paul's _fbo_multisample isn't multisampled! I have called it the resolve FBO, consistent with EXT_framebuffer_multisample.
- For Camera buffer attachments, I have put the sample counts directly in Camera, rather than requiring the same values to be entered into each Attachment.
My submission is based on OSG version 2.4
Thanks to both you and Paul
-----Original Message-----
From: osg-submissions-bounces at lists.openscenegraph.org [mailto:osg-submissions-bounces at lists.openscenegraph.org] On Behalf Of paul1492 at yahoo.com
Sent: 02 June 2008 13:42
To: osg-submissions at lists.openscenegraph.org
Subject: [osg-submissions] FrameBuffer AntiAliasing with OSG 2.5
I've attempted to add FrameBuffer AntiAliasing to OSG... I did this before with OSG 1.2 and now my company has found the money to pay me to look into adding it to the latest OSG.
However, since I do not have access to SVN (not approved use by my employer :-(), I've made the required changes to OSG 2.5... I don't think much has changed in this area since then...
Like last time, I've attached the NVIDIA test program "simple_framebuffer_object.cpp".
I've done my best to support a "fallback" implementation if the hardware doesn't support it...
To support frame buffer AA, I've extended the camera->attach() function to support an additional (optional) 2 arguments. They are: Coverage AA Samples and Depth AA Samples.
Here is how I call it:
camera->attach(osg::CameraNode::COLOR_BUFFER, texture,
0, 0, false,
mCoverageAAMode, mDepthAAMode);
Feel free to make any changes.
Paul Palumbo
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Camera.cpp
Type: application/octet-stream
Size: 11599 bytes
Desc: Camera.cpp
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080603/4cb90bab/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FrameBufferObject.cpp
Type: application/octet-stream
Size: 27033 bytes
Desc: FrameBufferObject.cpp
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080603/4cb90bab/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RenderStage.cpp
Type: application/octet-stream
Size: 48241 bytes
Desc: RenderStage.cpp
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080603/4cb90bab/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Camera
Type: application/octet-stream
Size: 26194 bytes
Desc: Camera
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080603/4cb90bab/attachment-0009.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FrameBufferObject
Type: application/octet-stream
Size: 18776 bytes
Desc: FrameBufferObject
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080603/4cb90bab/attachment-0010.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RenderStage
Type: application/octet-stream
Size: 12666 bytes
Desc: RenderStage
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080603/4cb90bab/attachment-0011.obj>
More information about the osg-submissions
mailing list