Commits

Jason McKesson  committed 946f8d5

Tut10: Preventing divide by zero.

  • Participants
  • Parent commits c970ac3

Comments (0)

Files changed (1)

File Tut 10 Shinies/Gaussian Specular Lighting.cpp

 
 		if(IsGuassianLightModel())
 		{
-			//Clamp to 0, 1.
-			theParam = std::max(0.0f, theParam);
+			//Clamp to (0, 1].
+			theParam = std::max(0.00001f, theParam);
 			theParam = std::min(1.0f, theParam);
 		}
 		else