[osg-users] Multiple Render Targets & Multisampling

Anthousis Andreadis anthousis at gmail.com
Fri Apr 8 07:22:42 PDT 2011


Ok i think i fixed the issue.

When you have an FBO with Multisample you have to perform the blit operation
from the MS FBO to a simple FBO.

When the FBO has MRT you have to perform a blit operation per
COLOR_ATTACHMENT.

so basically you have to perform the

glReadBuffer
glDrawBuffer
glBlitFrameBuffer

once per attachment.

In the RenderStage.cpp this was done only once.

I will post a submission in the corresponding list with the changes.

Anthousis Andreadis

On Fri, Apr 8, 2011 at 1:04 PM, dimi christop <dimi_christop at yahoo.com>wrote:

> As far I understand, what you are saying is that as soon as you enable
> multisampling
> on the FBOs you can not use the multiple render targets. All targets show
> the
> same thing as the first one.
> But this is not the case when you dont use a multisampled FBO.
>
> I had the exact same problem and dropped the efford to find a solution as
> soon
> I found that probably something inside osg was the culprit. All my pure
> OpenGL
> examples were running fine.
> What does OSGPPU do to handle multisampled FBOs?
>
> Dimi
>
>
>
> ----- Original Message ----
> From: Anthousis Andreadis <anthousis at gmail.com>
> To: osg-users at lists.openscenegraph.org
> Sent: Thu, April 7, 2011 11:39:20 AM
> Subject: [osg-users] Multiple Render Targets & Multisampling
>
> Hi,
>
> Has anyone tried to do any advanced* multisampled post effect using osg?
> If yes, I would like to know the "best osg path" to achieve this.
>
> *deferred rendered for example
>
> I have tried to attach a texture to a camera along with the multipleSamples
> and
> multisampleColorSamples values.
>
> This works ONLY when i have one rendertarget. In all other cases in the
> final
> compositing shader,
> i see only the first (and not the 2nd 3rd etc ) render target. The other
> render
> targets are not black, but they appear overwritten with the contents of the
> first render target.
>
> On the other hand i see the osgfpdepth example and it has a completely
> different
> approach to the subject, almost handling manually fbos and rendertargets.
>
>
> I tried searching on the mailing list for this subject, but almost all
> discussions seem to stop without a final result at about 2 years ago.
>
> Tnx for your time,
>
> Anthousis Andreadis
> anthousis at gmail.com
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20110408/dedcaf9c/attachment-0004.htm>


More information about the osg-users mailing list