public sealed class TonemapRendererThe pass every frame ends with: linear HDR in, displayable colour out.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Everything upstream works in linear radiance with no upper bound, because that is what light is and what makes exposure, bloom and additive lighting compose correctly. A display takes neither of those things, so something has to map an unbounded range onto zero to one and encode it — and doing it anywhere but the end means every effect after it works on numbers that have already been squashed.
It ran before this existed, and that is the point of the change. Tonemap.rvn has been the worked example for the full-screen node since the node was written, configured by hand wherever a frame needed one — a shader name, five parameter keys and three bindings, spelled out per host. As an effect it is one line in a document like every other, and the grading LUT the shader has always taken finally has something that binds one.
Fields and properties (31)
public required string SourceThe linear HDR colour it maps.
public string LutA 3D colour lookup table, or empty for none.
public int OperatorWhich curve maps the range: 0 Reinhard, 1 ACES, 2 AgX, 3 filmic, 4 none.
public bool EncodeSrgbWhether the result is encoded to sRGB here rather than by the swapchain.
public float ExposureWhat the scene's radiance is multiplied by before the curve.
public string ExposureBufferThe buffer AutoExposure left this frame's measured exposure in, or empty to use Exposure.
public string BloomThe bloom pyramid to add before the curve, or empty for a frame with no glow.
public float BloomIntensityHow much of the pyramid reaches the image.
public Vector3 BloomTintWhat colour the spill is — the coating on the lens rather than the light.
public string BloomDirtDust and smears on the front element, or empty for a clean lens.
public float BloomDirtIntensityHow much the dirt brightens the bloom.
public ColorGrading? GradingThe four-range colour decision list, or null for no grade.
public RenderView? ViewThe view whose lens sets the exposure, or null for an authored one.
public bool LensExposureWhether the view's lens supplies the exposure, because nothing else did.
public float WhitePointThe radiance that maps to white.
public float ContrastContrast, applied around middle grey.
public float SaturationSaturation, 0 for greyscale.
public float TemperatureThe colour temperature the scene is lit at, in kelvin, or zero to leave it alone.
public float TintGreen to magenta, −1 to 1. The axis a colour temperature does not have.
public Vector3 ColorFilterMultiplied into the scene before anything else grades it.
public float HueShiftHue rotation in radians.
public float SplitBalanceWhere split toning crosses over, −1 towards shadows and 1 towards highlights.
public float FilmicShoulderStrengthHable's shoulder strength. Read when Operator is 3.
public float FilmicLinearStrengthHable's linear strength.
public float FilmicLinearAngleHable's linear angle.
public float FilmicToeStrengthHable's toe strength.
public float FilmicToeNumeratorHable's toe numerator.
public float FilmicToeDenominatorHable's toe denominator.
public Vector3 ShadowTintWhat the shadows are tinted toward.
public Vector3 HighlightTintWhat the highlights are tinted toward.
public float LutSizeHow many entries the LUT has along one axis.
Methods (3)
public TonemapRenderer()The pass every frame ends with: linear HDR in, displayable colour out.
public void Apply(in PostProcessOverlay overlay)protected override void Configure(CompositorFrame frame, ParameterCollection parameters, IList<ResourceBinding> bindings)Fills in this frame's parameters and bindings.
Used by (4)
- AutoExposureTestsVixen.Rendering.PostFx.Tests
- HarnessVixen.Rendering.PostFx.Tests
- PostEffectFactoryVixen.Rendering.PostFx
- PostEffectTestsVixen.Rendering.PostFx.Tests