Skip to main content
100%

Hello WebGL IV

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Apr 23, 2013

This example demonstrates WebGL fragment shaders rendering a digital image of a mandrill onto a canvas. The page compiles a vertex shader and a fragment shader, then uses the shader program to display the image as a texture on a square. It pulls the image data from a local `mandrill.jpg` file and uses the Canvas `getContext("webgl")` API to draw the textured quad with a `TRIANGLE_FAN`. The code explicitly manages buffers, shaders, and textures through the low-level WebGL context.

AI-generated description

Part four of my introduction to WebGL, wherein an image is displayed.

gpl-3.0 Licensed

Similar vizzes