Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Showcase Fast Post-Processing for VR / Unity URP

Discussion in 'VR' started by Kleptine, Sep 19, 2022.

  1. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    241
    In case anyone is interested and trying to solve the same problems, I wanted to share a blog post I wrote about how I implemented tonemapping and color grading in The Last Clockwinder.

    The standard Unity URP post processing pipeline is written to use a secondary fullscreen pass, but instead, I made several modifications to move much of the post processing into the Forward Geometry Pass, along with the pixel shader.

    https://johnaustin.io/articles/2022/fast-post-processing-on-the-oculus-quest

    You can take a look at the final code in the PR here:
    https://github.com/AStrangerGravity/Graphics/pull/3

    The shader modifications weren't tricky, but it took some work to make the SRP Pipeline support it as an extra mode. Our fork adds an extra dropdown in the pipeline settings to enable forward pass color transformations.

    Happy to answer any questions!
     
    glenneroo and mgear like this.
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,243
    What else is in this repo?
    And is spacewarp supported?
     
  3. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    241
    This is our fork of the Unity/Graphics repo. We implemented a bunch of customizations for The Last Clockwinder, which you can peek at in the PR list.
    - Forward Pass Post Processing
    - Baked Specular Lighting
    - Disabled Directional Light and Point Lights
    - A custom Fade-to-Black global shader parameter that fades all shaders to black
    - Alpha to Coverage for Alpha Cutout shaders
    - Various shader optimizations that are hyper specific to TLC
    - (Prototype) Custom Post Processing per Render Layer

    Lastly, yes! There is an Application Spacewarp implementation on this unmerged branch:
    https://github.com/AStrangerGravity/Graphics/tree/asg/john/spacewarp

    We didn't ship with ASW though, because it had too many artifacts in our use case.

    Note that this URP fork is fairly specific to The Last Clockwinder, and so you would probably want to cherry pick changes out of it, rather than using this fork wholesale. It's not intended to be a general pipeline for all projects.
     
    DevDunk and glenneroo like this.
  4. ftribelicense

    ftribelicense

    Joined:
    Jun 8, 2022
    Posts:
    2
  5. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    224