Jump to content
  • Advertisement
Sign in to follow this  
xujiezhige

Which space should the shade calculation occurs in, camera or world?

This topic is 2316 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

I find many samples take the shade calculation in camera space. But I am used to taking it in world space.

I want to know Is there any difference between them?mellow.png

Share this post


Link to post
Share on other sites
Advertisement
Ignoring precision, there shouldn't be any difference. In some cases it may be a bit cheaper to work in view space, since a few operations (such as operations involving the camera position) can be optimized better in view space. Or if deferred rendering is used, it's common to store normals in view space so that they can be compressed, in which case it's cheaper to not have to transform them back to world space.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!