O'Reilly logo

WebGL Game Development by Sumeet Arora

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Applying Textures

In Chapter 3, Loading the Game Scene, we saw that our scene did not look very realistic. The reason was the use of one solid color on all the polygons of the object. Remember that we apply textures to surfaces to achieve the desired look and feel. This chapter covers the following topics on how to create, load, and apply textures to your scene:

  • Texturing basics
  • Loading textures and using them in fragment shaders
  • Texture filtering and wrapping
  • Loading objects exported from Blender
  • Mipmapping
  • Cubemap textures

Texturing basics

There are mainly three types of textures: 2D textures (most common), Cubemap textures, and 3D textures. 3D textures are rarely used in gaming applications and are mostly used in volumetric effects such ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required