Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : [2.0xx] How to set multiple render targets for a fragment shader?

$
0
0
I think that GLES 2.0 doesn't support multiple render targets. On the other hand, OpenGL desktop does support MRT (by writing to gl_FragData[0], gl_FragData[1], etc in the fragment shader), and the FrameBuffer class in the opengl renderer does allow you to attach several textures to an FBO. However the functionality is not used by the P2D/P3D renderers. You could enable it by subclassing your own renderer from PGraphicsOpenGL and overriding the initOffscreen() method and adding all the necessary code to attach textures to the color attachement points after 0.

Viewing all articles
Browse latest Browse all 1768

Trending Articles