Skip to main content

Time of Day, Light and Shadow

Verified via reverse engineering

Traced live via GhidraMCP against FarCry2_server (the Linux dedicated-server ELF, unstripped symbols). Addresses and object offsets on this page are that binary's. Anything measured in a running game says so where it appears.

The environment manager turns a world's presets and the clock into this frame's sun, moon, fog, light and shadow. Which presets a world uses, how their keys are stored and what retail ships in them is data, covered in environment presets. This page is what the engine does with them.

One update, in this order​

CDynamicEnvironmentManager::Update (0x09162730) runs once a frame. After copying the curved-horizon variables into the renderer's config and binding the world's templates:

  1. UpdateVars applies the env_* settings when they have changed: env_Hour, env_Minutes, env_Seconds, env_StormHour, env_TimeScale, env_WindForce, env_WindDir and env_DelayShadowMovement (see the developer console). Step 4 overwrites both wind settings.

  2. Every override's blend advances (below).

  3. The clock advances by the frame's game time multiplied by the time scale, unless it is held (below). Passing midnight counts a day and sends COneDayCompletedEvent.

  4. UpdateWeather, the storm factor, zone blending and wind (storm, rain and wind). The force starts from env_WindForce, but while the flag at CGameControllerManager +4 is clear it is replaced by the zone-blended wind preset's. It is then lerped toward the storm's wind and, again only while that flag is clear, scaled by a random fluctuation, clamped to 0–250 (the setting's help text says 0–600) and lerped toward a wind override's fWindForce. The direction is replaced by EvaluateWindDirection's (0x09158380), which reads env_WindDir only as the start of its next random drift: each new segment starts from the direction at +0x3DC. While WindOverideEnable (+0x1D0) is set, the direction at +0x1D4 replaces the drift's. In a running game, env_WindForce has no visible effect and SetWindOverride does.

  5. CSky::Update places the sun and the moon.

  6. Fog: the zone-blended preset, lerped toward the storm's fog by the storm transition curve, then toward a fog override. The result goes to C3DEngine's fog setters and to CSky::UpdateFog. On Steam Dunia.dll the start, end and amount setters are 0x1032F620, 0x1032F640 and 0x1032F660, each __thiscall taking one float with RET 4, and the start and end height setters 0x1032F6B0 and 0x1032F6E0 take two floats with RET 8. Each writes the scene's fog object: start +0x20, end +0x24, amount +0x28 (clamped), the start height pair +0x2C and +0x30, the end height pair +0x34 and +0x38. The manager is their only caller, and loads each value from a CFogSetting on its stack: at the first setter's call (Steam 0x10121FF1) that is start, end and amount at esp+0x34 to +0x3C, the four height values to +0x4C, and the sun side's and far side's colours at +0x50 and +0x60, which CSky::UpdateFog (Steam 0x1018C060, RET 8) is handed next. In a running game on the test range the end was 398 m with an amount of 1 at noon, and 30 m with 0.98 under the Default.SandStorm.Fog override (seen in game).

    The shaders take the setting as two registers, FogValues (c51 on the vertex side) and FogHeightValues (c52), and fog a point by saturate(distance × V.x + V.y) × V.z × (saturate(z × H.x + H.y) × H.z + H.w), with z the point's height in the world. V is 1/(end − start), −start/(end − start) and the amount; H is 1/(end height − start height), −start height/(end height − start height), the end strength less the start strength, and the start strength. So the height pairs make the fog's strength a ramp between two heights: equal strengths give fog the same at every height, and a start below zero leaves fog at the eye itself, the first-person weapon included. Retail's clear fog at noon ramps from 0.55 at 5 m to 0.25 at 301 m, so the land fogs at about half the strength the distance alone gives (seen in game, GOG v1.03, the registers logged by a plugin).

  7. UpdateAdaptiveBloom and UpdateAtmosphericScattering, then depth of field with the storm's and an override's blended in.

  8. UpdateSky: the sky gradients, the storm sky, and the clouds' formation, material and light.

  9. UpdateLight chooses the scene light, GenerateSunOcclusion runs, and CSky::UpdateShadow aims the shadows if that light casts them.

  10. Network time, then the rain roll and rain.

Overrides blend over a duration​

Each override is a preset pointer followed by five floats: a start factor, a target factor, a duration, the time elapsed and the current factor. Update adds the frame's game time to the elapsed time, clamps it to the duration and moves the current factor between start and target in proportion. A duration of zero goes straight to the target. Wherever that kind of preset is evaluated, the override's preset is evaluated at the same time of day and lerped over the result by the current factor.

OverridePresetCurrent factorRead in
Fog+0x14C+0x160Update
Clouds+0x184+0x198UpdateSky
Wind+0x1A0+0x1B4Update
Depth of field+0x1DC+0x1F0Update

Three more blocks of the same shape end at +0x17C, +0x1CC and +0x20C. The one ending at +0x1CC is the scripted storm override, with the storm's value where the others hold a preset, at +0x1B8. What reads the other two is not traced.

The Lua override methods on CDynamicEnvironmentManager (Lua API surface) and the Domino boxes OverrideEnvironmentFog, OverrideEnvironmentCloud and OverrideEnvironmentWind each take a preset by name and a transition duration, which is what these blocks hold; the call path between them is not traced. Retail content uses the boxes during play. Act 2's Border Storm graph (a2sm05_reprisal1.a2sm05_borderstorm.lua) drives the shared box Common_CustomBoxes.SetEnvironmentEffects with TransitionDuration = 7, through its SandStorm_Light input, which overrides the clouds with Default.Storm.Cloud, the wind with Default.SandStorm.Wind and the fog with Default.SandStorm.FogLight. The box's other input, Sandstorm, uses Default.SandStorm.Cloud, Default.SandStorm.Fog and Default.SandStorm.Wind.

The clock​

The time scale sits at +0x25C, copied from env_TimeScale. The clock does not advance while +0x30 is set, while +0x3C4 is set, or while IsHideShadowMovementCondition (0x09157260) holds.

That condition is DelayShadowMovement, which the game's own settings describe as the delay "before shadow starts when camera does not move". While both flags at +4 and +5 of the player's input listener are clear, a timer at +0x3BC gathers scaled frame time, and the clock is held until the timer reaches the delay at +0x3C0. When either flag is set the timer resets and the clock runs. A delay of zero never holds. SetDelayShadowMovement (0x09156C60) is called from SetTimeOfDay, from starting and stopping a time demo, and from UpdateVars.

The days passed are counted at +0x4EC (CumulatedDays, GetCumulatedDays 0x09156CC0), one more each time the clock passes midnight, and nowhere else: SetTimeOfDay (0x0915E920) only sets the time. So days plus the clock's seconds measure game time since the playthrough began.

What a save keeps. CDynamicEnvironmentManager::RegisterProperties (0x0915A7F0) registers the saved members: TimeOfDay (+0x260), StormHour (+0x480), the fog, lighting, cloud, wind and depth-of-field override blocks (+0x148, +0x164, +0x180, +0x19C, +0x1D8), CumulatedDays, IsSunLight (+0x31), WindOverideEnable (+0x1D0) and RainEvaluator (+0x49C, the raining flag, its timer and threshold).

Sleeping runs the clock fast. CBedroll::StartSleeping (0x08BA3BF0) keeps the time scale and the hour to wake at, and UpdateSleep (0x08BA3A40) sets the time scale every frame from the bedroll archetype's archTimeSpeedCurve, by how much of the sleep is left. The clock therefore passes through every hour slept, so midnight counts its day and the storm hour runs on as in play.

The sun, the moon and the day-cycle scale​

CSky::Update (0x09173C60) converts the clock's seconds from midnight to hours and passes them through the world's CDayCycleScale curve, which returns the fraction of the day (retail values). That fraction times 2π is the day angle. The sun and moon rotations are built from it and two angles in CSky at +0x5C and +0x60, and the results land in the scene state:

CSceneSky offsetValue
+0x6CStorm factor
+0x94Day angle
+0x138Sun direction
+0x184Moon direction
+0x1A8Night factor: (sun.z - a) / (b - a) clamped to 0–1, with a and b the CSky members at +0x84 and +0x88
+0x1ACTime-of-day coordinate: (π - acos(sun.z)) / 2π, or one minus that while the sun's x is negative
These offsets are the server's, not Dunia.dll's

In Dunia.dll (Steam v1.03) the scene state has the sun direction at +0x148, the direction the clouds are lit from as the moon at +0x194, the night factor at +0x1B8 and the time-of-day coordinate at +0x1BC (the sky and cloud system): each of those four is the server offset plus 0x10. The storm factor breaks the pattern, +0x6C here against +0x78 there, so no other offset on this page carries over by adding 0x10.

The environment manager itself is reached through the global at Steam 0x10FE4174 (GOG 0x10F33874), loaded just before the frame's call of Update. Its CSky sits at +0x270 and keeps the sun direction it copies into the scene state at +0x44, so the sun can be read without the renderer: at 9 on the test range it was (0.89, -0.04, 0.46) and at 17 (-0.69, -0.06, 0.72), east then west, as the shadows fell (seen in game). The clock's seconds sit at +0x260.

GetNormalizedTimeOfDay (0x09156C80) returns +0x2F0 of the manager, and the lighting, fog, cloud and sky presets are all evaluated at it. Its writer is not found, so whether presets follow the raw clock or the day-cycle scale is open.

The scene light is the sun or the moon, whichever is brighter​

GetFinalLighting fills a CLightingSetup from the lighting presets:

OffsetMember
+4fLightHDRMul
+16clrSunLightColor
+32clrMoonLightColor
+48fAmbientLightHDRMul
+64clrAmbientLightColor
+80clrGroundColor
+96fRimLightIntensity

It blends three things in turn: the zones' presets, the storm preset by the storm factor, and a script's lighting override, whose preset the manager holds at +0x168 and its weight at +0x17C. Two functions call it, UpdateSky and UpdateLight, and both run in Update after the weather update, so anything written over the storm factor there reaches the frame's light. In the Steam Dunia.dll it is 0x10119100, a thiscall taking the time of day and the setup to fill and popping 8 bytes; UpdateSky is 0x1011A380, UpdateLight 0x1011A7C0 and the weather update 0x10118FB0 (RE-verified, Steam v1.03; the bytes match GOG v1.03).

The two calls ask for different hours. UpdateLight passes the time of day; UpdateSky passes it remapped as (t - 0.5) * k + 0.5, with k read from the sky's descriptor (not traced), and clamped to 0..1. At night the two setups differ: at 01:30 on a clear night UpdateSky's has almost no moonlight and about half the light multiplier UpdateLight's has (seen in game, GOG v1.03). A hook on GetFinalLighting that acts on the scene light tells the calls apart by the return address, which for UpdateLight sits 33 bytes into 8D 4C 24 70 D9 5C 24 20 E8 ?? ?? ?? ?? D9 44 24 20 8D 44 24 70 50 51 8B CE D9 1C 24 E8.

CDynamicEnvironmentManager::UpdateLight (0x0915F110) then:

  • writes the ambient colour times fAmbientLightHDRMul to CSceneSky +0x300, the ground colour to +0x30C, and the rim light intensity, clamped at zero, to +0x134;
  • multiplies both the sun's and the moon's colour by the one fLightHDRMul;
  • compares their luma, weighted (0.3, 0.59, 0.11). If the moon's is greater, the scene's CSceneLight takes the moon's direction and colour; otherwise it takes the sun's, including when both are black;
  • sets the light's fShadowFactor (+0x4C) to 1 and its cast-shadow flag (+0x48) on, every frame, with C6 40 48 01 at 0x1011AC00. Patching that immediate to 0 stops the shadow maps being drawn at all, which is how a light too dark to show a shadow saves their cost;
  • returns whether the sun won, which Update keeps as IsSunLight.

So moonlit shadows are in the stock engine. Whether they can be seen is decided by the lighting preset, the moon's colour against the ambient; retail's values are in environment presets.

Where the shadows point​

CSky::UpdateShadow (0x091738A0) takes IsSunLight and runs after UpdateLight while the light casts shadows:

  1. It starts from the day angle at +0x94. For the moon it adds the arc cosine of the value at +0x178, wrapped into one turn. What +0x178 holds is not traced.
  2. Angles between π/2 and 3π/2 are mirrored to π - angle, so dawn and dusk are handled alike, and mirrored back at the end. For the sun, an angle past 3π/2 counts as negative.
  3. Below gfx_SunShadow_InertiaStartAngle the angle stops following the body and eases toward gfx_SunShadow_InertiaEndAngle, both in degrees: end + (start - end) / ((start - angle) / (start - end) + 1). A low sun or moon never lays shadows flatter than the end angle.
  4. The eased angle becomes a rotation, combined with CSky's own rotations. The negated direction is written to +0x318–+0x320, and the angle to +0x324 and back to +0x94.

In the Steam Dunia.dll the same function is 0x1018C260; its angle fields sit 0x10 further on (+0xA0, +0x328–+0x334). It reads the two settings from floats at 0x10F94404 (start) and 0x10F94408 (end) every time it runs, so writing either changes the next frame. Retail ships 50 and 25: from a sun at 50° down, shadows ease toward 25° and lie at about 33° when the sun sets, as long as mid-morning's. Because the eased angle is written back over the day angle, what the rest of the frame takes for the sun's height stays up there too. With 15 and 8, measured in game, shadows follow the sun to 15° and lie at about 10° at sunset.

The cascade ranges live in CRenderConfig, a 0x884-byte singleton whose pointer is at 0x11609560 in the Steam Dunia.dll. Its shadow section sits at +0x778 and holds SunShadowFadeRange at +0x3C and SunShadowRange0 to 2 at +0x40 to +0x48. The renderer does not draw from it: the renderer object (pointer at 0x11607C90, 0x3B8 bytes) copies the whole CRenderConfig when it is created and keeps the copy's pointer at +0x2C. Writing the global's SunShadowRange0 was measured to have no visible effect in game, while the gfx_SunShadowRange0 console setting takes effect at once. Raised much past its retail 4, measured in game, the cascades stop joining up: looking away from a low sun, stretches of ground lose their shadow as if the casters were culled. 18 is about the most that stays continuous with 15 and 8 for the angles and the other two ranges at their retail 20 and 140.

What the shadows' receivers are handed​

Verified via reverse engineering

Traced via GhidraMCP in the Steam Dunia.dll v1.03; addresses in this section are that build's. The manager's offset and the slot layout were checked against GOG v1.03's bytes.

Every shader that receives a light's shadow takes its values from a CNewLightingDataProvider, whose parameters FUN_103cc7b0 registers by name. The renderer object keeps a lighting manager at +0x34, 0x6DE0 bytes, made by CSceneRenderer_Init (GOG makes it at the same offset). The manager holds 29 slots of 0x3A0 bytes from +0x10, one per light, each with a provider inside; +4 points at this frame's array of slot pointers and +8 counts them.

A slot starts with a pointer to the light's descriptor, whose +4 is 0 for a directional light. Each shader value sits 0x10 past its parameter's member, so from the slot:

OffsetParameter
+0x110LightDirectionWS
+0x170LightColor
+0x1C0ShadowSampler, its engine texture at +0x1CC
+0x220ShadowMapSize: width, height and their reciprocals
+0x240ShadowProjectionMatrix, four registers, world space
+0x290CascadedShadowRanges
+0x2B0CascadedShadowScale
+0x310CascadedShadowSliceScaleOffsetsBiased, three registers
+0x350, +0x370CascadedShadowSliceDepthScales, ...DepthOffsets
+0x390CascadedShadowDepthRanges

The projection is copied in by 0x10382c40 (ECX the manager, RET 4), only when the first light in the frame's list is directional, from raw floats at manager +0x6A60, transposed on the way, so the four registers at +0x240 are exactly what the shaders read. The engine texture is a CTextureD3D9 whose IDirect3DTexture9 sits at +0x18. Its format is picked at startup: D24S8, or D16, where the card compares depth in its sampler; otherwise FOURCC DF24 or DF16, which hold the depth itself. The colour target drawn beside it is FOURCC NULL on an NVIDIA card (the device's +0x11) and a real R5G6B5 on any other (0x103aa1c6, RE-verified on Steam). Spot and omni lights have slots and shadow textures of their own, so the sun's stays as it was drawn for the rest of the frame.

