Reputation: 1564
I am hoping to create a webpage that has a shader effect, covering all of the DOM elements. I know it is possible to apply shaders to a canvas, but I would rather not create my entire page inside of a canvas. Does anyone know a good way to accomplish this? I am assuming, if it is possible, it will involve some concoction of various technologies and frameworks.
Upvotes: 4
Views: 3788
Reputation:
Maybe you seek for something like this HTML GL.
There is no easy way to "apply a shader" to the DOM... The DOM and WebGL are, natively, two entities that have nothing to say each other, two separated worlds, with their own logic, miraculousely joined together through the HTMLCanvasElement. The DOM is a very high-level abstraction layer, WebGL (thin abstraction layer over OpenGL) is a low-level abstraction layer.
This means that, except by using something like HTML GL, you have to implements yourself something to draw your DOM throught a canvas with WebGL...
Upvotes: 3