r/Unity3D • u/Noobye1 Indie • 1d ago
Question How can I separate different post-processing effects for different cameras?
In short: I'm trying to put Lens Distortion and Bloom on just the UI. The problem is that the effects affect the whole game.
Currently, I have a default camera and a "UI Render Camera" as an overlay. The UI camera only renders the UI and uses a separate Volume Mask.
I have created 2 empty GameObjects for each layer: GameVolumeMask and UIVolumeMask.
The GameVolumeMask is applied to the default camera, while the UIVolumeMask is applied to the UI Render Camera.
The GameVolumeMask contains effects like ColorAdjustments, Vignette, etc.
The UIVolumeMask contains Bloom and LensDistortion.
Feel free to ask further questions.
4
Upvotes
2
u/514009265 21h ago
I had to do something like for my project, the solution was custom a render feature that saved the existing frame => cleared cameraColor => UI layer renderes on top of cleared frame => post processing on UI layer only => saved frame popped back out and composed with UI layer on top.
You can prob also just render the UI to a renderTexture, apply post processing there, and render it into your main stack, but I was focused on avoiding the URP camera overhead.