Limitations
Scripting
Use the PostProcessing scripting API to add temporary layers to the active scene. A layer cannot edit or replace the scene's profile asset, change the camera's Post Processing switch, or change the project's Color Space. Set those up in the editor.
Profiles
- A scene names one profile. Profiles are not blended, layered or limited to a region of the scene.
- A camera's switch is on or off. A camera cannot name a profile of its own.
- The eight effects run in a fixed order. Lens Flare is authored in a profile and is not part of the scripting override API.
- Tonemapping has three modes:
None,NeutralandACES. - Lens Flare takes its bright areas from Bloom's Threshold, Clamp, Scatter, Downscale and Max Iterations. It has no threshold of its own.
- A running game reads a profile once and keeps it. It does not reload a profile whose file changes. Restart Play to see an edit in the running game.
- The editor writes profile numbers as 32-bit floats with all their
digits, so 0.9 appears in the file as
0.8999999761581421.
Cameras
A running game draws the frame from one camera, the primary camera. Only its Post Processing switch affects the frame.
Color Space
- The setting is per project. A scene cannot choose its own.
- A Play session and a running game keep the value they started with.
Output
The final pass writes display values between 0 and 1. Scene color above 1 clips to white unless Tonemapping is on. In a Gamma project the scene color target holds 8 bits per channel, so scene color stops at 1 before any effect reads it.
Editor
The Scene view applies the scene's profile whenever the scene names one. It has no switch for effects.
Web Builds
A Linear project's RGBA16F target depends on the player's browser and device. When the device refuses it, the game runs with an 8-bit target and logs a warning. See Post-processing in Web builds.
Costs
The Scene Color Target
- A scene drawn through the target uses a color texture and a depth buffer the size of the frame in pixels, and one full-frame draw to bring the color onto the destination.
- Every 3D scene pays this, and every scene of a Linear project, with or without a profile.
- A 2D scene of a Gamma project pays it only while an effect changes the picture. With none, it is drawn directly and the target's memory is released.
- A Linear project's target uses 16-bit floats per channel in place of 8 bits.
The Final Pass
- With no effect on, a Gamma project's final pass is a plain copy and a Linear project's is the display encode alone.
- Each effect that is on adds its step to the one final pass shader. An effect that is off adds nothing.
- Each combination of steps is compiled the first time a frame uses it and kept until the game or editor closes.
- An effect that is ticked but changes nothing, such as one at Intensity 0, adds no step and no cost.
Bloom and Lens Flare
- Bloom and Lens Flare share one chain of images, drawn before the final pass when either is on. A chain of n levels uses n color targets and 2n - 1 full-target draws: one bright pass, n - 1 downsamples and n - 1 upsamples.
- The first level is half the frame with Downscale
Halfand a quarter withQuarter. Each level after it is half the one before. - Max Iterations caps the number of levels, from 2 to 8.
- The bright pass and each downsample read 13 samples per pixel. Each upsample reads 9.
- High Quality Filtering reads the bloom image with four texture reads in place of one when it is added to the scene.
- Lens Flare adds one target and one draw at the first level's size.
- The images use the scene color target's format: 16-bit float in a Linear project.
- Each frame size in use keeps its own chain, so editor views of different sizes each keep one. A chain is released 16 bloom renders after its last use.
Measuring
The diagnostics overlay's Breakdown shows one Render time for the frame. It includes the bloom chain and the final pass. No view shows the cost of each effect separately.
High-DPI Displays
- The scene color target has the frame's size in pixels. On a high-DPI window that is larger than the size scenes and UI are laid out in, so the target and every bloom level grow with the display's scale.
- On Windows the runtime asks for a high-DPI window in the Borderless Fullscreen launch mode.
- Vignette, Chromatic Aberration and Lens Flare are measured in fractions of the frame, whatever its pixel size.
- Film Grain is generated per pixel of the frame, so a grain is one pixel wide at any scale.
- Bloom's levels are fractions of the frame's pixel size.
UI and Overlays
UI canvases and the diagnostics overlay are drawn on the frame after the final pass, in display color.
- No effect reaches them: Bloom does not glow from UI, Vignette does not darken it, and Tonemapping and Color Adjustments leave its colors alone.
- The project's Color Space does not change how UI blends.
- A profile has no option to include UI.
In the editor's Scene view, the grid, collider outlines, gizmos, selection outlines, the UI preview and light icons are left out of the effects in the same way.