What Is Texture Mapping?

Texture mapping is simply a method for adding detail to a geometry being rendered by displaying an image on the surface. Consider the following screenshot:

Using only the techniques we've learned so far, this relatively simple scene would be very difficult to build. The WebGL logo alone would have to be carefully constructed out of many triangle primitives. Although this is a possible approach, the additional geometry construction would be impractical for a marginally complex scene.

Fortunately, texture mapping makes such requirements incredibly simple. All that's required is an image in an appropriate file format, an additional vertex attribute on the mesh, and a few additions to our shader code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.62.45