Lab: Textured Model
In this lab, you will turn your project from rendering boring monochromatic surfaces to rendering detailed tapestries.
Adding Texture
Add color detail to one or more of your models by completing the following steps:
Include the texture coordinates in your
VertexAttributes
. These coordinates are read in with gltf.readModel
just like the positions and normals.
Temporarily render the model colored by its texture coordinates to verify that they are valid.
Read in the texture image, which should be adjacent to your glTF model.
Upload the texture to a texture object.
Perform a texture lookup to determine a fragment's albedo.
Restore your original lighting, this time using the albedo from the texture.
Submission
To receive credit for your lab work, follow these steps:
Share a post in the
#lab-gallery
channel on Discord a video of you moving around your world inspecting your textured models. Tag your group members.
Push your code to GitHub.
Only labs submitted on time will be granted credit. Late labs or forgot-to-submits are not accepted because Wednesday at noon is when your instructor has time to grade.