LumaPictures / maya-to-hydra

This repo is no longer updated. Please see https://github.com/Autodesk/maya-usd
Other
10 stars 3 forks source link

Pr/fix shadow matrix #20

Closed digicpictures closed 6 years ago

digicpictures commented 6 years ago

Compute shadow matrix by multiplying world-to-light transform with light frustum projection matrix.

pmolodo commented 6 years ago

So, re: the shadow matrix fix - I think this is actually resolved by a PR I made against core USD, here:

https://github.com/PixarAnimationStudios/USD/pull/583

Sorry for not pointing you at this earlier.

This seemed the "better" way to solve this, since the SimpleLight structure is apparently designed to hold separate light xform and projection matrices (the methods are called "SetViewMatrix" and "SetProjectionMatrix")... also, we needed to maintain this separation in order to do PCSS shadowing.