In this section, we will look at two different examples. First, we will look at how you can use the canvas to create a simple texture and apply it to a mesh, and after that, we'll go one step further and create a canvas that can be used as a bump map, using a randomly generated pattern.
Rendering to a canvas and using it as a texture
Using the canvas as a texture
In the first example, we will use the Literally library (from http://literallycanvas.com/) to create an interactive canvas that you can draw on; see the bottom-left corner in the following screenshot. You can view this example at 09-canvas-texture. The following screenshot shows the example:
Anything that you draw on this canvas is directly...