HomeJavaModsFlashlight: Shader Light Engine
Flashlight: Shader Light Engine
ModsJava

Flashlight: Shader Light Engine

by EntonioDMI1 · on Modrinth

Handheld flashlight and work lantern with real dynamic lighting: a shader-driven beam that casts true shadows from actual block shapes, zooms with the…

⬇ Download on Modrinth
Flashlight: Shader Light Engine — screenshot 1Flashlight: Shader Light Engine — screenshot 2

A real flashlight for Minecraft. Smooth beam, honest shadows, blinding glare.

Every flashlight mod does the same trick: invisible light blocks chasing your crosshair, chunky relights, light leaking through walls. Flashlight: Shader Light Engine doesn't. The beam is computed inside the game's own shaders — a smooth cone that updates every frame, stops at walls, casts real shadows from real block shapes, and blinds anyone who looks into the lens. Built as the companion to Enhanced Darkness: in its pitch black you'll need one.

Two lights, two jobs

Flashlight Work Lantern
Role cheap all-rounder expensive floodlight
Beam scroll to focus the lens: wide 25-block flood to a razor-thin 110-block spot fixed wall of light, 55 blocks
Power AA battery — 30 min battery pack — 45 min
Recipe iron + redstone + glass gold, iron, redstone block
Loot villages (+ AA batteries) dungeons, mineshafts, strongholds (+ battery packs)

The beam is shaped like a real one

Not a flat disc of light. A bright hotspot from the reflector sits inside a wide, faint corona bounded by the bezel — exactly what a real torch throws on a wall.

Zooming in narrows the hotspot and steals light from the corona, because that is what a zoom head physically does; the corona barely changes width, because its width is set by the bezel, not the lens. At full zoom the centre is intense and collapses within a few degrees, then a long shelf of faint light runs out to the edge. At minimum zoom the shape matches the work lantern.

Brightness falls off with distance as inverse-square, modelling a virtual source behind the reflector — so the light fades smoothly along the whole beam instead of holding up and then cutting off.

Real shadows

Terrain is re-rendered from the flashlight's point of view into a depth atlas, so shadows follow the actual geometry: a slab casts a slab, stairs cast stairs, leaves cast a dappled mess. Reaches 64 blocks. Soft edges come from a rotated blur kernel — a kernel aligned to the texture axes would read as a staircase, because Minecraft walls are axis-aligned too. Entities cast sharp capsule silhouettes, and the beam dissolves the vanilla shadow circles it hits.

With Sodium installed, shadow maps are not possible. Sodium renders terrain with its own programs and never fills the vanilla draw list, so there is nothing to re-render from the light's point of view. Instead the beam is occluded by a bit-packed half-block voxel grid, 64 blocks across, ray-marched per pixel. Coarser and shorter-ranged than the shadow atlas — but it is real occlusion, and it costs Sodium nothing.

Night ops

Settings

ModMenu → gear, or config/flashlight.json. Three tabs — Shadows, Beam, Night vision — and every slider applies while you drag it, so you can tune the light while standing in it. Shadow resolution is the one exception: it sizes a GPU texture, so it takes effect on the next world join.

The engine

No light blocks. No chunk relights. The cone is computed inside the game's core shaders — terrain, entities, dropped items, particles and even vanilla mob shadow blobs are cloned on the fly with the beam math injected.

Installation

  1. Install Fabric Loader for Minecraft 26.1.x.
  2. Install Fabric API.
  3. Run Java 25.
  4. Drop the jar into mods — on the client and the server (items and batteries are real).
  5. Pairs best with Enhanced Darkness.

Iris shaderpacks replace the game's shaders entirely — with a pack enabled the beam won't light terrain. Sodium alone works out of the box.

License

MIT — source on GitHub.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more