Published on Friday, May 17, 2024
With my team, we wanted to personalize players experiences when they are joining our maps.
Placing our logo in the loading screen permits to add credits to a map without interupting the player experiences, but replacing the Mojang logo texture in the resources files doesn't change the loading screen.
Two shaders can affect the loading screen:
rendertype_position_color
which affects the background color of the loading screen.rendertype_position_tex
which affect the Mojang logo.An approach could be to hide the content of the logo, however gl_FragCoord
is not accessible inside of position_color
.
Thus, the approach I used has been to modify the verticies of the logo to enlarge it in order to cover the whole screen. Then I can draw basic shapes using gl_FragCoord
.
The second step has been to create a bunch of functions being able to replicate basic shapes using SDFs.
Once completed, I just remade the SVG version of the logo using the SDFs functions and booleans functions.