Sets global quad rays length (maximum ray trace distance in world units, minimum 1.0).
Takes length (ray length in world units, clamped minimum 1.0, default 100.0).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
lengthDouble
Returns
Void
Quick Summary
Sets global quad rays length (maximum ray trace distance in world units, minimum 1.0).
Takes length (ray length in world units, clamped minimum 1.0, default 100.0).
Returns nothing.
Technical Exegesis...
Sets global quad rays length (maximum ray trace distance in world units, minimum 1.0). Takes length (ray length in world units, clamped minimum 1.0, default 100.0). Returns nothing. Sets g_quadRaysSettings.rayLength (maximum trace distance parameter, shader stops tracing after this distance).
Sets global quad rays length (maximum ray trace distance in world units, minimum 1.0). Takes length (ray length in world units, clamped minimum 1.0, default 100.0). Returns nothing. Sets g_quadRaysSettings.rayLength (maximum trace distance parameter, shader stops tracing after this distance). Use to control ray reach (longer rays for large outdoor scenes, shorter rays for indoor spaces), match scene scale (adjust for world units, small rooms vs vast landscapes), or optimize performance (shorter rays = less tracing work per pixel). Ray length: distance in world units from pixel to light source (shader traces up to this distance), combined with decay (decay controls visibility within rayLength, high decay = shorter visible portion), combined with numSamples (samples distributed evenly across rayLength, more samples = finer steps). Minimum clamped: values <1.0 clamped to 1.0 (prevents zero/negative length, ensures minimum tracing distance). Use cases: (1) Scene scale (small room 20-50 units, medium scene 50-150 units, large outdoor 150-500 units), (2) Performance optimization (reduce length for faster tracing, fewer samples needed to cover distance), (3) Artistic control (short rays 30 for focused beams, long rays 200+ for expansive god rays), (4) Dynamic adjustment (reduce length when many sources active, increase for single dramatic source). Common patterns: indoor scene = length 50 short focused rays; outdoor scene = length 200 long expansive rays; performance mode = length 75 balanced reach and speed. Typical values: very short 10-30 (tight beam, indoor close-range), short 30-70 (room scale, focused lighting), medium 70-150 (large space, balanced), long 150-300 (outdoor, expansive rays), very long 300+ (distant sun rays, maximum reach). Interaction with samples: longer length with same samples = larger steps (less smooth, more banding risk), shorter length with same samples = finer steps (smoother rays, better quality), adjust both together (long length 200 with high samples 128 for smooth expansive rays). Interaction with decay: rayLength sets maximum trace distance (physical limit), decay controls visible portion (high decay 0.7 = short visible rays even if rayLength 200, low decay 0.98 = long visible rays approaching rayLength). Performance impact: longer rays = more tracing work (shader iterates longer distance, more occlusion lookups), combined with samples (total cost = samples x rayLength interaction, longer rays need more samples for quality). Immediate effect (applies next frame), automatic clamping (minimum 1.0 enforced), thread-safe (set from main thread).