Hi Fred,

On Sunday, January 01, 2012 16:14:17 Frederic Bouvier wrote:
> Exactly. I want to give access to every stage of the rendering to the
> effect system. The geometry pass outputs to render target, but the fog,
> the lights, the bloom need to have access to the textures of the buffer,
> and there is a separate one for each camera associated to windows or
> sub windows.
> 
> I have found a solution where I can make an association between the
> cull visitor and the G-buffer and then modify the pass of the effect
> on the fly. I hope some multi-threading model will not screw up
> this scheme.
Hmm, 'on the fly' sounds not so good.
Without definitely knowing what this means ...

There should better be sepereate datastructures for the effects.
I have not looked into the effect code, but having an extra property in the 
effect that tells, 'per-toplevel-camera=true' or something more descriptive.
Then in the effect code assign seperate texture state in this case.

... my two cents. And may be pointless for your actual implementation.

> > > Currently, the fog is computed using the depth buffer as a
> > > post-process pass. Any smarter computation (like atmospheric
> > > scattering) is just a matter of writing a single shader that
> > > would replace the default fog computation.
> > 
> > Exactly. And you are looking into the sky if you find a far clipping
> > plane depth value.
> 
> Actually, it's a null normal. I could also use the stencil buffer but
> I already messed with combined depth/stencil shared between fbos
> without much success.
Null normal is probably fine too.

And no the scencil is really per fbo pass. And much worse, I believe you need 
a non standard extension to access the stencil from an fbo pass that is not 
active anymore. The only thing you could do to get a stencil out of a render 
pass belonging to an fbo is to draw a screen aligned quad in as the last 
geometry in an fbo render target that evaluates the stencil and writes the 
result into a normal render fbo texture target. Then you will have this result 
available as a seperate texture. But I do not think that this is needed for 
this purpose.

Greetings

Mathias

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to