Hello,

that is bad. :-(
So, I want to blend (for example add) textures iterative.
Here in pseudo code:

while(1)
{
  Tex0 = Tex0 + Tex1; // Tex0 + Tex1 is calculate in a glsl shader
}

Thanks for your tips.

Cheers

Martin

-------- Original-Nachricht --------
> Datum: Tue, 22 Feb 2011 08:58:05 +0200
> Von: "J.P. Delport" <[email protected]>
> An: OpenSceneGraph Users <[email protected]>
> Betreff: Re: [osg-users] Can I increment the gl_FragData?

> Hi,
> 
> On 21/02/11 17:29, "Martin Großer" wrote:
> > Hello,
> >
> > thank you very much for the three fast answers. I think the "ping
> > pong processing" looks interesting.
> >
> > I only want to render a texture by RTT and in the next run I render
> > the texture again, but I don't want to replace the old texture. I
> > would like blend the new rendering into the texture. Is this
> > understandable so far?
> 
> unfortunately there is no way to get the old framebuffer contents from a 
> shader. So, you are stuck with OpenGL blending (that operates on the 
> framebuffer and your new data) or reading the old data from a texture 
> (but then you can't write to that same texture).
> 
> What effect/processing are you trying to achieve?
> 
> jp
> 
> >
> > Cheers
> >
> > Martin
> >
> > -------- Original-Nachricht --------
> >> Datum: Mon, 21 Feb 2011 17:07:41 +0200 Von: "J.P.
> >> Delport"<[email protected]> An: OpenSceneGraph
> >> Users<[email protected]> Betreff: Re: [osg-users]
> >> Can I increment the gl_FragData?
> >
> >> Hi,
> >>
> >> you'll have to use "ping-pong" if you want to update a texture from
> >> a current state. Have a look at the osggameoflife example.
> >>
> >> cheers jp
> >>
> >> On 21/02/11 16:52, "Martin Großer" wrote:
> >>> Hello,
> >>>
> >>> Have everyone experience with the gl shading language? I would
> >>> like to
> >> do something like that on my texture (I use render to texture):
> >>>
> >>> gl_FragData[0] += vec(0.01,0,0,1);
> >>>
> >>> Is that possible? I want to increment the color in my texture in
> >>> every
> >> render pass (in this case the red channel). I don't want to copy
> >> back to the cpu memory. And I use the FRAME_BUFFER_OBJECT. I guess
> >> the gl_FragData[0] is in every render pass zero (black). Is it
> >> possible to change that?
> >>>
> >>> Cheers
> >>>
> >>> Martin
> >>
> >> -- 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.  MailScanner thanks
> >> Transtec Computers for their support.
> >>
> >> _______________________________________________ osg-users mailing
> >> list [email protected]
> >>
> 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.  MailScanner thanks Transtec Computers for
> their support.
> 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Schon gehört? GMX hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://www.gmx.net/de/go/toolbar
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to