public sealed class LocalExposureRendererOne exposure per region of the frame rather than one for the whole of it.
Remarks
The thing a single exposure cannot do. A frame with a sunlit window and an unlit interior has ten or twelve stops between the two and a tone curve has about six to spend, so whatever the meter picks, one of them is white or black. That is what a camera does and what an eye does not, because an eye adapts locally. Unreal 5 ships this and calls it Local Exposure; it is the one effect on their list with no Unity counterpart at all.
Two passes, because the base has to exist before it can be applied. The first blurs the log luminance bilaterally into a quarter-resolution target; the second reads that back at full resolution and re-composes. A fragment stage cannot write a texture it is also reading, so this is a chain rather than a pass — the same shape BloomRenderer has and for the same reason.
⚠ Quarter resolution for the base, and that is a decision rather than a saving. The base is the large-scale brightness of a region by definition; computing it at full resolution would let it follow detail, which is exactly what it must not do. It also makes the bilateral cross reach four times as far across the image for the same tap count.
⚠ Before the tonemap. It moves radiance around before the curve shapes it, which is the point — the whole purpose is to bring highlights into the range the curve can spend. After the curve there is nothing left to recover.
Fields and properties (18)
public required string SourceThe linear HDR colour it re-exposes.
public string OutputThe name the result is published under.
public PixelFormat FormatThe format of the target it declares.
public int TapsHow many taps the bilateral blur uses along each axis of its cross.
public float BlurRadiusHow far the bilateral gather reaches, in texels of the reduced image.
public float EdgeRangeHow different two luminances have to be, in stops, before a tap stops counting.
public float HighlightContrastHow much the highlights are brought down. 0 is off.
public float ShadowContrastAnd how much the shadows are brought up.
public float MaximumStopsA ceiling on how far any pixel may move, in stops.
public float Ev100The exposure the frame will be graded at, which is what the compression pivots around.
public RenderView? ViewThe view whose lens supplies the exposure value, or null for Ev100.
public EffectPipelineDescriber? ModulesWhere shader modules come from.
public DescriptorAllocator? DescriptorsWhere descriptor sets come from.
public SamplerCache? SamplersWhere the samplers come from.
public IGraphicsDevice? DeviceThe device its pipelines and uniform buffers are created on.
public int PassCountHow many passes the last build declared.
public IReadOnlyList<FullScreenRenderer> PassesThe chain's passes, for a test or an inspector.
public float PivotThe log-2 luminance the compression pivots around.
Methods (3)
public void Apply(in PostProcessOverlay overlay)protected override void Build(GraphicsCompositor compositor, CompositorFrame frame)Declares this node's render-graph passes.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (2)
- PostEffectFactoryVixen.Rendering.PostFx
- PostEffectTestsVixen.Rendering.PostFx.Tests