Advanced Computer Graphics: Laboratory Project

<< PREV | INDEX | NEXT >>

Task 2B: Do a Cubemap Texture Lookup

Solution

return texCUBE(samplerEnvironmentBilin, cubeTexcoord);

The environment can now be seen reflected from the object:

Figure 6: Resulting image with environment mapping enabled.

Note that the reflection does not take the viewer's position into account (as you'll notice if you move the camera). This will be fixed in the next step by calculating the correct reflection vector.


<< PREV | INDEX | NEXT >>