[Rev 01] RFR: 8217472: Add attenuation for PointLight
Nir Lisker
nlisker at openjdk.java.net
Fri Jan 3 19:32:35 UTC 2020
On Fri, 3 Jan 2020 05:17:26 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>> The pull request has been updated with 1 additional commit.
>
> 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.
-------------
PR: https://git.openjdk.java.net/jfx/pull/43
More information about the openjfx-dev
mailing list