O'Reilly logo

WebGL Beginner's Guide by Brandon Jones, Diego Cantor

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

Time for action — trying different wrap modes

  1. Open the file ch7_Texture_Wrapping.html using your HTML5 Internet browser.
    Time for action — trying different wrap modes
  2. The cube shown has texture coordinates that range from -1 to 2, which forces the texture wrapping mode to be used for everything but the center tile of the texture.
  3. Experiment with the controls along the bottom to see the effect that the different wrap modes have on the texture.

What just happened?

Let's look at each of the wrap modes and discuss how they work.

CLAMP_TO_EDGE

CLAMP_TO_EDGE

This wrap mode rounds any texture coordinates greater than 1 ...

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