[.WebGL-0x7fccc403c000]GL ERROR :GL_INVALID_OPERATION : glDrawElements: Source and destination textures of the draw are the same.
My GLSL skills are pretty basic, so this puzzles me. Does anyone know how to fix the error? The results I get from Googling suggest that it probably generates a ton of garbage.
I’ve seen this error when I’ve tried to capture the screen and apply the texture to a material that can be seen by the camera, creating a feedback loop of capturing something that I’m trying to write to.
As it only happens once, it might be to do with something on initialisation.
I’m on MacOS 10.14.6 running Chrome Version 78.0.3904.108
I just tried the demo on Firefox. Here I’m getting a similar error:
Error: WebGL warning: drawElements: Texture level 0 would be read by TEXTURE_2D unit 0, but written by framebuffer attachment COLOR_ATTACHMENT0, which would be illegal feedback.
So, I think when you say error you mean the yellow browser warning that starts with Error: etc right?
I was carried away when you said unfortunately in your initial post and thought that you got an actual JS error and the demo wouldn’t run.
Those WebGL errors aren’t that uncommon when doing shader dev, it doesn’t mean always a render stop error, can be also a warning on initialization. Especially if the code is executing with no issue.
I’d say still submit the issue for someone working on the internals of the engine to take a look at.
Yes, It’s indeed a warning. Except in the experimental Safari test – that was an actual error.
However, from what I’ve been reading about these types of GL errors, they could be generating garbage.
My concern is whether it would be safe to use in actual production. If the error could be fixed, that would definitely be preferred.
The error message appears in Safari because you’ve enabled the ‘WebGL 2.0’ experimental feature. Unfortunately Safari’s WebGL 2.0 support is incomplete. Disabling WebGL 2.0 will make the errors disappear.