
Shaderboard
A Minecraft mod that exposes client-side scoreboard values to post-effect shaders via named bindings.
Список изменений
This update brings in more bindings that give post-effect shaders more information about the game environment, this time about the "local player" (aka the player character one plays as).
To keep things organized, I plan on writing a detailed documentation soon.
shaderboard:local_player_health
Provides information about the local player's health (in half-heart units), max health, and absorption.
Example JSON:
{
"uniform_name": "u_MyHealth",
"type": "shaderboard:local_player_health"
}
Example GLSL:
layout(std140) uniform u_MyHealth {
float health;
float maxHealth;
float absorption;
};
shaderboard:local_player_food
Provides information about the local player's food and saturation levels.
Example JSON:
{
"uniform_name": "u_MyDiet",
"type": "shaderboard:local_player_food"
}
Example GLSL:
layout(std140) uniform u_MyDiet {
int foodLevel;
float saturationLevel;
};
shaderboard:local_player_xp
Provides information about the local player's experience levels and points.
Example JSON:
{
"uniform_name": "u_MyXp",
"type": "shaderboard:local_player_xp"
}
Example GLSL:
layout(std140) uniform u_MyXp {
int expLevel; //xp level
float expProgress; //progress towards next xp level (0-1)
int expTotal; //total xp points (not just for current level; but for all levels combined)
};
shaderboard:local_player_air_supply
Provides information about the local player's air supply (player loses breath underwater).
Example JSON:
{
"uniform_name": "u_MyBreath",
"type": "shaderboard:local_player_air_supply"
}
Example GLSL:
//note: game measures air supply in ticks, not in air bubbles
//note: player has 10 air bubbles, where each bubble is worth 30 ticks
layout(std140) uniform u_MyBreath {
int airSupply;
int maxAirSupply; //as of '26.3', that's "300"
};
