How can I set up my WebGL state, framebuffer object and fragment shader so that I can read from a COLOR_ATTACHMENT0_WEBGL texture and then write the data (after doing some processing) to a COLOR_ATTACHMENT1_WEBGL texture? I have tried various methods but I always end up with a 'Source and destination textures of the draw are the same' error.I am relatively new to WebGL and GLSL and have been trying to implement real-time volumetric lighting as described in Chapter 17 of WebGL Insights by Muhammad Mobeen Movania and Feng Lin. I have made good progress understanding other aspects of the technique (after a lot of effort) but this particular problem has me stumped.
--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-list+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-list+unsubscribe@googlegroups.com.
--
--
On Oct 24, 2017, at 18:08, Muhammad Mobeen Movania <mmmo...@gmail.com> wrote:Hi Bob,This is Mobeen here. We use a single FBO with two color attachments. COLOR_ATTACHMENT0 has lightBuffer attached to it and COLOR_ATTACHMENT1 has eyeBuffer attached to it. During rendering when the eyeBuffer is used as render target, the lightBuffer is read from and in the second pass the lightBuffer is used as render target. AS to why we used a single FBO we were more focused on the technique itself in which we had to accumulate results slice by slice once into the eyeBuffer and then into the lightBuffer and using a single FBO did it for us.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-list+unsubscribe@googlegroups.com.