Skip to content

Clear canvas on rerender to support transparent pixels

When the shader outputs alpha values that are smaller than 1.0, the tile canvas needs to be cleared before drawing the WebGL image. Since the output of the WebGL shader is simply drawn on top of the old output, it will otherwise shine through. I suggest to simply clear the canvas in the reRender method before drawing the WebGL output.

Merge request reports