Jump to content
  • Advertisement
Sign in to follow this  
hick18

Lambert shading

This topic is 3171 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So the Diffuse exitance of the Lambert equation is: DiffuseColour(x)(Irradiance*cos(theta)) I think I understand this. Its just measuring the light power at a plane parallel to the light direction to get the Irradiance over a unit area. Which is the maximum amount of light energy a surface could recieve, due to the fact its perpendicular with the light direction. This is then scaled by the actual angle of the surface to the light. But then the next step is to divide this by pie. Why is this so?

Share this post


Link to post
Share on other sites
Advertisement
Pi is a mathematical constant, pie is a dessert. Critical distinction :)

To answer your question, we do this division in order to account for the fact that while reflected radiance is given over the entire hemisphere (and uniformly so for Lambertian shading) we're interested only in what's coming our way and not all that extra stuff reflected off into other directions. You generally won't see this division too often in real-time shaders simply because it's possible to account for this in the light intensity, but it is implied.

Share this post


Link to post
Share on other sites
Hah ! Im always doing that :P

I thought it may have something to do with the integral over the hempisphere. Would anyone mind going over how it is derived though?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!