Yes the baseTex is bound as input texture and it is also the render
target of the FBO. I thought I can use the blendequation for the
iterative adding of a texture. Did I misunderstood that?
With the blend equations you can mix and incoming fragment with the value stored in the framebuffer for the corresponding pixel/sample. For example, you can create a FBO with just a color buffer texture, clear it to 0 and then, for each incoming fragment, use additive blending to count fragments per pixel. You can't use a texture as both input and output because the results are completely undefined. The memory pipeline is deep and blending operations are performed in special hardware units closely coupled to the memory controller. Add texture caches to the picture and it becomes impossible to predict what might happen if you write non-conformant code. In your case, the typical results are what you were seeing yesterday, the texture doesn't seem to get updated or you get a funny recursive pattern. If you want to add two (or more) textures, then attach each texture to a different quad and create an extra texture as the framebuffer target. You will have to ping-pong the output texture and one of the input textures if you are going to use only two input textures and repeat the procedure iteratively.

Juan
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to