Jump to content
  • Advertisement
Royma

3D How should I combine diffuse color and specular color to ensure conservation of energy

Recommended Posts

Now I'm tring to implement a PBR lighting shader.I've learnt that I should calculate the BRDF, then multiply it with light color and cos theta according to the rendering equation.Now I need to ensure all the diffuse and specular are less than 1.A simple method is to calculate the specular brdf first,then the income of diffuse are only 1 - specular.But when I use the cook torrence model I can only calculate one specular ray in current direction, but there are a lot of rays are reflected in other directions at the same time.If I use 1- current specular ray, I can only ensure all the diffuse and this specular light are less than 1,but how can I ensure all the reflected rays and the diffuse light are less than 1?

Edited by Royma

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!