Advanced Computer Graphics: Laboratory Project

<< PREV | INDEX | NEXT >>

Task 2D: Adjust Reflectivity

Preparation

Locate $TASK 2D in the CgFX file 'carscene-2.fx'.

Description

Most shiny objects are not completely reflective. Some percentage of the final color is a reflection of the environment and the remaining contribution comes from the material's diffuse properties. Factor in the diffuse color to decrease reflectivity.

The glossiness of the materials is stored in the alpha channel of the diffuse texture, where an alpha value of 0.0 represents full reflection and 1.0 no reflection at all. Note that since we use the alpha channel for both transparency and glossiness all transparent surfaces will have high specularity (such as the windows of the car).

Hint

Scale the environment map color sampled from the cubemap using the glossiness variable.

Build/run the application when you think you have completed this task.


<< PREV | INDEX | NEXT >>