Skip to content
This repository was archived by the owner on Apr 7, 2023. It is now read-only.

[TIP] Legacy effects (without Postprocessing Stack) #4

@iBicha

Description

@iBicha

It is currently possible to use the created effects directly on the camera (aka using OnRenderImage), without the need for the postprocessing stack.

For this, two things needs to be done:

  1. Step 1: Property blocks needs to be generated. simply change this line here from:
generatePropertyBlock = false

To:

generatePropertyBlock = true

For some reason, the postprocessing stack only works with false, and OnRenderImage only works with true.

  1. Step 2: Comment out this line:
#ifndef UNITY_POST_PROCESSING_STACK_V2
 //#define UNITY_POST_PROCESSING_STACK_V2 // comment this line to use without postprocessing stack
#endif // UNITY_POST_PROCESSING_STACK_V2

This keyword is supposed to be passed from script, so the shader compiler knows what to compile (postprocessing stack vs legacy effect) but due to keyword count limit to 256, this might fail.

Finally, open the shaders in shader graph and save again (this should happen automatically if you edit the legacyEffectPass.template file, so do this in case it doesn't). The effects should be working WITHOUT the postprocessing stack using this script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions