[eq-dev] 2-pass rendering

1 view
Skip to first unread message

William Thibault

unread,
Jan 17, 2010, 7:53:33 AM1/17/10
to eq-...@equalizergraphics.com
Hi,
I'm trying to implement a 2-pass rendering algorithm using equalizer,
in which the first pass renders the scene using the equalizer
configuration frustum,
and the second applies my fragment program, which uses the first pass rendering
as a texture (and warps it). I use a second, floating point texture
for the warp.

I'm trying to create my own FBO, bound to a texture, for the first pass,
and then use that texture for the second pass, but I'm having trouble
getting the FBO to use the configuration.

I am new to Equalizer, and know that this should be possible using a
compound, but thought
I could avoid a readback by binding my own FBO to a texture, but its
not working.
If I bind my FBO and then call eq::Channel::frameDraw(), i get errors
in applyBuffer().
I tried calling applyBuffer, applyViewport, applyFrustum, applyHeadTransform
directly in my Channel's frameDraw, but the applyBuffer is failing:
59912 2957692928 ./lib/client/os.cpp:50 1635 Set breakpoint in
client/os.cpp:52 to debug
59912 2957692928 ./lib/client/os.cpp:31 1635 Got GL_INVALID_OPERATION
after glDrawBuffer( getDrawBuffer( )) in client/channel.cpp:624
59912 2957692928 ./lib/client/os.cpp:50 1635 Set breakpoint in
client/os.cpp:52 to debug
59912 2957692928 ./lib/client/os.cpp:31 1651 Got GL_INVALID_OPERATION
after glReadBuffer( getReadBuffer( )) in client/channel.cpp:623

(i can see my first pass output, sort of, but its "messed up")

Should I use a compound to render my two passes? Do I use different Channel
classes for the different passes? Sorry if this is obvious, RTFM, etc.
How would my second-pass fragment shader get its sampler2D to reference
the first pass output? and my other f.p. texture as well?

Or maybe I'm not setting up my FBO correctly: this is how it seems. But
I may be better off using eq for this. I'll be
looking into eq source to see what's happening, but hope there is an
easier way :-)

_______________________________________________
eq-dev mailing list
eq-...@equalizergraphics.com
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Stefan Eilemann

unread,
Jan 18, 2010, 11:35:03 AM1/18/10
to eq-...@equalizergraphics.com

Hi,

On 17. Jan 2010, at 13:53, William Thibault [via Software] wrote:

> I'm trying to create my own FBO, bound to a texture, for the first pass,
> and then use that texture for the second pass, but I'm having trouble
> getting the FBO to use the configuration.
>
> I am new to Equalizer, and know that this should be possible using a
> compound, but thought
> I could avoid a readback by binding my own FBO to a texture, but its
> not working.
> If I bind my FBO and then call eq::Channel::frameDraw(), i get errors
> in applyBuffer().

You should override applyBuffer() and bind your FBO there. Only during your warp pass you use eq::Channel::applyBuffer to bind Eq's frame buffer and use your FBO as input texture.


HTH,

Stefan.



View this message in context: Re: [eq-dev] 2-pass rendering
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.
Reply all
Reply to author
Forward
0 new messages