Hello Juan,

I think in my case the ping-pong is OK, because I want to render a fullscreen 
quad. I developed a texture painting tool which is hardware accelerated. I can 
do it very easy with a glsl shader. Only the RTT into the image is the bottle 
neck.

I will try the three versions.

1. OSG: PingPong
2. OSG: Blending
3. OpenGL: EXT_shader_image_load_store

I will post my results here in the mailing list. Then we can talk about the osg 
integration.

It seems to me that the discussion was very useful. Thank you very much.

Regards,

Martin

-------- Original-Nachricht --------
> Datum: Tue, 22 Feb 2011 13:23:26 +0100
> Von: Juan Hernando <[email protected]>
> An: OpenSceneGraph Users <[email protected]>
> Betreff: Re: [osg-users] Can I increment the gl_FragData?

> Hi Martin,
> > I don't understand the fact that I need a swap per triangle. In the
> > osggameoflife there is one swap per render pass.
> It depends on what you want to do.
> If you are rendering a fullscreen quad and performing some pixel level 
> operations, then ping-pong textures are OK. This is the case of the game 
> of life example.
> However, if you are combining into each target pixel the contribution of 
> all the triangles that hit that pixel, then you can't use ping-pong 
> because you have to swap the read and write textures after each triangle 
> (I assume you are not binding the same texture as input and output for a 
> shader because it has undefined behaviour). For example, this would be 
> the case when you want to count the fragments falling into a pixel. If 
> you can't use blending operations to do your calculations, then 
> EXT_shader_image_load_store may be the last resort.
> 
>  > So my object is for
>  > example a wall (plane) and I want to add a texture (brush) to this
>  > wall like a airbrush. That is a simple test scenario.
> Assuming your wall is screen aligned, I'd say that this airbrush example 
> falls in the category of blending. However, if your actual intent is to 
> develop a realtime texture painting tool then, it might be easier to do 
> it in completely in the CPU (I'm not an expert in texturing so there 
> might be some clever tricks to take advantange of OpenGL to do it with 
> random access image buffers).
> 
> > Ok first of all I should try the additive blending with osg::TexEnv.
> > After this I can try a example with the extension
> > EXT_shader_image_load_store. I have a NV GTX470, it should work. And
> > then we can talk about a integration in OSG. I can send the example
> > and we can discuss a suitable design. I am very interested in a
> > smoothly integration in OSG.
> Me too ;)
> 
> Cheers,
> Juan
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!                       
Jetzt informieren: http://www.gmx.net/de/go/freephone
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to