Customized URP

ARC uses a modified version of the Universal Render Pipeline which integrates limited color correction and tonemapping options into the forward rendering pass. This is done to avoid copying the render target to main GPU memory which is notoriously expensive on tile-based GPUs.

New options

There are three new options added to the Universal Render Pipeline Asset:

  • bool postprocessInForward - Enable the custom forward pass post-processing. Applies ACES tonemapping by default.

  • float postprocessExposure - Adjust the exposure of the image pre-tonemapping in stops (EV).

  • float postprocessContrast - Adjust the contrast of the image post-tonemapping in percent (%).

Modifications

This is a list of modifications made to the Universal RP package.

To add the new settings to the URP asset, these changes were made:

  • Editor/UniversalRenderPipelineAsset/SerializedUniversalRenderPipelineAsset.cs

    • Added SerializedProperty fields.

    • Added FindProperty() calls in SerializedUniversalRenderPipelineAsset constructor.

  • Editor/UniversalRenderPipelineAsset/UniversalRenderPipelineAssetUI.Skin.cs

    • Added PropertyField field rendering in DrawPostProcessing().

  • Editor/UniversalRenderPipelineAsset/UniversalRenderPipelineAssetUI.Drawers.cs

    • Added GUIContent fields for UI text and tooltips.

  • Runtime/Data/UniversalRenderPipelineAsset.cs

    • Added serialized fields.

    • Added public getters/setters.

The data is then passed to shaders by adding these changes:

  • Runtime/Passes/DrawObjectsPass.cs

    • Added section to enable custom keyword _FORWARD_COLOR_GRADING and pass values via SetGlobalFloat.

  • Runtime/UniversalRenderer.cs

    • Changed RequiresIntermediateColorTexture to not require an intermediate texture when forward post-processing is enabled.

Support for post-processing was added to shaders.