Sets global quad rays decay (light falloff along ray, controls visible ray length).
Takes decay (falloff factor, default 0.95).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
decayDouble
Returns
Void
Quick Summary
Sets global quad rays decay (light falloff along ray, controls visible ray length).
Takes decay (falloff factor, default 0.95).
Returns nothing.
Technical Exegesis...
Sets global quad rays decay (light falloff along ray, controls visible ray length). Takes decay (falloff factor, default 0.95). Returns nothing. Sets g_quadRaysSettings.decay (exponential decay parameter, applied per sample in post-processing shader). Use to control ray length (higher decay = shorter visible rays, lower decay = longer rays), adjust atmosphere density (thick fog = high decay, clear air = low decay), or match scene scale (large outdoor scenes = low decay, small indoor = high decay).
Sets global quad rays decay (light falloff along ray, controls visible ray length). Takes decay (falloff factor, default 0.95). Returns nothing. Sets g_quadRaysSettings.decay (exponential decay parameter, applied per sample in post-processing shader). Use to control ray length (higher decay = shorter visible rays, lower decay = longer rays), adjust atmosphere density (thick fog = high decay, clear air = low decay), or match scene scale (large outdoor scenes = low decay, small indoor = high decay). Decay factor: 1.0 = no decay (rays extend infinitely, full brightness at all distances), 0.95 = default (gradual falloff, rays fade over distance), 0.5-0.8 = fast decay (short visible rays, dense fog effect), 0.0 = instant decay (no visible rays, completely dark). Exponential falloff: each sample multiplies accumulated light by decay (light *= decay per sample, exponential curve), numSamples affects visible length (more samples = longer rays before fadeout, 64 samples typical), rayLength combined (decay affects how quickly light fades within rayLength distance). Use cases: (1) Atmosphere density (clear sky decay 0.98, light fog 0.9, thick fog 0.7), (2) Scene scale (large outdoor 0.95-0.98, medium indoor 0.85-0.95, small room 0.7-0.85), (3) Artistic control (short rays 0.6-0.8 for focused beams, long rays 0.95-0.99 for expansive god rays), (4) Performance optimization (higher decay = shorter rays = fewer visible samples = faster rendering). Common patterns: outdoor sunlight = decay 0.97 long rays; indoor spotlight = decay 0.85 shorter focused beam; fog effect = decay 0.75 dense atmosphere. Typical values: clear 0.95-0.99 (long visible rays, minimal falloff), normal 0.85-0.95 (medium ray length, balanced), dense 0.6-0.85 (short rays, thick atmosphere), extreme 0.3-0.6 (very short rays, almost no visible length). Interaction with rayLength: rayLength sets maximum trace distance (world units), decay controls how quickly light fades within that distance (faster decay = shorter visible portion of rayLength). Immediate effect (applies next frame), no validation (accepts any value, clamp 0-1 recommended), thread-safe (set from main thread).