RFR: 8255015: Inconsistent illumination of 3D shape by PointLight
Nir Lisker
nlisker at openjdk.java.net
Mon Jun 14 11:20:55 UTC 2021
On Mon, 14 Jun 2021 11:05:25 GMT, Andreas Heger <github.com+85555697+andreas-heger at openjdk.org> wrote:
> Ok, I will try to write an automated test case which draws a sphere in a SubScene and then calculates the average color of the generated image. The test will be passed if the calculated average does not differ from the excepted average color by a certain tolerance value. I'm not sure if I will manage to do this... but I will give it a try.
You can look at such lighting tests in [this PR](https://github.com/nlisker/jfx/tree/8234920_Add_SpotLight_to_the_selection_of_3D_light_types/tests/system/src/test/java/test/javafx/scene/lighting3D). I suspect you will have to do something very similar. Since the scaling is off, I think that you can just sample a few points that have different colors with and without your patch.
As noted in the files, you will have to be careful with taking a snapshot in a subscene because of [JDK-8260013](https://bugs.openjdk.java.net/browse/JDK-8260013) (which I have just unassigned from myself because it doesn't seem like I will have time for it).
-------------
PR: https://git.openjdk.java.net/jfx/pull/531
More information about the openjfx-dev
mailing list