Log inGet started
Package

crt_scanlines.shader

README.md

crt_scanlines

A CRT line texture over the finished frame — the demo opener's grain.

Every period framebuffer rows, thickness of them are darkened by strength. Because it reads frag_coord, the line pitch follows the real output resolution rather than any layout unit, so it looks the same whatever the frame is rendered at.

propertydefaultwhat it does
period6rows between one line and the next
thickness2rows darkened out of each period
strength0.30how far those rows are darkened, 0–1

Why it is a shader

The opener is a zui screen whose whole tree is rebuilt every frame. Drawn in that tree, this texture was one absolutely-positioned box per line — 240 nodes built, laid out and drawn every frame, which measured about half the sequence's frame cost. As a full-screen pass it costs one draw and touches no nodes.

Using it

preseed/parts/p_coldstart installs it on enter and removes it on exit:

local shader = asset.resolve("crt_scanlines", "shader")
tools.use("pp", "add", "crt_scanlines", { shader = shader, priority = 100 })