The clouds are lit from a stretched clock​

UpdateSky (0x091601A0) evaluates the cloud material from the cloud preset, the storm's cloud preset blended in by the cloud transition curve, and a cloud override. It then evaluates the lighting presets a second time, at (t - 0.5) × scale + 0.5 clamped to 0–1, where t is the normalised time and scale is the material's fSunLightColorSamplingScale (CCloudMaterial +0x34). Formation, material and that lighting go to CSky::SetClouds. A scale above 1 squeezes the day's lighting into a shorter span around noon, for the clouds only.

Storm, rain and wind​

The manager offsets in this section read the same in Dunia.dll (Steam v1.03).

Storm​

The storm is a factor from 0 to 1 that every frame recomputes, not an event that starts and stops.

  1. UpdateWeather (0x0915A000) adds the frame's game time times the time scale, in hours, to the storm hour at +0x480. It skips this while the storm override's weight is above zero, and does nothing at all while +0x30 is set. The clock's shadow-movement hold does not stop it.
  2. GetStormFactorFromCurve (0x09157C00) evaluates the world's CEnvironmentWeather preset, the Storm set's Intensity, at the storm hour. The hour goes back to zero once it passes the curve's last knot, so the curve loops. The result is clamped to 0–1 and stored at +0x484.
  3. That value is multiplied by one minus the desert zone's weight. The weight used follows the zone blend's (+0x258) at no more than 1/120 per second.
  4. GetStormFactor (0x09157510) lerps +0x484 toward the scripted value at +0x1B8 by the override's weight at +0x1CC. Its readers are Update, GetFinalLighting, UpdateSky and UpdateAtmosphericScattering. The Steam Dunia.dll inlines it into Update (0x10121870), which computes the same lerp straight after UpdateWeather (0x10118FB0, RET 4) returns, so a value written to +0x484 at that point reaches every reader with a script's override still blended over it.

