Answer the question
In order to leave comments, you need to log in
Working with the image behind the canvas with WebGL
Hello. I study WebGl, in particular glsl shaders. Wrote a simple shader to blur an image. There were many tutorials on the web on this topic and it was not difficult to figure it out. The image that is specified in javascript is blurred. But if I want to blur what is behind the canvas on the page? Is it possible to do so? I understand that you need to render something into a texture and stretch this texture onto a rectangle that is in the canvas. But what should be used? Is it possible to write some kind of buffer into a texture and use it?
I'm not asking for ready-made solutions, I just would like to know if my idea is real and if so, how to implement it.
Thanks in advance, Denis.
Answer the question
In order to leave comments, you need to log in
In my opinion, this cannot be done. All rendering is done on the canvas element. For example, the wiki has the following "WebGL is the context of the HTML canvas element".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question