This was reported in an Italian forum, and I could check that it is really so.
With a specific path and a specific route, this is what is seen at game startup in the latest Testing release (but also in the Unstable release and in ORNYMG wher running at 64 bit): everything is OK
but when I press esc to start the run, what is seen outside of the loco is fully black (with the exception of the signal lights)
In this situation the dark remains also moving the train or changing cameras; the cone of light of the loco doesn't appear if one presses H.
Everything is OK In the Unstable releases preceding the switch to 64 bit, and in the ORNYMG releases when the "Run at 32 bit on Win64" option is selected.
Page 1 of 1
The mysteries of 64 bit operation
#2
Posted 09 October 2022 - 09:23 AM
Math precision leads to many traps. It came out that this calculation
can generate a cosine value that is slightly less than -1 (-1.00....09). This cosine is then used to compute an angle, which becomes a NaN. Therefore the vector of the sun positions has an entry with NaNs, which lead to a completely black picture.
Inserting a boundary check for solarAzimpthCosine solved the problem.
This will be available in next ORNYMG release as well as a PR for 1.5, being a very simple and harmless patch.
// Solar azimuth cosine. This is the Z COORDINATE of the solar Vector. double solarAzimuthCosine = -(Math.Sin(latitude) * solarZenithCosine - Math.Sin(solarDeclination)) / ( +Math.Cos(latitude) * Math.Sin(Math.Acos(solarZenithCosine)));
can generate a cosine value that is slightly less than -1 (-1.00....09). This cosine is then used to compute an angle, which becomes a NaN. Therefore the vector of the sun positions has an entry with NaNs, which lead to a completely black picture.
Inserting a boundary check for solarAzimpthCosine solved the problem.
This will be available in next ORNYMG release as well as a PR for 1.5, being a very simple and harmless patch.
#3
Posted 09 October 2022 - 11:14 AM
Page 1 of 1