Deferred Lighting Shader v1.2.0 Shadows Update | Colored Lighting Add-On | MCPE 1.18.12
Deferred Lighting Shader
is an actual colored lighting shader/add-on for Minecraft: Pocket Edition 1.18.12. It adds colored lights as well as flexible tools to configure them - special items, custom chat commands and command interactions into the game.
!!! IMPORTANT !!!
Please, read the following information carefully
This add-on/shader will not work on every device
It can only run on mobile devices (so windows 10 and other platforms are unsupported)
It can only work on ARM processors, so android emulators are unlikely to work
It only works on 1.18.12 or (possibly) on some versions prior
It certainly doesn't work on versions after 1.18.12, due to new rendering engine - Render Dragon
It may not be compatible with other add-ons, resource packs or shaders
Even if the above requirements are met, there's still no guarantee that it will work
Shader look and feel might depend on device screen orientation
When using this shader, perceived screen resolution (image details) will be cut in half
Video tutorial & technical explanation
Screenshots

















Items
All 5 items can be found in the equipment creative inventory category. Every item can be activated either on a specific block or just by itself, in the air. Item interaction will affect the closest light source within 10 blocks. Holding any of those items in the hand will force all light sources within 30 blocks to appear as a lightbulb billboards.
- deferred:add_light is an item used for creating light sources
- deferred:remove_light is an item used for removing light sources
- deferred:color_randomizer is an item used for randomizing light source colors
- deferred:fog_toggle is an item used for toggling light source fog
- deferred:shadow_toggle is an item used for toggling light source shadow
Chat commands
Multiple custom chat commands are available, below are their descriptions with examples
- .help displays help message
- .col displays the closest light source color
- .col 100 200 300 sets the closest light source color to RGB = [100, 200, 300]
- .pow 1.5 multiplies the closest light source color/brightness by 1.5
- .add 100 0 -200 adds 100 red, 0 green and subtracts 200 blue from the closest light source color
- .mov allows to move closest light source
Note: light sources can only store colors in 0 - 4095 range, as integers
Command integration
This add-on is designed with creators in mind - light soucres can be fully configured using standart Minecraft commands, like /tp, /event, /scoreboard, /tag and /summon
- Light sources are represented with deferred:point_light entities, so they can be created with /summon or targeted in commands with @e[type=deferred:point_light]
- Color is stored in r, g and b scoreboard objectives on each light source, therefore it can be configured with /scoreboard command
- Fog and shadows are controlled by deferred:fog and deferred:shadow tags, which can be added or removed with /tag command
- After changing color, fog or shadows, deferred:sync event must be used to synchronize the changes (/event command)
- Light sources are invulnerable to anything by default (even /kill), and can only be destroyed with deferred:remove_light item or by running deferred:despawn event
- deferred:random_color event randomizes color
- deferred:switch_fog event toggles fog On and Off
- deferred:switch_shadow event toggles shadow On and Off
HDR and adjustable exposure
HDR was introduced in 1.1.0 and it allows to capture higher range of colors and substantially improves quality of the shader. No more blinding white light when the brightness is set too high! And ACES tonemapper ensures that the colors you see are as beautiful as they can get. In addition, you are able to change the exposure between 10% and 100% by looking directly down and rotating camera clockwise or counterclockwise. Looking directly up sets the exposure back to 100%. Another feature worth mentioning is subsurface scattering - leaves, plants and grass are able to pass light through themselves.
Shadows
Block shadows are toggled with deferred:shadow_toggle item. Only 8 light sources with shadows can be rendered at a time. Not all blocks can cast shadows and not all can be illuminated by lights with turned on shadows. Blocks cast shadows as 1x1x1 cubes, ignoring an actual model of the block.
Experimental toggles
World settings toggles that are required for this add-on to function correctly
- Holiday Creator Features
- Upcoming Creator Features
- GameTest Framework
- Molang Features
Open source
If you find any issues with the shader, want to contribute or use the code in your own project - we got you covered! The source code of Deferred Lighting Shader is available on GitHub under MIT license.
v1.2.0
- Added block shadows (enabled per light source with deferred:shadow_toggle item)
- Replaced light source bayer dithering with animated blue noise (film grain)
- Fixed white lines on the screen that appeared on certain devices
- Fixed black lines appearing on translucent blocks on certain devices
- Fixed an issue where rendering would completely break on certain devices in a specific screen orientation
- Fixed the sky appearing white on certain devices
- Fixed weird colors in the distance
updated