HI Marco, I have tried combining multi-sampling and float point FBOs so haven't come across this bug before. I do wonder if the _internalFormat itself could be automatically set, or perhaps if it's 0 then RenderStage.cpp code to look for an alternative as a fallback - first it could check for a texture, then finally drop back to RGBA.
Send me the changed file and I can pontificate on this. Could you also modify one of the render to texture examples to illustrate this problem - as then I'll be able to test and confirm a fix. Cheers, Robet. On Thu, Nov 13, 2008 at 10:55 PM, Marco Jez <[EMAIL PROTECTED]> wrote: > I'm trying to add multisampling capabilities to my floating-point FBOs, but > I've found what I think is a bug in osgUtil/RenderStage.cpp. Basically, when > I specify a number of samples greater than 0, I actually get a > non-floating-point framebuffer. > See line 380 in RenderStage.cpp: > > GLenum internalFormat = attachment._internalFormat; > > if the attachment is actually a RTT target rather than a rendertarget, the > internalFormat field will always be zero. This will make RenderStage pick > the default value which is GL_RGBA, thus ignoring the target texture's > internal format (GL_RGBA16F_ARB in my application). Replacing the above code > with the following, fixes the problem for me: > > GLenum internalFormat; > if (attachment._texture.valid()) > internalFormat = attachment._texture->getInternalFormat(); > else > internalFormat = attachment._internalFormat; > > Now, I'm pretty new to all this multisampling stuff, and I'm not sure > whether this fix is reliable and/or correct, so I'm not filing a submission > for now. Robert, I can send the modified file if you think it's appropriate. > > Cheers, > Marco > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

