[Rev 01] RFR: 8217472: Add attenuation for PointLight
Kevin Rushforth
kcr at openjdk.java.net
Fri Jan 3 22:21:16 UTC 2020
On Fri, 3 Jan 2020 19:32:23 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/PointLight.java line 41:
>>
>>> 40: * unless it belongs to a {@code Shape3D} outside of its {@code scope}.
>>> 41: * <p>
>>> 42: * The light's intensity can be set to decrease over distance by attenuating it. The attenuation formula
>>
>> Can the behavior be explained in terms of `Shape `or `Node `instead of `Pixel`.
>> May be something like this,
>>
>> `Any node within the range of the light will be illuminated by this light, except the nodes that are added to the exclusion scope of this light.`
>
> The issue is that range and attenuation work on the pixel scale, not on the node/shape scale. A node can be partially illuminated if only part of it is within the range of the light. See the image in the comment above.
Right. This needs to talk about pixels. Perhaps there is a way to make it more clear that we are talking about pixels that are part of a rendered Shape3D, but I don't have a good suggestion right now.
-------------
PR: https://git.openjdk.java.net/jfx/pull/43
More information about the openjfx-dev
mailing list