Closed FlashyReese closed 1 year ago
This PR still requires a bit of testing before it can be merged.
This latest commit replaces the transitionSpeed
property with transitionInDuration
and transitionOutDuration
which are now in ticks for ultimate precision! Just a friendly reminder, some resource packs that were using transitionSpeed
may have trouble, but don't worry, we made sure the default fade transition speed is set to 20 ticks (1 second) for them. The reason for this change was to make things even more precise and avoid any unhappy accidents from the previous property.
Refactor Summary
In this refactor, several changes have been made to improve the game's blending and transition systems.
darken
andlighten
blend modes, which were causing issues in the game. A custom blend equation functionality has been implemented to set the shader color with an alpha channel of1.0F
.transitionSpeed
property foralwaysOn
skyboxes and to respect themaxAlpha
value, which was previously not always being respected and set to1.0F
.transitionSpeed
property has been removed in favor oftransitionInDuration
andtransitionOutDuration
, which now take the duration in ticks instead.Breaking Changes
Please be aware that these changes will break resource packs that have used the
transitionSpeed
property. The default fade transition speed has been set to 20 ticks (1 second) for such resource packs that now usetransitionInDuration
andtransitionOutDuration
. The change also breaks resource packs that used the blend modesdarken
andlighten
.Motivation
The motivation behind these changes is to improve the precision of transition durations and to resolve issues with blending and transition systems in the game. By using
transitionInDuration
andtransitionOutDuration
, more control can be exercised over the transition durations. Additionally, moving the alpha calculation to the main thread and improving the fade system will help ensure that transitions occur consistently and properly respect themaxAlpha
value.