Jump to content
  • Advertisement
Sign in to follow this  
zny_sssa2000

why SH need rotation?

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

Advertisement
If you're just using SH for representing irradiance environment maps then you don't need to rotate them, you can just rotate the normal into world space before using it to evaluate the lighting. If you're doing PRT though you have two sets of SH coefficients, one representing the lighting environment and one representing the transfer function on the surface of the object. In order to combine these by doing a dot product between the coefficents you need both representations to be in the same space. Typically your lighting environment will be in world space while the transfer functions will be in object space so you need to rotate one of them into the other space. This is usually done by rotating the lighting environment into object space per object on the CPU - otherwise you'd have to rotate the transfer function per vertex or per pixel into world space which would be very expensive - this is the reason why PRT doesn't really work for non rigid objects where each vertex has a local object space transform.

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.

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!