SetScriptedStormFactorOverride(value, seconds) clamps the value into +0x1B8 and blends the weight to 1 over the seconds given. RemoveScriptedStormFactorOverride(seconds) blends it back to 0. The manager's environment reset (Dunia.dll Steam 0x1011CF70) clears the blend, so an override does not survive it.

Zone blending (UpdateZoneBlending, 0x0915FA50) reads the weights of the player's CZoneInfoComponent. Savannah, plus whatever no zone covers, goes to +0x230, jungle to +0x244 and desert to +0x258, each blended over half a second. Each of the three is the last float of a blend block of five, starting at +0x220, +0x234 and +0x248: from, to, duration, time elapsed and the current weight.

While the flag at CGameControllerManager +4 is set, the curve is replaced by SetMultiplayerWeather: either a fixed factor or the curve started from a chosen point.

Rain​

EvaluateRainProbability (0x09158950) decides whether it rains. It is skipped while +0x14 is set, and takes layer 1's cloud coverage as UpdateSky returns it, with the storm clouds and a cloud override already blended in.

ConditionEffect
Desert weight at least 0.6, or coverage at or below the threshold and below 0.63The raining flag at +0x49C is cleared and the timer at +0x4A0 set to 180
Coverage above the threshold at +0x4A4The timer counts down by frame time times the time scale. When it expires, a roll sets the flag, true with a probability of about the coverage less a random tenth, then picks a new threshold from 0.63–0.75 and a new timer of 180–195 times the time scale
Anything elseNothing changes

