This repository was archived by the owner on Apr 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
[TIP] Legacy effects (without Postprocessing Stack) #4
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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:
- 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.
- 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
Labels
bugSomething isn't workingSomething isn't working