public sealed class BloomRendererThe dual-filter bloom chain: a downsample pyramid, then an upsample that adds each level back.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The first multi-pass effect, and the one worth building early for that reason. A single post pass proves the node; a pyramid proves the graph — nine textures whose lifetimes overlap in a strict pattern, each written by one pass and read by exactly one other, which is precisely the shape transient aliasing exists for.
Mips rather than one wide blur. Each level halves the resolution, so a bloom spanning a quarter of the screen costs about a third more than its first level alone. A blur wide enough to do that in one pass would be hundreds of taps at full resolution.
The chain is declared, not imported. Every level lives and dies inside the frame, so the graph owns them — which means the level-4 texture can be the same memory as something else in the frame that had finished with it, and a bloom nothing reads costs no passes at all.
The children are real FullScreenRenderers, kept between frames. Each one owns a pipeline cache and a uniform buffer; rebuilding them every frame would recompile the same pipelines and reallocate the same buffers, which is most of what a post chain could get wrong. What is rebuilt per frame is only what depends on the frame's size.
Fields and properties (20)
public string ShaderNameThe shader to run, in its four modes.
public required string SourceThe name of the texture the chain reads.
public string OutputThe name the chain's result is published under, for whatever composites it.
public int LevelsHow many levels the pyramid has, the first at half resolution.
public PixelFormat FormatThe format every level has.
public float ThresholdLuminance above which a pixel contributes.
public float KneeHow soft the threshold is, which is what stops highlights popping in and out.
public float FilterRadiusThe upsample tent's radius in texels, which is how wide the bloom spreads.
public float IntensityHow much of each level is added on the way up.
public bool KarisAverageWhether the first downsample Karis-averages its taps, which stops highlight flicker.
public EffectPipelineDescriber? ModulesWhere shader modules come from.
public DescriptorAllocator? DescriptorsWhere descriptor sets come from.
public SamplerCache? SamplersWhere the sampler comes from.
public IGraphicsDevice? DeviceThe device its pipelines and uniform buffers are created on.
public uint SourceBindingWhich binding the source texture occupies.
public uint SamplerBindingWhich binding the sampler occupies.
public uint PreviousBindingWhich binding the larger mip occupies, for the upsample mode.
public uint ConstantBindingWhere the uniform block goes.
public int PassCountHow many passes the last build declared.
public IReadOnlyList<FullScreenRenderer> PassesThe chain's passes, the first PassCount of which are this frame's.
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 (6)
- BloomTestsVixen.Rendering.PostFx.Tests
- CompositorContentTestsVixen.Assets.Tests
- CompositorImageTestsVixen.Graphics.Golden.Tests
- HarnessVixen.Rendering.PostFx.Tests
- PostEffectFactoryVixen.Rendering.PostFx
- PostEffectTestsVixen.Rendering.PostFx.Tests