Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v2]

2021-12-18 Thread Kevin Rushforth
On Sat, 18 Dec 2021 16:32:53 GMT, Kevin Rushforth 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. >>

Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v2]

2021-12-18 Thread Kevin Rushforth
On Sat, 18 Dec 2021 16:12:16 GMT, Kevin Rushforth wrote: >> Initially I went with the equality test, but it did not work well, probably >> since we are comparing floating points. This just seemed safer. If you want >> to try the equality test on you machine(s) it would be interesting, but I >>

Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v2]

2021-12-18 Thread Nir Lisker
On Sat, 18 Dec 2021 16:34:21 GMT, Kevin Rushforth wrote: >> 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. > >

Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v5]

2021-12-18 Thread Nir Lisker
> Adds a directional light as a subclass of `LightBase`. I think that this is > the correct hierarchy for it. > > I tried to simulate a directional light by putting a point light far away, > but I got artifacts when the distance was large. Instead, I added an on/off > attenuation flag as the 4t

Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v2]

2021-12-18 Thread Kevin Rushforth
On Sat, 18 Dec 2021 16:00:24 GMT, Nir Lisker wrote: >> modules/javafx.graphics/src/main/native-prism-d3d/hlsl/psMath.h line 106: >> >>> 104: >>> 105: void computeLight(float i, float3 n, float3 refl, float specPower, >>> float3 L, float3 lightDir, in out float3 d, in out float3 s) { >>> 106:

Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v2]

2021-12-18 Thread Nir Lisker
On Tue, 7 Dec 2021 16:38:03 GMT, Kevin Rushforth wrote: >> Nir Lisker has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update copyright year > > modules/javafx.graphics/src/main/native-prism-d3d/hlsl/psMath.h line 106: > >> 104: >> 105:

Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v4]

2021-12-18 Thread Nir Lisker
> Adds a directional light as a subclass of `LightBase`. I think that this is > the correct hierarchy for it. > > I tried to simulate a directional light by putting a point light far away, > but I got artifacts when the distance was large. Instead, I added an on/off > attenuation flag as the 4t

Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v3]

2021-12-18 Thread Nir Lisker
> Adds a directional light as a subclass of `LightBase`. I think that this is > the correct hierarchy for it. > > I tried to simulate a directional light by putting a point light far away, > but I got artifacts when the distance was large. Instead, I added an on/off > attenuation flag as the 4t

Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v2]

2021-12-18 Thread Kevin Rushforth
On Sat, 18 Dec 2021 15:28:48 GMT, Nir Lisker wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/scene/DirectionalLightHelper.java >> line 2: >> >>> 1: /* >>> 2: * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. >> >> 2021 > > Can the script do all these corr

Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v2]

2021-12-18 Thread Nir Lisker
On Tue, 7 Dec 2021 16:22:25 GMT, Kevin Rushforth wrote: >> Nir Lisker has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update copyright year > > modules/javafx.graphics/src/main/java/com/sun/javafx/scene/DirectionalLightHelper.java > lin