RFR: 8234920: Add SpotLight to the selection of 3D light types [v22]
Nir Lisker
nlisker at openjdk.java.net
Sun Jun 13 23:08:23 UTC 2021
On Fri, 11 Jun 2021 12:54:43 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>> Nir Lisker has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Addressed review comments
>
> modules/javafx.graphics/src/main/native-prism-d3d/D3DLight.cc line 50:
>
>> 48:
>> 49: bool D3DLight::isPointLight() {
>> 50: return falloff == 0 && outerAngle == 180;
>
> The range for the SpotLight properties is,
> `{@code 0 <= innerAngle <= outerAngle <= 180} and {@code falloff >= 0};`
> A SpotLight can be defined as , innerAngle= 30, outerAngle= 180 and falloff= 0. This light will be treated as a PointLight. Do we need also need to check if innerAngle == 0 ?
I don't think so. If the falloff is 0 then the spotlight factor is 1, so points in the inner cone and outer cone are treated the same,
-------------
PR: https://git.openjdk.java.net/jfx/pull/334
More information about the openjfx-dev
mailing list