Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ahausknecht

macrumors newbie
Original poster
Jan 9, 2024
3
0
Hello,

I have run a JavaFx simple mesh program found on pages 254-267 of "JavaFx 8 Introduction by Example", by, C. Yea, M. Heckler, G. Grunwald, J. Pereda, and S. Philips, APress, 2014 in the follow execution environments:

a) A M1 MacBookAir with Mac OS 13.6.3 with no issues
b) A M2 MacBookPro with Mac OS 14.2.1 with serious PointLight-AmbientLighe rendering issues

I have attached screen snaps below:

a) No issues screen snap:

MeshApp-MacBookAirMacOS13.6.3.png



b) Rendering issues screen snap: See attached
MeshApp-MacBookProMacOS14.2.1.png



Have others had JavaFX issues with Mac OS 14.2.1? I trying to determine if this is a M1 issue, and M2 issue or an Mac OS 14.2.1 issue.

Thank you!
 

Attachments

  • MeshApp-MacBookProMacOS14.2.1.png
    MeshApp-MacBookProMacOS14.2.1.png
    33.9 KB · Views: 39

swiftkoala

macrumors newbie
Jan 16, 2024
2
0
I can confirm this issue on MacBookAir M2 on Sonoma 14.2.1:

Left side is: MacBookAir M2 Sonoma 14.2.1, Liberica full JRE 21
Right side is how it should look like, in this case on Ubuntu, Liberica full JRE 21

The problem only exists with a multi-color mesh. Filled or triangle surfaces with one color only are correctly displayed.

sonoma_jfx_3D_issue.png
 

ahausknecht

macrumors newbie
Original poster
Jan 9, 2024
3
0
Swiftkoala thanks for the example. I now think it is caused by Apple dropping support of OpenGL and moving to Apple Metal in Mac OS Sonoma. I just hope the JavaFX folks decide to support Apple Metal in the near future!
 

ahausknecht

macrumors newbie
Original poster
Jan 9, 2024
3
0
I have fixed my JavaFx PointLight rendering issue for both my basic JavaFX mesh program and my large JavaFx program:

It turns out that under Sonoma 14.3.1 on Silicon Macs, you need to specify both the ambient light color and the specular light color of a PhongMaterial object while under Ventura you need only
specify an ambient light color. Note that by default, the PhongMaterial constructor only requires you to specify the ambient light color. This indicates that the rendering calculations for PointLights and PhongMaterial are being done differently under Sonoma than under Ventura.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.