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

Reply via email to