UpdateRain (0x0915F650; Steam 0x1011B480, frame time and wind force, RET 8) acts on the flag through the CRainComponent of the entity the terminal is focused on, and does nothing when that entity has none.

  • Starting and stopping: it starts or stops the component whenever the flag disagrees with the component's own state. It sets the target at +0x48C to 1 or 0 and blends the intensity at +0x498 toward it over five seconds, from the intensity at +0x488 it started from.
  • Strength: CRainComponent::SetIntensity (0x090A1150; Steam 0x10050270, RET 4, called by UpdateRain every frame) stores the intensity and hands it to the rain particle system's +0x60. CastRays (0x090A20A0) casts rays per second times the intensity, and GenerateSplashes (0x090A2FB0) makes the render config's splash count times the intensity, so an intensity below 1 is lighter rain. Both count per second times the frame time they are handed. Retail only ever blends it between 0 and 1.
  • Angle: 270° plus 35° times the square of force/180 (capped at 1), turned by the drift direction at +0x4B0 less 90°.
  • Sound: the intensity also goes to the ambience manager.
  • Drops: one particle system, psRainEmitter, drawing graphics\gfx\atmospherics\gfx_rain.xbt (128×32 streaks), kept by CRainComponent::Update (0x090A5940) at the player less the emitter offset +0xF8 along the rain direction +0xEC, led by the player's movement. Splashes are psRainSplash, retail's environment.weather.rain_splash: two sprites, an animated splash (gfx_splash_anm2.xbt, size 0.1, 0.4 s) and a drop (gfx_rain.xbt, size 0.2, 0.35 s), both with a gravity of 3.5. Finalize makes a pool of 250 of the system, a count the constructor sets, and a splash with the whole pool still playing is skipped.
  • Cover: Start (0x090A2B70) switches on a scene light at +0x68 and gives the drops its group through SetOcclusionLightGroup; Update keeps that light up-rain at twice the emitter offset. The component's setup makes it an orthographic light 64 by 64 m across and 128 m deep, in light group 0x80000000. Drops are hidden by a rain shadow map from it, drawn from materials flagged RainOccluder (byte +0xF, read in mrl::SetupMaterial, Steam 0x10362DE0) at the render config's RainShadowMapSize.
  • The cover map in a frame: while it rains, two passes follow the sun's cascades into a 512×512 NULL render target with a D24S8 depth texture, solid draws then alpha-tested ones. The view-projection at c4 to c7 during them is the light's: orthographic, 2/64 across, with the player at its middle. A projected read of the texture compares, one in the open and nought under cover. Seen in a running game (GOG v1.03); a room's interior reads covered. Tree crowns cover too: their leaves are drawn into it through the foliage vertex shaders, and without those draws the ground under a tree reads open (seen in a running game, GOG v1.03).
  • Layout in the Windows build: the Steam and GOG CRainComponent sit 0x14 lower than the server's from the light on: the drops' particle handle at +0x24, the light handle at +0x54, the started flag at +0x5D, the rain direction at +0xDC.
  • Splash rays: each CastRays (Steam 0x100520E0, frame time, RET 4) ray starts 64 m up at a random point of a grid region round the player and runs 128 m along the rain direction against collision filter 0x13. UpdateDelayedRayCasts (0x090A5090) keeps each region's hits, the water level standing in when it is higher, up to uiMaxRaysPerRegion, dropping the oldest for new ones, and GenerateSplashes (Steam 0x10054070, frame time, RET 4) places each frame's splashes on random hits of one random region. The player's component casts 25 rays a second into 16 regions of 8 m. The rays find nothing for the drops.
  • Render config: DisableRain and RainNumSplashesPerSecond beside RainShadowMapSize. The splash count is 25 a second up to High, 30 on Very High and 35 on Ultra High (defaultrenderconfig.xml).

