HemisphereLight direction uniform
We are using a HemisphereLight.position property to define a direction to HemisphereLight normals, but that doesn't seem entirely appropriate to me, since it's an angle, and angle is .rotation/.euler.
I think that we could use .getWorldDirection() instead of .position?
Can I start like this on WebGPU?
WebGL Code: https://github.com/mrdoob/three.js/blob/8db7a598ed6e71538e286e5c56c02cc5823157dc/src/renderers/webgl/WebGLLights.js#L530-L532
Yes, using the position property to define the orientation of the HemisphereLight is unusual.
If a change is desired, I think the most logical API would be to use the .up property instead, but I am not sure it is worth changing.
This line is redundant.
uniforms.direction.normalize();
Related #16555.
It seems users find it confusing that HemisphereLight does not react when changing its rotation properties. On the other hand, #16555 pointed out that ambient and hemisphere lights are in fact simplified light probes which do not have a rotation by definition.
BabylonJS uses a separate direction vector for the definition of a hemispheric light. It seems using Object3D.up could be indeed a proper alternative.
so you find using hemi.position weird, but directional light is fine lol
It was previously discussed to remove the target property and orient directional and spot lights as you would expect. There is an existing PR but I've lately implemented this feature by myself to better understand the change: https://github.com/Mugen87/three.js/commit/a2a8005d18012f90929060ddd9d5b288c4e6da60
Unfortunately, such a change will noticeably impact user code. You can easily see this at the number of examples that break which the PR.