public enum LightUnitWhat an author's light intensity is measured in.
Remarks
A light has a physical brightness and a number an author types, and they are not the same thing. A shader wants luminous intensity in candela — that is what divides by the square of the distance — and nobody buys a lamp in candela. A bulb's box says lumens, a light meter reads lux, a screen is specified in nits, and each of those is the natural unit for a different kind of light. So the unit is carried beside the number and the conversion happens once per light per frame, on the way to the GPU.
⚠ Not every unit means something for every kind. Lux is illuminance arriving at a surface, which only a light with no falloff can promise — the sun. Nits is luminance leaving a surface, which needs a light that has a surface. Asking for one that does not apply is not an error: Intensity falls back to the kind's own natural unit, because a light that is off by a factor of 4π is worse than a light that quietly ignored a menu choice.
Fields and properties (5)
NativeWhatever the kind's own unit is, taken as written — candela for a point or a spot, lux for a directional light, nits for an area one.
LumenLuminous power, in lumens — what a bulb's packaging says. Point, spot and area.
CandelaLuminous intensity, in candela — what a punctual light's loop wants.
LuxIlluminance, in lux — a light meter's reading. Directional only.
NitsLuminance, in nits (cd/m²) — a screen's own brightness. Area lights.
Used by (7)
- ArenaThirdPersonShooter
- LightVixen.Rendering
- PhotometryVixen.Rendering
- PhotometryTestsVixen.Rendering.Tests
- RenderLightVixen.Rendering
- TypeRegistrationVixen.Rendering
- Vixen_Rendering_Ecs_LightSerializerVixen.Rendering