Hello Erik,

Erik Podetti wrote:
> Hi everybodies,
>                       I'm implementing some deferred shading algorithm 
> plus Radiance Shadow Maps techniques. What I do now is render the scene 
> from the camera point of view in a FBOViewport and draw to multiple 
> render targets. Obtaining 3 textures with the scene geometry (1. color   
> 2. position   3. normals and linearized depth)  next I do following 
> render passes adding these textures to a ChunkMaterial and adding the 
> Material to a PolyForeground object. In the material I also add a 
> SHLChunk with my shader programs. Finally I push the PolyForeground to 
> another FBO and render the FBO.

hm, I suppose it is not an option for you, but IMHO this type of thing 
becomes a lot less messy with 2...
(I've actually a partially implemented deferred shading node core and 
pieces to compute shadow maps for it that I hope to finish in the near 
future).

> 1. As I don't need the standard pipeline to render the depth buffer in 
> the last FBO can I disable it in any way?

it looks like there won't be a depth attachment if none of the textures 
have a depth format.

> 2. Actually  I do render 5 or 6 FBO for my render passes in sequence and 
> I use these commands in "display" function
> 
>         win->activate();
>         win->frameInit();
>         osg::RenderAction *rAct = osg::RenderAction::create();
>         fbo->setParent(win);
>         rAct->setWindow(win.getCPtr());
>         fbo->activate();
>         fbo->render(rAct);
>         fbo->setParent(NullFC);
>         win->frameExit();
>         delete rAct;
> 
> ...where "win" is the  simpleSceneManager window. Is it the fastest way 
> I can render FBOs or deleting and recreating render actions is a waste 
> of time?

yes, you can keep the RenderAction around throughout the application 
runtime.

> 3. I can't figure out why my frame-rate drops down so quickly as I 
> render more FBOs...I use OpenGL High lever shading language (GLS) for my 
> vertex and fragment programs. Maybe they aren't so optimized as ARB 
> programs...dunno...Do you have any experience using those programs?

I suspect it is the way the FBOViewport works, it essentially 
reassembles the FBO each frame instead of only when attachments or sizes 
change. AFAIUI that is considered a fairly expensive operation.
 From my (not exhaustive) experience with GLSL I've not noticed huge 
performance problems.

        Cheers,
                Carsten



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to