WebGL - Introduction to Textures

In this episode, I introduce textures and how they work in WebGL.

Concepts:
Introduction to Textures
* texture mapping
* texel (texture elements) (texture pixels)

4 steps:
* prepare image
* specify image mapping
* load texture image and configure for webgl
* extract texels from image in fragment shader

Texture coordinates
* [0,0] lower left
* [0,1] upper left
* [1,0] lower right
* [1,1] upper right

Resources:
* https://github.com/davidwparker/programmingtil-webgl/tree/master/0047-intro-texture

© programmingtil.com