I have a framebuffer with two textures t0
and t1
attached.
On the first pass I render to both of them with multiple fragment shader output.
Before the second pass I do thew following:
- Turn on a shader with one output only
- Bind
t1
to a texture unit - call glDrawBuffers to disable writing to
t1
's attachment
Note that t1
is used for sampling, but it's still bound to current framebuffer. As I understand, there are no loopbacks in such configuration.
Is it legal in both OpenGL and WebGL?
I made an example which works perfectly in Chrome and Firefox under Linux, but renders a black screen in both browsers for Windows. Is the reason in D3D-backed Webgl implementation, and it's aggressive texture unbinding as pointed here?