reckfellENGINE

Sky

Sky background and environment radiance resource.

On this page
class SkyReckfellSharpInherits Resource

Stores a sky material, radiance update mode and requested radiance size. Assign it to Environment.Sky. Displaying the background requires BackgroundMode = Sky; map processing policy does not disable background sky() calls.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

SkyConstructor
# Sky
C#
public Sky();

Creates a sky resource with no material, ProcessMode = Automatic and RadianceSize = Size256. For a visible background, assign a sky material, set Environment.Sky and select BackgroundMode = Sky.

Properties3

ProcessModeProperty
# ProcessMode
C#
public Sky.ProcessModeEnum ProcessMode { get; set; }

Radiance update/filtering policy, not the visible background draw rate. Automatic is renderer-selected; Quality prioritizes filtering quality, Incremental spreads filtering across frames and Realtime targets frequent changes. Current RD Realtime uses internal size 256.

RadianceSizeProperty
# RadianceSize
C#
public Sky.RadianceSizeEnum RadianceSize { get; set; }

Requested environment radiance detail: enum Size32 through Size2048, default Size256. This is not viewport resolution. Current RD Realtime warns and internally adjusts other sizes to 256; the resource getter stores the requested enum rather than confirming internal allocation.

SkyMaterialProperty
# SkyMaterial
C#
public Material SkyMaterial { get; set; }

Material generating the sky and environment radiance. Use a sky material or a ShaderMaterial with shader_type sky. The resource retains the material; assignment does not switch Environment.BackgroundMode.

Methods6

GetMaterialMaterial
# GetMaterial
C#
public Material GetMaterial();

Material generating the sky and environment radiance. Use a sky material or a ShaderMaterial with shader_type sky. The resource retains the material; assignment does not switch Environment.BackgroundMode.

Returns Material

Assigned Material, or null when none is assigned.

GetProcessModeSky.ProcessModeEnum
# GetProcessMode
C#
public Sky.ProcessModeEnum GetProcessMode();

Radiance update/filtering policy, not the visible background draw rate. Automatic is renderer-selected; Quality prioritizes filtering quality, Incremental spreads filtering across frames and Realtime targets frequent changes. Current RD Realtime uses internal size 256.

Returns Sky.ProcessModeEnum

Requested resource mode; Automatic does not report the selected internal policy.

GetRadianceSizeSky.RadianceSizeEnum
# GetRadianceSize
C#
public Sky.RadianceSizeEnum GetRadianceSize();

Requested environment radiance detail: enum Size32 through Size2048, default Size256. This is not viewport resolution. Current RD Realtime warns and internally adjusts other sizes to 256; the resource getter stores the requested enum rather than confirming internal allocation.

Returns Sky.RadianceSizeEnum

Stored requested RadianceSizeEnum value.

SetMaterialvoid
# SetMaterial
C#
public void SetMaterial(Material material);

Material generating the sky and environment radiance. Use a sky material or a ShaderMaterial with shader_type sky. The resource retains the material; assignment does not switch Environment.BackgroundMode.

Parameters
NameTypeDefault
materialMaterial—
material

Sky material; null clears the assigned material.

SetProcessModevoid
# SetProcessMode
C#
public void SetProcessMode(Sky.ProcessModeEnum mode);

Radiance update/filtering policy, not the visible background draw rate. Automatic is renderer-selected; Quality prioritizes filtering quality, Incremental spreads filtering across frames and Realtime targets frequent changes. Current RD Realtime uses internal size 256.

Parameters
NameTypeDefault
modeSky.ProcessModeEnum—
mode

Environment radiance update mode.

SetRadianceSizevoid
# SetRadianceSize
C#
public void SetRadianceSize(Sky.RadianceSizeEnum size);

Requested environment radiance detail: enum Size32 through Size2048, default Size256. This is not viewport resolution. Current RD Realtime warns and internally adjusts other sizes to 256; the resource getter stores the requested enum rather than confirming internal allocation.

Parameters
NameTypeDefault
sizeSky.RadianceSizeEnum—
size

A RadianceSizeEnum value, not an arbitrary pixel count.

Sky.ProcessModeEnum

ValueDescription
Automatic = 0

Automatically selects the appropriate process mode based on your sky shader. If your shader uses TIME or POSITION, this will use Sky.ProcessModeEnum.Realtime. If your shader uses any of the LIGHT_* variables or any custom uniforms, this uses Sky.ProcessModeEnum.Incremental. Otherwise, this defaults to Sky.ProcessModeEnum.Quality.

Incremental = 2

Uses the same high quality importance sampling to process the radiance map as Sky.ProcessModeEnum.Quality, but updates over several frames. The number of frames is determined by ProjectSettings.rendering/reflections/sky_reflections/roughness_layers. Use this when you need highest quality radiance maps, but have a sky that updates slowly.

Quality = 1

Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than Sky.ProcessModeEnum.Realtime but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing ProjectSettings.rendering/reflections/sky_reflections/ggx_samples.

Realtime = 3

Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality. Note: The fast filtering algorithm is limited to 256×256 cubemaps, so Sky.RadianceSize must be set to Sky.RadianceSizeEnum.Size256. Otherwise, a warning is printed and the overridden radiance size is ignored.

Sky.RadianceSizeEnum

ValueDescription
Max = 7

Represents the size of the Sky.RadianceSizeEnum enum.

Size1024 = 5

Radiance texture size is 1024×1024 pixels.

Size128 = 2

Radiance texture size is 128×128 pixels.

Size2048 = 6

Radiance texture size is 2048×2048 pixels.

Size256 = 3

Radiance texture size is 256×256 pixels.

Size32 = 0

Radiance texture size is 32×32 pixels.

Size512 = 4

Radiance texture size is 512×512 pixels.

Size64 = 1

Radiance texture size is 64×64 pixels.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.