All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Luminance

Luminance

by dannytaylor • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Luminance

About

Luminance is a library mod that is primarily designed to help other mods with shaders.

As a user, you should only need to install this if a mod requires it.

Features

  • Adds Dynamic Shader Uniforms
    • These let post-processing shaders have more information about what's happening in-game.
    • Luminance comes with a bunch of these by default, but you can add your own too!
  • Adds shaders that have been used in previous minecraft versions.
    • Requires Perspective or Souper Secret Settings.
    • Luminance takes care of rendering shaders, so you don't have to!
    • You can check if Iris Shaders are enabled using Luminance.
      • This means you don't have to have Iris added to your development environment!
    • You can replace your ModMenu icon using Luminance!
      • Make your mod icon change depending on the time of year, or via a config option, anything's possible!

Dependencies

  • Fabric API or Quilted Fabric API (QFAPI)
    • fabric-resource-loader-v0
    • fabric-key-binding-api-v1
    • fabric-lifecycle-events-v1
  • Java 21 or later.
    • Built with the Microsoft build of OpenJDK 21.0.2.

How to add Luminance to your mod:

  1. Add the following lines to the repository section of your build.gradle:
    exclusiveContent {
         forRepository {
             maven {
                 name = "Modrinth"
                 url = "https://api.modrinth.com/maven"
             }
         }
         filter {
             includeGroup "maven.modrinth"
         }
     }
  2. Add the following line to the dependencies section of your build.gradle:
    include(modImplementation "maven.modrinth:luminance:${project.luminance}")
  3. Add the following line to your gradle.properties:
    1. Replace 1.0.0-rc.1+1.21.4-fabric with the latest version of Luminance!
      1. This can be found on the version page on Modrinth.
        luminance = 1.0.0-release.1+1.21.4-fabric
        #luminance = 1.0.0-release.1+1.21.4-quilt
  4. Reload gradle and you're ready to use Luminance!

Also check out

Our GitHub Page
Perspective by dannytaylor
Souper Secret Settings by Nettakrim
Luminance Mod Collection

Licensed under LGPL-3.0-or-later.

This mod is not affiliated with/endorsed by Mojang Studios or Microsoft.
Some game assets are property of Mojang Studios and fall under Minecraft EULA.

How to Install Luminance (Mod)

