A demo to visualize different blend modes. Takes in a shader and context attributes, and returns a GL context with a test image blended over a background.
Build an example where opt
can be:
- options for webgl-context (width, height, etc)
shader
which can be a function to create a shader (takinggl
as first parameter) or agl-shader
object
The canvas width and height defaults to the test texture size (512x512).
Re-renders the demo with the current shader.
The shader to use while rendering.
A reference to the canvas, which can be appended to the document body.
See stackgl/contributing.
MIT, see LICENSE.md for details.