Introduction to WebGL Textures
After this session, you will be able to:
- use textures in a WebGL application
- tune texture coordinates
- choose minification and magnification filters
This session is based on WebGL lessons 5 and 6 of Giles Thomas and Tony Parisi. Use LibreOffice to write your document.
Read Lesson 5 and answer the following questions:
- What is a texture ? What are they used for ? (2-3 sentences)
- Briefly explain each instruction used to load and define a texture (1-2 sentences for each)
- Use the dice texture image below to create a dice using a
textured cube. In the document, write the 3d and texture coordinates of
the 8 corners of the cube.
- Use the brick image below to cover each face of the cube with 8x16 bricks
|
|
Texture of a dice
|
Brick texture
|
Read Lesson 6 and answer the following questions:
- What are the advantages and the drawbacks of the NEAREST filter ? Use screen captures to illustrate the problems
- What are the advantages and the drawbacks of the LINEAR filter ?
Use screen captures to illustrate the advantages over LINEAR, and the
remaining problems
- What are the advantages and the drawbacks of mipmaps ? Use screen captures to illustrate the advantages over LINEAR
Francois Faure,
University of Grenoble. Main page