Sign in to follow this  
xujiezhige

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

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?[img]http://public.gamedev.net//public/style_emoticons/default/mellow.png[/img]

Share this post


Link to post
Share on other sites
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

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

Sign in to follow this