Every time I try to draw a quad with a shader, I get an error on Chrome:
1190937:1 [.WebGL-0xb000ee6300] GL_INVALID_OPERATION: Feedback loop formed between Framebuffer and active Texture.
This is because the shader thinks I am trying to read the data from a texture that is currently being written to, even though I don’t. Do I need to explicitly change the FBO or unbind the texture? Both drawFullscreenQuad
and drawQuadWithShader
are giving me this.
Here are my steps:
const texture = new pc.Texture(...);
const target = new pc.RenderTarget(...); // using new texture
const shader = new pc.Shader(...);
pc.drawQuadWithShader(device, target, shader);
@mvaligursky any advice?
I can write/read pixel data from a texture by using device.setRenderTarget
without errors, e.g.:
const old = device.renderTarget;
device.setRenderTarget(target);
device.updateBegin();
// process
device.readPixels(0, 0, width, height, colors);
device.updateEnd();
device.setRenderTarget(old);