Sets reflection texture background/clear color (RGB 0-255) for areas with no reflected geometry (sky color).
Takes entity (reflective entity handle), r, g, b (red, green, blue components, 0-255).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
entityInt
rInt
gInt
bInt
Returns
Void
Quick Summary
Sets reflection texture background/clear color (RGB 0-255) for areas with no reflected geometry (sky color).
Takes entity (reflective entity handle), r, g, b (red, green, blue components, 0-255).
Returns nothing.
Technical Exegesis...
Sets reflection texture background/clear color (RGB 0-255) for areas with no reflected geometry (sky color). Takes entity (reflective entity handle), r, g, b (red, green, blue components, 0-255). Returns nothing. Validates entity is reflective, clamps RGB to 0-255 range, converts to 0.0-1.0 float range, stores in entity.reflectionClearColor. This color fills reflection texture before rendering reflected scene (background color for empty areas where no geometry is reflected).
Sets reflection texture background/clear color (RGB 0-255) for areas with no reflected geometry (sky color). Takes entity (reflective entity handle), r, g, b (red, green, blue components, 0-255). Returns nothing. Validates entity is reflective, clamps RGB to 0-255 range, converts to 0.0-1.0 float range, stores in entity.reflectionClearColor. This color fills reflection texture before rendering reflected scene (background color for empty areas where no geometry is reflected).
This function sets sky/background color for reflection rendering. Clear color: color used to clear reflection texture each frame before drawing reflected objects. Appears in reflection where no geometry is reflected (empty space, sky, beyond scene bounds). RGB parameters: standard 0-255 integer color values, converted internally to 0.0-1.0 float. Clamped to valid range automatically. Use cases: (1) Water reflections matching sky color (blue for daytime, orange/pink for sunset, black for night), (2) Mirror backgrounds (color shown in unreflected areas), (3) Portal effects (background color of alternate dimension), (4) Reflective surfaces in enclosed spaces (ambient color when no objects visible). Common pattern: water=b3dCreateReflectiveGrid(...), b3dSetEntityReflectionClearColorFX(water, 135, 206, 235), sets sky blue clear color matching daytime sky. Default behavior: if not set, inherits active camera's clear color when reflective grid created. Color inheritance: b3dCreateReflectiveGrid copies active camera's clear color to reflection by default, this function overrides that default. Typical values: sky blue (135, 206, 235), sunset (255, 140, 70), night (10, 15, 30), space (0, 0, 0), indoor ambient (128, 128, 128). Reflection rendering: each frame, reflection texture cleared to this color, then reflection camera renders scene into texture, areas with no geometry show clear color. Visibility in reflection: clear color visible where reflection camera sees no objects (looking at empty sky, beyond scene geometry, through transparency). Alpha channel: not included (reflection clear color is opaque background), reflection opacity controlled by b3dSetEntityReflectionAlphaFX separately. Performance: lightweight (stores RGB values, used during reflection render pass). Dynamic sky: can animate clear color to match changing sky (day/night cycle, weather effects). Entity requirement: must be reflective entity (isReflective=true). Non-reflective entities ignored. Storage: stored in entity.reflectionClearColor as XMFLOAT3 (RGB only, no alpha). Related: b3dSetEntityReflectionAlphaFX controls reflection visibility/opacity, b3dCreateReflectiveGrid creates reflective surface with initial clear color from active camera, camera clear color (via b3dCameraClsColor or similar) sets main camera background separately from reflection background.