nvSecurityIR.styleBlock
- .metadata140 B
- README.md2.4 KB
- block.yaml2.9 KB
README.md
Night vision: security camera infrared (styleBlock, Colour)
A security camera in infrared night mode: flat black and white, leaves and skin glowing pale, a bright ring of infrared light near the lens and dark beyond it.
It is one of the seven night vision blocks; all run the nightVision shader with their own defaults, so any one swaps for another in the Colour slot with one change. Put an optic (opticsMonocular, opticsBinocular, opticsQuad, opticsScope) in the Medium slot to see it through a tube.
local Sensors = require("~sensorBlocks.Sensors")
Sensors.use("nvGen3Green") -- on this machine only (your goggles)
Sensors.flash(explosion.position, 1) -- every player whose night vision sees it is dazzled
What it gives up in motion
Amplified light moves with the scene, so nothing slides. The scintillating grain changes every frame per pixel, a fine noise rather than a flicker. The automatic gain is measured fresh each frame from 16 points of the picture, so it follows a light coming into view at once instead of pumping. A flash washes the picture out and it recovers over about a second and a half; the runtime lets at most three of those begin in any second. The honeycomb and scanlines are fixed to the screen, as on a real tube.
How it treats content
- Opaque things: their light amplified, plus the illuminator near and ahead.
- Transparent things (glass, water): their light like anything else; a lamp behind glass still blooms.
- Particles and smoke: bright particles (fire, sparks, muzzle flashes) bloom into halos.
- Sky: a moonlit sky turns a bright green; a black sky stays the phosphor's floor.
- Fog: lit fog brightens and flattens the picture, as it does through real goggles.
- Skinned characters: like any surface, with their role marked so players and enemies read apart.
- Foliage: leaves read brighter (near infrared).
- World text: amplified like the rest and readable when lit; screen UI is drawn after the stack and is never touched.
- Black does not stay black: an intensifier makes visible what the eye could not see.
Known limits
- The illuminator is a cone in the middle of the view, not a real light; it does not cast shadows.
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it.
- The sensorBlocks package README's Known limits lists the rest.