Ok, that make sense.
It happens every time I render with a floating point texture.
The fall in framerate does not happen when I run the OSG multi render target
example using HDR. My code does however use additive blending toward the
floating point texture so I bet that is what cause it to fall into a software
rendering mode.
Do you know about any texture surface bit format that is more than 8 bits
(unsigned integer) ?
Viggo
> Date: Fri, 30 May 2008 16:29:05 +0100
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: [osg-users] I get errors when trying to render to a luminance
> buffer...
>
> Hi Viggo,
>
> When performance drops like this it's because you've dropped onto a
> software fallback path in the OpenGL driver. Exactly what formats are
> software vs hardware depends upon the hardware and OpenGL drivers.
> You'll need to check with your hardware vendors specs to see what will
> be hardware accelerated.
>
> Robert.
>
> On Fri, May 30, 2008 at 2:16 PM, Viggo Løvli <[EMAIL PROTECTED]> wrote:
> > Hi Robert,
> >
> > I modified my code as you suggested.
> > The warning is gone :-)
> >
> > The framerate is now 10 seconds per frame instead of 30 frames per second.
> > It does something.
> > The texture I render to remains black (cleared to black).
> >
> > If I change the setInternalFormat to GL_RGBA then the framerate is up again,
> > and the texture gets colors. This works, but then I only have 8 bit in the
> > red channel. What I need is as many bits as possible in the red channel,
> > preferably 32. And I do not need GBA channels.
> > Do you have a suggestion for me on this one?
> >
> > Viggo
> >
> >> Date: Fri, 30 May 2008 13:25:24 +0100
> >> From: [EMAIL PROTECTED]
> >> To: [email protected]
> >> Subject: Re: [osg-users] I get errors when trying to render to a luminance
> >> buffer...
> >>
> >> Hi Viggo,
> >>
> >> The warning is exactly right, pbuffers don't suport multiple render
> >> targets, only FrameBufferObjects do.
> >>
> >> Perhaps what you intend it not to use multiple render targets, in
> >> which case you should set the Camera attachment to COLOR_BUFFER rather
> >> than COLOR_BUFFER0, that later tells the OSG that you want MRT and
> >> will be using glFragColor[] in your shaders.
> >>
> >> Also the Camera::setDrawBuffer(GL_COLOR_ATTACHMENT0_EXT) is
> >> inappropriate for pbuffers.
> >>
> >> Robert.
> >>
> >> On Fri, May 30, 2008 at 1:18 PM, Viggo Løvli <[EMAIL PROTECTED]> wrote:
> >> > Hi,
> >> >
> >> > I want to render to a floating point buffer, and I set things up like
> >> > this:
> >> >
> >> > tex->setInternalFormat( GL_LUMINANCE16F_ARB );
> >> > tex->setSourceFormat( GL_RED );
> >> > tex->setSourceType( GL_FLOAT );
> >> >
> >> > camera->setRenderTargetImplementation( osg::Camera::FRAME_BUFFER_OBJECT
> >> > );
> >> > camera->attach( osg::Camera::BufferComponent( osg::Camera::COLOR_BUFFER0
> >> > ),
> >> > tex );
> >> > camera->setDrawBuffer( GL_COLOR_ATTACHMENT0_EXT );
> >> >
> >> > My fragment-shader that write to the surface output the value this way:
> >> > gl_FragData[0].r = 1.0;
> >> >
> >> > Another fragment-shader reads the surface this way:
> >> > value = texture2DRect( id, gl_FragCoord.xy ).r;
> >> >
> >> > I get the following output when I try to run my app:
> >> > "Warning: RenderStage::runCameraSetUp(state&) Pbuffer does not support
> >> > multiple color outputs."
> >> >
> >> > My app runs, but nothing is written to the texture.
> >> >
> >> > Is it possible to set up a surface that holds one channel (GL_RED) which
> >> > is
> >> > an unsigned int of 32 bit resolution? I'd rather use that than a float
> >> > :-)
> >> >
> >> > Viggo
> >> >
> >> > ________________________________
> >> > Få Hotmail du også. Windows Live Hotmail nå med 5000 MB gratis
> >> > lagringsplass.
> >> > _______________________________________________
> >> > 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
> >
> >
> > ________________________________
> > SkyDrive er her. Glem minnepinnen!
> > _______________________________________________
> > 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
_________________________________________________________________
Windows Live Hotmail nå med 5000 MB gratis lagringsplass.
http://get.live.com/nb-no/mail/overview
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org