Changelog
So... what's Luminance? Luminance is a library mod that helps with shader rendering. It helps mod developers setup shader rendering so they can focus on the shaders themselves! Luminance also adds Dynamic Uniforms, which allow developers to pass information to their shaders - we also include some default ones!
Are you a user that wants to see Luminance in action?
Try out Souper Secret Settings by Nettakrim, or Perspective by dannytaylor!
Luminance Documentation hasn't been written yet (it's on the top of our todo list!), however both Souper Secret Settings and Perspective are both open source so you can always see how we use it!
You can also check out our Resourcepack Guide which explains how to create a luminance shader resource pack.
Luminance Shader Resource Reloader Format
To make things simple, we've added a new resource to resource packs, which is located at assets/<namespace>/luminance/<id>.json
.
{
"post_effect": "namespace:id", // defaults to `modid:shaderid` of the json file if not specified, this specifies the location of the post effect json.
"enabled": true, // defaults to true, specifies whether the shader can be used.
"disable_ui_rendertype": true, // defaults to false, specifies whether the shader can be rendered using the `UI` render type.
"registries": [ // If not provided, the shader will be registered to "luminance:main", if you do provide this, it will only be registered to the specified registries.
"luminance:main" // This is the default registry, most mods using Luminance should be using this.
]
"custom": {
"namespace": {} // defaults to new JsonObject(), can be obtained in the `ShaderRegistryEntry`.
}
}
Dynamic Uniforms
We include some default dynamic uniforms that any mod using Luminance can use in their shaders!
id | type | sub-uniforms | config |
---|---|---|---|
luminance_panoramaAlpha |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_hudHidden |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isInGui |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_viewDistance |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_fov |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_fps |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_graphicsMode |
float(0.0 -2.0 ) |
||
luminance_eye |
vec3 | _delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_eye_fract |
vec3 | _delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_pos |
vec3 | _delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_pos_fract |
vec3 | _delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_cam |
vec3 (sub-uniforms are float) | _x _y _z |
|
luminance_cam_fract |
vec3 (sub-uniforms are float) | _x _y _z |
|
luminance_pitch |
float(-90.0 -90.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_yaw |
float(-180.0 -180.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_clipping |
float(0.0 +) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_velocity |
float(0.0 +) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_currentHealth |
float(0.0 -luminance_maxHealth ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_maxHealth |
float(0.0 +) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_currentAbsorption |
float(0.0 -luminance_maxAbsorption ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_maxAbsorption |
float(0.0 +) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_currentHurtTime |
float(0.0 -luminance_maxHurtTime ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_maxHurtTime |
float(0.0 +) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_currentAir |
float(0.0 -luminance_maxAir ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_maxAir |
float(0.0 +) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isAlive |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isDead |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isSprinting |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isSwimming |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isSneaking |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isCrawling |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isInvisible |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isWithered |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isPoisoned |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isBurning |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isOnGround |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isOnLadder |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isRiding |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_hasPassengers |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_biomeTemperature |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_alpha |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_perspective |
float(0.0 -3.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_selectedSlot |
float(0.0 -8.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_score |
float(0.0 +) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_skyAngle |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_sunAngle |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_isDay |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_starBrightness |
float(0.0 -1.0 ) |
_delta , _prev , _smooth , _smooth_delta , _smooth_prev |
|
luminance_time |
float(0.0 -1.0 ) |
period |
|
luminance_random |
float(0.0 -1.0 ) |
Custom Mod Menu Icon
Luminance adds a way to change the icon used for your mod. Want a custom icon that only shows on October 31st? You can do that:
CompatHelper.addOverrideModMenuIcon(new Couple<>("modid", "halloween"), () -> "assets/modid/icons/halloween.png", () -> LocalDate.now().getMonth() == Month.October && LocalDate.now().getDayOfMonth() == 31);
You can also add a Luminance badge to your mod using:
addLuminanceModMenuBadge("modid");
Iris Shaders Compatibility
You can render both Luminance and Iris shaders at the same time!
You can also check if Iris has shaders enabled by using CompatHelper.isIrisShadersEnabled()
Licenced under LGPL-3.0-or-later
Developer's note
We're working on a way for one jar for both quilt, and fabric (and eventually neoforge - that's going to take some time though!). If you have any thoughts, please share them here!