When using the shader with aframe > 1.3.0
9 times out of 10 I get the following errors:
Firefox: WebGL warning: texSubImage: Offset+size must be <= the size of the existing specified image.
Chrome: _INVALID_VALUE: Offset overflows texture dimensions.
The shader creates a canvas with dimensions 2x2 and then updates it.
The issue is caused by the modification of the dimensions of the canvas.
So my fix is to use the right canvas dimensions from the get go.
When using the shader with aframe > 1.3.0 9 times out of 10 I get the following errors: Firefox: WebGL warning: texSubImage: Offset+size must be <= the size of the existing specified image. Chrome: _INVALID_VALUE: Offset overflows texture dimensions.
The shader creates a canvas with dimensions 2x2 and then updates it. The issue is caused by the modification of the dimensions of the canvas. So my fix is to use the right canvas dimensions from the get go.
Replace these lines:
with these:
Happy coding !