Vixen
dd8b0a81
csharp
public record class AmbientCombineAsset

Puts a split frame back together — the consumer end of the ambient split.

Read the guide page for this →

Remarks

The node a split document ends its lighting with. ForwardPlus.SplitOutputs (and the resolve, under the same key) writes direct light to one target and holds diffuse ambient back; this multiplies an irradiance plane by the albedo plane, occlusion into that ambient and sun visibility into the direct term, and adds reflections weighted by the surface's own f0 — direct × sun + albedo × irradiance × occlusion, one full-screen pass. A document names the planes; the first three are the split pass's own targets, and everything after them is optional with a stated stand-in: absent occlusion reads as one, absent irradiance and reflections as nothing, an absent f0 plane as a dielectric.

Sun visibility multiplies DIRECT and occlusion multiplies AMBIENT — !DistanceFieldAo's own channel rule, kept here. Where a shadow map already shadows the sun, the document sets that node's sunShadow: false; the double-application guard is that knob, not arithmetic in this pass.

Fields and properties (16)

  • public string Name

    The node's name, for debug groups and for a human reading the file.

  • public bool Enabled

    Whether the node runs.

  • public string Direct

    The split pass's first target: direct light, emissive and specular ambient.

  • public string Albedo

    Its second: diffuse albedo in rgb, the material's own occlusion in a.

  • public string Normals

    Its third: world normal in xyz, roughness in a. Zero length marks a skyward pixel.

  • public string Specular

    Its fourth: specular reflectance at normal incidence — the material's f0 — in rgb. Empty weighs every surface as a dielectric.

  • public string Irradiance

    Screen irradiance over π — !IndirectDiffuse's output, or !ScreenProbeGather's; both publish the same kind of plane. Empty contributes no ambient at all.

  • public string Occlusion

    !DistanceFieldAo's plane: occlusion in r, sun visibility in g. Empty reads both as one.

  • public string ContactOcclusion

    !Ssao's plane: occlusion in r, contact scale over the field's room scale. Empty reads one.

  • public bool ContactBentNormal

    Whether that plane carries a bent normal — direction in rgb, occlusion in alpha — which is what !Ssao writes with its own BentNormal on.

  • public string Reflections

    !Reflections' plane: radiance in rgb, validity in a. Empty blends none in.

  • public string Depth

    The full-resolution depth, for the bilateral AO upsample. Empty keeps the linear read.

  • public string View

    The view whose camera drives the upsample's plane test.

  • public float PlaneTolerance

    How far off a pixel's plane a reduced texel may stand and still count, in metres.

  • public string Output

    The name the combined radiance is published under.

  • public float Intensity

    A multiplier on the rebuilt ambient alone.

Used by (6)

  • PostEffectFactoryVixen.Rendering.PostFx
  • PostEffectTestsVixen.Rendering.PostFx.Tests
  • StandardFrameVixen.Rendering.PostFx
  • StandardFrameTestsVixen.Rendering.PostFx.Tests
  • TypeRegistrationVixen.Rendering.PostFx
  • Vixen_Rendering_PostFx_AmbientCombineAssetSerializerVixen.Rendering.PostFx