DirectionalLight is not actually a directional light
See original GitHub issueDoes is matter that the DirectionalLight
is not actually a directional light?
Here’s a screenshot of a directional light lighting one face of a cube
![screen shot 2018-07-30 at 22 15 54](https://user-images.githubusercontent.com/234804/43399523-437b8e98-9446-11e8-8b45-496301d824f1.png)
Here’s the fiddle that’s from: https://jsfiddle.net/greggman/ae2yc7uj/
It’s clearly not a directional light. If it was a directional light it would be a solid color but you can clearly see it’s not a solid color. In order to produce the affect seen in the screenshot a position is needed. A direction light (in computer graphic terms) has no position so it’s impossible to render different lighting across a flat surface.
Is this a bug? Should the docs change to say a direction light is not actually a directional light?
Three.js version
- Dev
- r94
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
directional light pointing doesn't seem to be working #7965
I can't seem to get directional lights to point at anything other than 0,0,0 in r73: var directionalLight = new THREE.
Read more >Problems with DirectionalLight sources - OptiX
Hi, I have the problem that the parameters of a directional light are not set correctly. Usually there should be the variables in...
Read more >DirectionalLight – three.js docs
A light that gets emitted in a specific direction. This light will behave as though it is infinitely far away and the rays...
Read more >Definition of direction of directional light in custom shader of ...
the directional light is defined to illuminate from (0,0,0) to (0,1,0)``. Actually not, it's more like the light source is at (0,1,0) pointing...
Read more >About direction and postion in directionalLight - Questions
I found it will automatic calculate direction and position when directionalLight was initialized by direction. For example: var light = new ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@WestLangley’s explanation works for me.