Using global.json file to alter sun's path generally works with ray tracing, however, near and during sunset and sunrise sun's light will appear to come from the opposite direction.
While the sun mesh/texture continues to follow the correct path as defined in global.json
Steps to re-produce:
1. Activate a ray tracing capable texture pack with sun azimuth modifier, I've attached an example global.json you can use for this purpose. (you can put it inside of a "lighting" folder within any ray tracing-capable resource pack for testing purposes)
2. Join any world, put a repeating command block down and type in /time add 50
and activate the command block, so we get a time-lapse of sun's path.
3. Observe the sun's movement, directional light follows sun's mesh/texture at most times of the day, but once we reach time periods I mentioned earlier, the directional light will suddenly switch to the opposite angle.
Expected result:
Directional lights should follow their texture as provided in global.json at all times of the day and night.
Additional Information:
Through lots of testing, I was able to track down the precise tick values/time periods where this bug happens.
During sunset, it happens from
5,050th tick
to
6,170th tick
and during sunrise it happens from
17,830th tick
to
18950th tick
In other words, it seems between these keyframe time periods in global.json, any positive value for sun's offset is set to negative, and negatives are set to positive for directional light of sky. while again, the sun texture follows the correct path.
I myself use keyframes of those ticks as a temporary workaround for my own texture packs by setting the offset to zero between these keyframes.
However, it would be great if this bug was fixed and global.json could properly be taken advantage of for ray tracing graphics mode, as this is a highly requested feature from the community as well:
Ability to change Sun Azimuth – Minecraft Feedback
Fixing this would properly fulfill this feedback post/feature request once and for all.
Attachments
Comments 4
Attached a test resource pack as well, see "Test-Pack.mcpack"
Activate it in any world or global resources settings then activate ray tracing.
Watch sun's path and directional light of sky during sunrise/sunset time periods,
This bug can no longer be reproduced in 1.21.30.21. However, this does not mean the issue has been resolved. Instead, it seems the capabilities of altering the sun path using global.json in both default and raytraced graphics modes have been entirely removed – in other words deferred-lighting related files have been isolated to Deferred Lighting with this latest beta, this is while some of the features could have had functionality in other places.
This is concerning because the ability to modify the sun azimuth is a highly requested feature by the community, as highlighted here: Ability to change Sun Azimuth – Minecraft Feedback
It would be greatly appreciated if this functionality could be reintroduced, as it is a significant improvement to ray tracing and was even shown in many demo and Microsoft docs images, but was never officially exposed to resource pack authors.