RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v2]
Kevin Rushforth
kcr at openjdk.java.net
Sat Dec 18 16:40:04 UTC 2021
On Sat, 18 Dec 2021 16:32:53 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> It seems safer then to either leave it the way you have it (in which case, please a comment), or change it to `abs(gLightAttenuation[i].w) < EPSILON` both here and in the Java code (for consistency). I'll leave it up to you.
>>
>> For spot light, you might want to file a new bug to address the `falloff != 0` problem.
>>
>> I agree about deferring the performance question.
>
> Btw, you don't need the "abs" for the gLightAttenuation check (you don't have it now when checking against 0.5) so you can just change it to `gLightAttenuation[i].w < EPSILON` which seems cleaner than testing against 0.5.
I see you kept it as 0.5 and documented it. That's fine, too.
-------------
PR: https://git.openjdk.java.net/jfx/pull/548
More information about the openjfx-dev
mailing list