On Tue, 2 Aug 2022 07:36:11 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:
>> Yes, in `PsMath.h::computeLight`, there is a check if the light requests >> attenuation. In general, this is done only for directional lights (that are >> not attenuated), but in this case we know that this point light is not >> attenuated so passing 0 skips the redundant calculation. In theory this >> would improve performance, but because this light can only exist alone I >> don't expect anything measurable. > > I see 4 tests in `PointLightIlluminationTest` fail due to this change, on > MacOS and Windows. > Tests: > sphereLowerRightPixelColorShouldBeDarkRed > sphereUpperRightPixelColorShouldBeDarkRed > sphereUpperLeftPixelColorShouldBeDarkRed > sphereLowerLeftPixelColorShouldBeDarkRed > > Error: > expected:rgba(139,0,0,255) but was:rgba(180,0,0,255) > > The tests pass if isAttenuated is 1. I'll have a look. What command did you run this test with? Can you also test the point light attenuation under `tests\system\src\test\java\test\javafx\scene\lighting3D\PointLightAttenuationTest.java`? (I think there's a bit of a mess in the tests folders.) ------------- PR: https://git.openjdk.org/jfx/pull/789