On Wed, 9 Jun 2021 18:46:16 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> The inconsistent illumination happens on Macs with retina displays only if >> the 3D shape is placed in a SubScene. The light sources are located with >> wrong coordinates in sub scenes and this causes a different illumination. >> The wrong coordinates for the light sources come from the fact that the >> retina pixel scale factors are not used in a SubScene. >> >> With this pull request, the retina pixel scale factors will be also used in >> SubScenes and this should resolve the bug >> [https://bugs.openjdk.java.net/browse/JDK-8255015](url) > > @andreas-heger Welcome to the `jfx` project. At a quick glance, the fix looks > promising. Have you tested this on Windows with Hi-DPI to make sure there is > no impact? Would you be able add an automated test case that fails (only on > Mac retina) without the fix and passes (on all platforms) with your fix? > Hi-DPI fixes are often tricky to test in an automated test, so if not, we can > use the existing manual test. > > @nlisker this is the same problem I noted while testing PR #334. Clearly I > had forgotten that it was not only a preexisting bug, but a known bug that > was already filed. I intend to test this alone and in connection with your PR. @kevinrushforth > The fix looks good. I tested it both in isolation and with PR #334 and it > works on both a retina and non-retina display. > > If you have time to write an automated test, that would be useful, but if not > then a manual test would be OK. 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. ------------- PR: https://git.openjdk.java.net/jfx/pull/531