Hi,

On 14/07/2011 16:08, Bolstad, Mark wrote:
I like the idea of combining the passes into one, but if I had a blue
object and had to mask it into the red channel, wouldn't it just be black?

I had talked to a professor who had suggested a one-line fragment shader
to do RGB-> Luminance and use Color Masking to write into the
appropriate channel. Would rendering straight into a Luminance texture
with Color Masking work?

In reality, this is actually more complicated in that it's not three
objects, but three separate frames of animation. So the main loop is:

while(1)
{
advance sim
frame(); // Render to red
advance sim
frame(); // Render to green
advance sim
frame(); // Render to blue
Render RTT texture to display.
}

Thanks for the suggestions and any further advice.

I think you're at the stage where you should just try :)

Trying it out in my head I'm quite sure rendering to 3 luminance and then combining in extra step would work. Fragment shader that distributes colours to all channels with color masks should also work.

jp


Mark

*/Mark A. Bolstad/*
Scientific Computing
Janelia Farm Research Campus
Howard Hughes Medical Institute
19700 Helix Drive, Ashburn, VA 20147
email:*bolst...@janelia.hhmi.or <mailto:bolst...@janelia.hhmi.or>**g*
office: +1.571.209.4623
web: http://www.hhmi.org/janelia/






On Jul 14, 2011, at 8:58 AM, Jean-Sébastien Guay wrote:

Hi Mark, JP,

I think easiest would
be to render to 3 luminance textures and then combine in another step
into rgb.

Why not render 3 passes into the same RGB texture but just write to
one channel per pass using color masking? You'd save the combine pass.

J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
<mailto:jean-sebastien.g...@cm-labs.com>
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
<mailto:osg-users@lists.openscenegraph.org>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to