Advertisement Jump to content
Sign in to follow this  

why SH need rotation?

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

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, 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!