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:
![](https://static.packt-cdn.com/products/9781788833288/graphics/assets/e2ffc6f7-fc5d-4ace-896d-f2f2e01c5225.png)
Anything that you draw on this canvas is directly...