How to not show different light sources in different cameras
I'm trying to implement a system where there are two cameras: main camera and secondary camera. Main camera shows the whole scene to the player while a secondary camera renders a portrait of a character (gameobject) in the UI by a render texture.
My problem: How to not show the main light in the secondary camera and the secondary light in the main camera.
I have tried different layers and culling masks but so far I haven't figured out how to not separate the light sources in different camera feeds properly.
Any help would be appreciated.
Here is a picture attempting to visualize the problem:
https://www.dropbox.com/s/f4rjajcblr28t8n/Unity%20problem.png?dl=0
Your answer
Follow this Question
Related Questions
Disabling a specific light for only a specific camera in Universal Render Pipeline (URP) 0 Answers
How to hide light from second camera 0 Answers
Simulation of vision impairments like Glaucoma and Cataract 0 Answers
Wrong Coloring (Sometimes) when capturing "Screen"-shot 1 Answer
Proper SetTargetBuffers usage with Deferred rendering in unity 5.5 (possible problem?) 1 Answer