Change Textures with WebGL

Switch sampler2D Texture Unit

This example demonstrates one solution to quickly change textures. Load, initialize, and prepare more than one texture. While 3D content runs, simply switch the texture unit assigned to a sampler2D.

Your browser doesn't support canvas.

WebGL Tutorials and Examples

Enjoy the free online in-depth WebGL book, WebGL Textures & Vertices: Beginner's Guide. Also see free WebGL tutorials.

  1. Useful techniques for education, games, scientific visualization, and architectural rendering.
  2. Works with WebGL enabled Web browsers including Windows PCs, iPhone 6, and current Androids. Most examples also work with Windows Phone operating system 8.1.
Copyright © 2015 Seven Thunder Software. All Rights Reserved.