c++ - OpenGl read and write to the same texture -


I have a RGBA16F texture with depth, normal. X, normal on it I want to read R, G, B and write one on the texture. I will hit every pixel right once.

If I read and write the same texture in this matter, could there be a performance problem?

Post text "itemprop =" text ">

There will be no performance problem. As an functionality issue , this will not work. < P> You can not read an image that you are writing through FBO and hoping to get the right results. This yield is undefined behavior.

If you want to read / write to shader_image_load_store If you were using, you can participate with it. But still, it is a read / modified / It is being said that if you are certain that you "every pixel absolutely once "(emphasis), you have a support i.e., do not let" NV "on this extension fool you; It is also widely applied to AMD hardware (all HD-Series cards) This extension gives you the "barrier" function (effectively a function that frees Buffer and texture tells the GPU to clear the cache), after making a call, you read a to read / modify your pieces in shader / write that after a pass , You need another obstacle between that and the other near.

Comments