Advertisement Jump to content

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

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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!