Reputation: 788
I am rendering frame, fragment color is based on two textures, i woudl like to increment value of one of textures in one pass, i mean can i run one program on two framebuffers in one pass?
like gl_fragmentColor1 and gl_fragmentColor2, but gl_fragmentColor2 is bound to second framebuffer, or can i write to texture using sampler2d in some way? Currently i am using color array passed as attribute to shader and calculating color changes on cpu, but approach witch texture is a lot faster, problem is that i cant decrement pixel value when i want
Upvotes: 0
Views: 553
Reputation: 473192
OpenGL ES does not allow you to render to multiple textures at once. So no. There may be an extension available, but it would probably only work for NVIDIA hardware.
Upvotes: 2