[jfx-tests] RFR: 8315842: 3D tests fail because of edge pixel differences
Ajit Ghaisas
aghaisas at openjdk.org
Fri Sep 8 12:17:50 UTC 2023
On Thu, 7 Sep 2023 10:17:28 GMT, Jayathirth D V <jdv at openjdk.org> wrote:
> Out of 62 3D tests, 26 tests fail because of minute color differences in edge pixels.
> These tests are used to verify 3D rendering with different parameters like translation, rotation.
>
> So adding little color tolerance will not change the test behavior and allows us to use these tests to automatically verify any regression introduced in 3D rendering.
>
> Added 5% color tolerance and with this change 23 of these tests pass.
>
> Some sub-tests under below 3 tests continue to fail because of other reasons:
> [test/scenegraph/fx3d/camera/fixedeye/PerspectiveCameraFixedEyeIsolateTest.java](file:///Users/jdv/dev/workspace/jfx/jfx-tests/functional/3DTests/build/test.workdir/test/scenegraph/fx3d/camera/fixedeye/PerspectiveCameraFixedEyeIsolateTest.jtr)
> [test/scenegraph/fx3d/camera/parallel/ParallelCameraIsolateTest.java](file:///Users/jdv/dev/workspace/jfx/jfx-tests/functional/3DTests/build/test.workdir/test/scenegraph/fx3d/camera/parallel/ParallelCameraIsolateTest.jtr)
> [test/scenegraph/fx3d/camera/perspective/PerspectiveCameraIsolateTest.java](file:///Users/jdv/dev/workspace/jfx/jfx-tests/functional/3DTests/build/test.workdir/test/scenegraph/fx3d/camera/perspective/PerspectiveCameraIsolateTest.jtr)
>
> Also i see that some of the camera tests just draw white images, this also needs to be verified.
> With this change 41 out of 62 3D tests will run properly.
A static constant can be added to `test.scenegraph.fx3d.utils.FX3DAbstractApp`
public static final float COLOR_TOLERANCE = 0.05f;
This can easily be accessed in test classes without FX3DAbstractApp instance as -
`Root.ROOT.getEnvironment().setProperty(ImageComparator.class,
new GlassPixelImageComparator(new PixelEqualityRasterComparator(FX3DAbstractApp.COLOR_TOLERANCE)));`
This will allow us to tweak the tolerance value at a single place in future and not in all the 26 files.
This change is pretty safe as and just a sanity check would be needed.
If a test does not use FX3DAbstractApp, then you can keep the hard-coded constant.
-------------
PR Comment: https://git.openjdk.org/jfx-tests/pull/5#issuecomment-1711576867
More information about the openjfx-dev
mailing list