Luminance by dannytaylor is verified for Fabric, Quilt across Minecraft versions 1.20.5, 1.20.5-rc2, 1.20.5-rc3, 1.20.6, 1.21, 1.21.1, 1.21.11, 1.21.4 (latest release: 1.1.0-beta.8+fabric-1.21.11, file size: 828 KB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (1.20.5, 1.20.5-rc2, 1.20.5-rc3, 1.20.6, 1.21, 1.21.1, 1.21.11, 1.21.4) and platform (Fabric, Quilt).
  2. Make sure you have the compatible loader or environment installed for Fabric, Quilt.
  3. Move the downloaded Luminance file into your Minecraft .minecraft/mods folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.21.11
Fabric
3mo ago 1
1.21.11
Fabric
3mo ago 1
1.21.11
Fabric
3mo ago 1
1.21.11
Fabric
4mo ago 1
1.21.11
Fabric
4mo ago 1
1.21.11
Fabric
6mo ago 1
1.21.11
Fabric
7mo ago 1
1.21.11
Fabric
7mo ago 1
1.21.4
Fabric
last yr. 1
1.21.4
Quilt
last yr. 1
1.21.4
Fabric
last yr. 1
1.21.4
Quilt
last yr. 1
1.21.4
Fabric
last yr. 1
1.21.4
Quilt
last yr. 1
1.21.4
Fabric
last yr. 1
1.21.4
Quilt
last yr. 1
1.21.4
Fabric
last yr. 1
1.21.4
Quilt
last yr. 1
1.21.4
Fabric
last yr. 1
1.21.x
Fabric Quilt
last yr. 1
1.21
Fabric Quilt
last yr. 1
1.20.x
Fabric Quilt
last yr. 1
1.20.5-rc3
Fabric Quilt
last yr. 1
1.20.5-rc2
Fabric Quilt
last yr. 1
### Known Issue
Game crashes if Improved Transparency targets are used when Improved Transparency is off. ([#2](https://git.gay/Perspective/luminance/issues/2))

### Bug Fixes
  • Fixed null error with shader stacks name/description.
  • Added **Force Transparency Targets** config option.


Report bugs [here](https://git.gay/Perspective/luminance/issues).
  • Fixed null check error... (i am so silly SOBBING)
  • Updated bundled seam version.
  • luminance:outlined no longer uses multiple depths. (Fixes crashing: [Perspective/1.x#2](https://git.gay/Perspective/1.x/issues/2))
  • This shader is used by luminance:outlined, luminance:outlined2, luminance:silhouette, and luminance:silhouette2.
  • Replaced SpectatorHandler.Mode with PriorityMode.
  • SpectatorPriorityModeValue has been renamed to PriorityModeValue.
  • Added always_on object to shader registration.
  • Optionally takes location, and priority.
  • If not provided, defaults to luminance:game, and 0.
  • Post effects can now be registered more than once as different shaders.
  • Updated package to dev.dannytaylor.luminance.**
  • Any mods using Luminance will need to be updated to support this version onwards.
  • Renamed uses of "Fabulous" to "Improved Transparency".
  • Moved classes and methods also used by Perspective to Seam.
  • Bundled Seam 1.0-alpha.2
  • non-resourcepack backed shader registration

source code has been moved, it's now located at https://git.gay/Perspective/luminance
> **Please Note:**
> This changelog might not contain all the changes (there's been alot), and our resource pack documentation is currently out of date.


## Known Issues
  • Hand Depth is not merged into the minecraft:main depth buffer.
  • This isn't super noticable on shaders that are rendered on the luminance:level render location.
  • Shaders that use Improved Transparency depth buffers - such as luminance:outlined - should fallback to this render location.
  • luminance:graphics_mode uniform has been removed.
  • We will likely add seperate uniforms for each option as this has been split into "presets".
  • Shader uniforms cannot be overriden from a stack.
  • Updated config screens.
  • Config and Information screens have been merged into a list screen.
  • Credits/Attribution screen is now translatable.
  • Perspective uniform now defaults to 0.0F. (legotaylor)
  • Added luminance:post/color_overlay shader. (legotaylor)
  • Updated silhouette shaders to use the color overlay shader. (legotaylor)
  • Added new uniform luminance_renderType, that returns the most appropriate rendertype for where the game currently is in its render loop (nettakrim)
  • Added uniforms for arbitrary effect duration and amplitude (presence can be checked by seeing if duration is anything other than 0 [-1 is infinite]), defaults to minecraft:speed. (nettakrim)
  • Perspective uniform now defaults to 0.0F. (legotaylor)
  • Added luminance:post/color_overlay shader. (legotaylor)
  • Updated silhouette shaders to use the color overlay shader. (legotaylor)
  • Added new uniform luminance_renderType, that returns the most appropriate rendertype for where the game currently is in its render loop (nettakrim)
  • Added uniforms for arbitrary effect duration and amplitude (presence can be checked by seeing if duration is anything other than 0 [-1 is infinite]), defaults to minecraft:speed. (nettakrim)
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](https://modrinth.com/mod/souper-secret-settings) by [Nettakrim](https://modrinth.com/user/Nettakrim), or [Perspective](https://modrinth.com/mod/mclegoman-perspective) by [dannytaylor](https://modrinth.com/user/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](https://github.com/mclegoman/luminance/blob/master/ResourcepackGuide/ResourcepackGuide.md) 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,
...
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](https://modrinth.com/mod/souper-secret-settings) by [Nettakrim](https://modrinth.com/user/Nettakrim), or [Perspective](https://modrinth.com/mod/mclegoman-perspective) by [dannytaylor](https://modrinth.com/user/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](https://github.com/mclegoman/luminance/blob/master/ResourcepackGuide/ResourcepackGuide.md) 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,
...
If no bugs are found in this rc, we will fully release Luminance 1.0.
  • Fixed Hand Depth. (Nettakrim)
  • Added luminance:aa antialias shader. (dannytaylor, Nettakrim)
  • Updated variable, and function names to be more relevant for the context of shader rendering. (dannytaylor)
  • GAME -> UI, SCREEN_BACKGROUND -> UI_BACKGROUND, afterGameRender -> afterUiRender, afterScreenBackgroundRender -> afterUiBackgroundRender, afterHandRender -> afterVanillaPostEffectRender, afterWeatherRender -> afterFabulousRender
  • Updated luminance json dataloader. (dannytaylor)
  • "disable_game_rendertype" has been renamed to "disable_ui_rendertype".
  • If "disable_ui_rendertype" cannot be found, it will check for "disable_game_rendertype", and "disable_screen_mode", before defaulting to false.
  • _smooth uniforms now lerp with a nonlinear deltatime factor, such that they will be the same speed regardless of framerate. (Nettakrim)
  • changed default value for luminance:post/scanlines Amount uniform from 800 to 2 (it looks nearly identical but is in the range where it directly affects the size of the lines, instead of only working because of moire with pixels). (Nettakrim)
  • Added luminance_cam and luminance_cam_fract uniforms. (Nettakrim)
  • Added luminance_clipping uniform that returns the near and far clipping planes, this allows linearizeDepth to be actually correct. (Nettakrim)
  • Updated the alpha slider used in the config screen to have it's own class. (it's functionally the same). (Nettakrim)

> **Developers note**
> There is currently a bug with our development environment that causes mod-loader specific classes to *sometimes* not be loaded, however this doesn't effect the final build.
> After releasing v1.0, I'll work on a fix for this, which will also allow for a merged jar for both quilt and fabric - and eventually neoforge.
If no bugs are found in this rc, we will fully release Luminance 1.0.
  • Fixed Hand Depth. (Nettakrim)
  • Added luminance:aa antialias shader. (dannytaylor, Nettakrim)
  • Updated variable, and function names to be more relevant for the context of shader rendering. (dannytaylor)
  • GAME -> UI, SCREEN_BACKGROUND -> UI_BACKGROUND, afterGameRender -> afterUiRender, afterScreenBackgroundRender -> afterUiBackgroundRender, afterHandRender -> afterVanillaPostEffectRender, afterWeatherRender -> afterFabulousRender
  • Updated luminance json dataloader. (dannytaylor)
  • "disable_game_rendertype" has been renamed to "disable_ui_rendertype".
  • If "disable_ui_rendertype" cannot be found, it will check for "disable_game_rendertype", and "disable_screen_mode", before defaulting to false.
  • _smooth uniforms now lerp with a nonlinear deltatime factor, such that they will be the same speed regardless of framerate. (Nettakrim)
  • changed default value for luminance:post/scanlines Amount uniform from 800 to 2 (it looks nearly identical but is in the range where it directly affects the size of the lines, instead of only working because of moire with pixels). (Nettakrim)
  • Added luminance_cam and luminance_cam_fract uniforms. (Nettakrim)
  • Added luminance_clipping uniform that returns the near and far clipping planes, this allows linearizeDepth to be actually correct. (Nettakrim)
  • Updated the alpha slider used in the config screen to have it's own class. (it's functionally the same). (Nettakrim)

> **Developers note**
> There is currently a bug with our development environment that causes mod-loader specific classes to *sometimes* not be loaded, however this doesn't effect the final build.
> After releasing v1.0, I'll work on a fix for this, which will also allow for a merged jar for both quilt and fabric - and eventually neoforge.
Luminance Icon
Download Luminance
Select game version
Select platform