Sets global radiance effect color tint (0.0-1.0 range, applied to bloom/glow).
Takes r (red 0.0-1.0), g (green 0.0-1.0), b (blue 0.0-1.0).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
rDouble
gDouble
bDouble
Returns
Void
Quick Summary
Sets global radiance effect color tint (0.0-1.0 range, applied to bloom/glow).
Takes r (red 0.0-1.0), g (green 0.0-1.0), b (blue 0.0-1.0).
Returns nothing.
Technical Exegesis...
Sets global radiance effect color tint (0.0-1.0 range, applied to bloom/glow). Takes r (red 0.0-1.0), g (green 0.0-1.0), b (blue 0.0-1.0). Returns nothing. Stores color in g_radianceColor[3] array, clamped to [0.0, 1.0] range.
This function sets radiance tint. Radiance effect: post-process bloom/glow effect applied to entire screen, brightens areas around light sources and bright surfaces, simulates camera sensor overexposure and light scatter, color tint applied to radiance contribution.
Sets global radiance effect color tint (0.0-1.0 range, applied to bloom/glow). Takes r (red 0.0-1.0), g (green 0.0-1.0), b (blue 0.0-1.0). Returns nothing. Stores color in g_radianceColor[3] array, clamped to [0.0, 1.0] range.
This function sets radiance tint. Radiance effect: post-process bloom/glow effect applied to entire screen, brightens areas around light sources and bright surfaces, simulates camera sensor overexposure and light scatter, color tint applied to radiance contribution. Color parameters: RGB values in 0.0-1.0 range (not 0-255), values outside range automatically clamped, r=g=b=1.0 is white (neutral, no tint), lower values reduce that color channel's contribution. Tint usage: color multiplied with radiance contribution before adding to scene, allows colored bloom (warm sunset glow, cool moonlight, sci-fi energy tint), affects visual atmosphere and mood, common for stylized or thematic lighting. Use cases: (1) Warm sunset (r=1.0, g=0.8, b=0.6 for orange glow), (2) Cool moonlight (r=0.7, g=0.8, b=1.0 for blue tint), (3) Sci-fi energy (r=0.0, g=1.0, b=1.0 for cyan glow), (4) Fire/lava (r=1.0, g=0.5, b=0.2 for orange-red), (5) Magical effects (r=0.8, g=0.2, b=1.0 for purple). Common patterns: neutral radiance = b3dSetRadianceColor(1.0, 1.0, 1.0) for white bloom, warm atmosphere = b3dSetRadianceColor(1.0, 0.9, 0.7) for slight orange, cool atmosphere = b3dSetRadianceColor(0.8, 0.9, 1.0) for slight blue, intense tint = lower two channels to emphasize one color, subtle tint = values close to 1.0 for mild effect. Typical usage: call once during setup for consistent mood, change dynamically for time-of-day effects (day=warm, night=cool), animate during special events (portal opening, magic spell), combine with b3dEnableRadianceEffect to enable/disable effect. Global effect: affects entire screen uniformly, all radiance contributions use same color tint, not per-light or per-entity (global post-process), applies to quad rays, bloom, and other radiance sources. Clamping behavior: values < 0.0 clamped to 0.0 (no negative light), values > 1.0 clamped to 1.0 (full intensity), clamping per-channel (independent R/G/B), prevents invalid colors and overflow. Color examples: white (1.0, 1.0, 1.0) = neutral bloom, orange (1.0, 0.6, 0.3) = warm sunset, blue (0.6, 0.8, 1.0) = cool night, green (0.5, 1.0, 0.5) = alien atmosphere, purple (0.8, 0.3, 1.0) = magic/fantasy, red (1.0, 0.3, 0.3) = danger/alert. Performance: negligible cost (simple global variable assignment), no per-pixel cost change (shader uses color regardless), same shader runs with any color value, safe to change every frame if needed. Radiance system: radiance effect must be enabled via b3dEnableRadianceEffect, color has no effect if radiance disabled, radiance renders bright areas to separate buffer, downsamples and blurs for bloom, multiplies by radiance color, adds to final image. Default color: if not set, defaults to white (1.0, 1.0, 1.0), neutral tint doesn't change bloom appearance, call function to apply custom tint, persists until changed again. Artistic control: subtle tints (0.8-1.0 range) for realistic atmosphere, strong tints (0.0-0.5 range) for stylized visuals, match tint to dominant light color (sun, moon, artificial), use contrasting tints for visual interest. Related quad ray color: b3dSetRadianceColor is global tint for all radiance, b3dSetEntityColorFX sets individual entity color (different purpose), quad ray radiance uses this global tint, combines with per-ray settings for final color. Time-of-day example: morning (1.0, 0.95, 0.8) slight warm, noon (1.0, 1.0, 1.0) neutral white, sunset (1.0, 0.7, 0.5) strong orange, dusk (0.8, 0.8, 1.0) cool blue, night (0.6, 0.7, 1.0) moonlight blue. Validation: function accepts any float values, automatically clamps to valid range, no error messages (silent clamping), no entity handle required (global setting). Related: b3dEnableRadianceEffect enables/disables radiance system (must be enabled), b3dSetQuadRayRadiance configures per-ray radiance (intensity/range), b3dSetEntityColorFX sets entity color (different from global radiance tint), b3dAmbientLight sets ambient light color (different lighting component).
Example
Example.bam
; Enable radiance effect with warm sunset tint
b3dEnableRadianceEffect(True)
b3dSetRadianceColor(1.0, 0.75, 0.5) ; Orange sunset glow
; Cool moonlight atmosphere
b3dEnableRadianceEffect(True)
b3dSetRadianceColor(0.7, 0.8, 1.0) ; Blue moonlight
; Sci-fi energy portal with cyan glow
b3dEnableRadianceEffect(True)
b3dSetRadianceColor(0.3, 1.0, 1.0) ; Bright cyan
; Neutral white bloom (default/realistic)
b3dEnableRadianceEffect(True)
b3dSetRadianceColor(1.0, 1.0, 1.0) ; Pure white
; Dynamic time-of-day radiance color
timeOfDay! = mathMod(sysMillisecs() / 60000.0, 24.0) ; 0-24 hours
If timeOfDay! >= 6.0 And timeOfDay! < 8.0Then ; Morning - warm orange
b3dSetRadianceColor(1.0, 0.9, 0.7)
ElseIf timeOfDay! >= 8.0 And timeOfDay! < 18.0Then ; Day - neutral white
b3dSetRadianceColor(1.0, 1.0, 1.0)
ElseIf timeOfDay! >= 18.0 And timeOfDay! < 20.0Then ; Sunset - strong orange
b3dSetRadianceColor(1.0, 0.7, 0.5)
Else ; Night - cool blue
b3dSetRadianceColor(0.6, 0.7, 1.0)
EndIf