Understanding the shader
Last updated
Last updated
What are these colored pixels you might be wondering??
The map needs these colored pixels to know wether to render the map on top right or left, or don't render at all but in the player's hands.
These four colored pixels works as a unique passcode due to their position and color combination, its nature makes it conflict-proof and the rendering will be always as expected!
As you see, the map is rendered on top right if it finds a combination of the following colors at those specific pre-determined points: BLUE - YELLOW - RED - GREEN
And on top left if it sees the other colors.
You'll be mainly editing this shader file, in which you can set these colors at MAIN_RIGHT_COLORS and MAIN_LEFT_COLORS.
You can simply edit the RGB values in the brackets.
File path: shaders/core/rendertype_text.vsh
We came up with a pretty decent default configuration, we suggest you to not change it unless you really need to due to other huds being displayed!
File path: shaders/core/rendertype_text.vsh (same as before)
Frames follows the similar concept of the pixel control, but this time we are putting the control pixel in the centre.
File path: shaders/core/rendertype_text.vsh (same as before)
The FRAME_ID_PIXEL tells Minecraft where to check for the red blob, essentially it checks for the position of the pixel control, in this case, in the middle.
The FRAME_COLOR_RIGHT sets the color of the pixel control that will render the frame on the right part.
The FRAME_COLOR_LEFT same thing, but for left.