Improved transitions (#642)

* Improved transitions

Code quality improvements.
Shape transitions now all scale down to 0 instead of 16 (mario and bowser).
Ease in was added which leads to far smoother transitions.
HD_TRANSITIONS define added, makes use of the tex edge render mode to deliver smooth transition textures.
lerpf was added to math utils.

* Cleaner textures, rounding only during vertex creation

* Another attempt

* cozies naming suggestion

* Improvements and suggestions

SHARP_TRANSITION_TEXTURES is now off by default (I still think the textures for it could be improved).
lerpf, to_smoothstop, smoothstart, smoothstop and smoothstep have all been added.
make_vertex has been inlined.
make_simple_vertex has been added (colourless vertex).
Transition colors (and canon colors) are now defined using primative colour instead of setting individual vertices color´s.
Transition´s now use smoothstep (ease-in-out) instead of ease out only.
Naming has been improved.

* Proper function inling and removal of GBI_FLOATS variant of make_vertex and make_simple_vertex

* More requested changes

* Accidental final new line removal fixed

* Comment about pop in fix.

* Comment fix

The issue with writing comments for stuff is when you want to change code later on.
This commit is contained in:
Lilaa3
2023-08-29 14:57:32 +01:00
committed by GitHub
parent 1e0498ba68
commit 5e9f8c7ee0
13 changed files with 369 additions and 239 deletions

View File

@@ -2673,6 +2673,25 @@ UNUSED ALIGNED8 static const Texture texture_radial_light[] = {
#include "textures/segment2/light_quarter_circle.ia16.inc.c"
};
#ifdef SHARP_TRANSITION_TEXTURES
const Texture texture_transition_star_half[] = {
#include "textures/segment2/transition_star_half.i8.inc.c"
};
const Texture texture_transition_circle_half[] = {
#include "textures/segment2/transition_circle_half.i8.inc.c"
};
const Texture texture_transition_mario[] = {
#include "textures/segment2/transition_mario.i8.inc.c"
};
const Texture texture_transition_bowser_half[] = {
#include "textures/segment2/transition_bowser_half.i8.inc.c"
};
#else
const Texture texture_transition_star_half[] = {
#include "textures/segment2/segment2.0F458.ia8.inc.c"
};
@@ -2688,6 +2707,7 @@ const Texture texture_transition_mario[] = {
const Texture texture_transition_bowser_half[] = {
#include "textures/segment2/segment2.11458.ia8.inc.c"
};
#endif
const Texture texture_waterbox_water[] = {
#include "textures/segment2/segment2.11C58.rgba16.inc.c"