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

Open
iBicha opened this issue Nov 14, 2018 · 0 comments
Open

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

iBicha opened this issue Nov 14, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@iBicha
Copy link
Owner

iBicha commented Nov 14, 2018

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.

@iBicha iBicha added the bug Something isn't working label Nov 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant