English subtitles

← Two Tone Shading - Interactive 3D Graphics

Get Embed Code
3 Languages

Showing Revision 2 created 05/24/2016 by Udacity Robot.

  1. For this exercise you'll start with a fragment sheeter that performs diffuse
  2. sliding per pixel. I've hooked up a uniform called uBorder to the user
  3. interface. Change the program to instead compute the diffuse component as
  4. follows. If the dot project is greater than uBorder, then diffuse is 1.0. Else,
  5. diffuse is 0.5. Make sure to use floating point number and don't leave off the
  6. point 0 in 1.0. When you get this new code in place, it should look like this.
  7. Once you have the solution, try the border slider, and see the effect. If
  8. nothing for negative values of border, you might want to think about the effect
  9. of the max function.