Mathieu Brédif
Mathieu Brédif
PR updated : item 2 moved to its own PR #14663. Thanks @looeee for the pointers, I was not aware that the removal of the target feature had been debated...
# src I have reworked the approach and I am now quite satisfied with having `light.matrixWorld` as the single point of contact for the light geometry : - shadow cameras...
Good point, but IMHO that only means that the current getWorldDirection implementation is suboptimal... Provided matrixWorld is in sync, isn't it just a matter of reading the 3rd column ?...
See #14677 for the getWorldDirection optimization. Any clue on the test correction and on the example verification ?
Ok I figured out to fix the test (this.matrix was out of sync). This PR is now ready for testing/review !
As discussed in #14688, use `transformDirection` instead of `getWorldDirection` when `matrixWorld` is already up to date.
updated docs : [SpotLight](https://rawgit.com/mbredif/three.js/LightTargetOptional/docs/index.html#api/lights/SpotLight.target) and [DirectionalLight](https://rawgit.com/mbredif/three.js/LightTargetOptional/docs/index.html#api/lights/DirectionalLight.target). (I also removed the obsolete `Note about Position, Target and rotation` from DirectionalLight.) Is that closer to what you had in mind ?
1. ok, great 2. why not, but that would require to check the near/far values to check that the shadow camera still bounds the scene... 3. It is indeed a...
2- These calls to `normalize` were already there. Removing the normalization will move the cameras, which has a major effect for spotlights (modified direct light) and a minor effect for...
2. I gave it a try in #14708.