BindTemplates binds only the lighting, cloud and fog transitions, so nothing reads the two retail Default.Transition.Rain presets. SetNewWeather and StartRain are empty.

Wind​

Step 4 of the update builds the force. The storm's contribution is its wind preset's fWindForce times 1.1 + 0.2 sin(2π × storm hour).

  • Fluctuation: EvaluateWindForceFluctuation (0x09157CB0) eases the multiplier toward a random target from 0.8 to 1.5, and picks a new target every 900 × time-scale seconds of game time.
  • Direction: EvaluateWindDirection picks a new target within about ten degrees every 240 × time-scale seconds, biased to keep turning the same way.

ApplyWindToEnvironment (0x09158660; Steam 0x10118AE0, no arguments, RET 0) reads the force at +0x3D8 and the direction at +0x3DC, in degrees, and sends them to:

  • RealTree's vegetation;
  • the clouds, which scroll at the force times 0.7;
  • the 3D engine's and the physics world's wind velocity, the force times 0.0917 truncated, along the direction;
  • the ambience manager.

GetWindForce (0x091581E0) returns +0x3D8. Its readers:

ReaderWhat it does with the force
Fire propagationAlso reads the direction
CFanComponentSpins at force/250
CFCXParticleAmbianceComponentStarts its particles above 70, at full strength by 250

Measured, not explained​

Verified in a running game

Retail GOG v1.03, with mods/sky-overhaul logging the scene state.

  • SetScriptedStormFactorOverride(1.0, 3) through the developer console does not lift the storm factor the sky reads above 0.10–0.20.
  • No rain appears under any weather tried.

Open​

  • The writer of +0x2F0, and so whether presets follow the day-cycle scale.
  • What +0x178 holds, which offsets the moon's shadow angle.
  • What reads the two untraced override blocks.
  • How CEnvironmentAdaptiveBloom's fColorRemap values become the final pass's per-channel powers, and how presets are blended before they reach it. The contrast's mapping is measured (environment presets).