godot
godot copied to clipboard
Lights and meshes contribute to GI even if not on the same visibility layer as the camera
Godot version
v4.0.stable.official [92bee43ad]
System information
Windows 11, Vulkan Forward+
Issue description
First off, I understand that this might be a problem impossible to easily solve, or that the GI nodes weren't made with this use in mind.
I am making a game where the player sees the world through two cameras at once, both seeing objects and lights the other doesn't. I do it by simply using two cameras, and setting what each sees by setting the visibility layers of objects and cull mask on the cameras. One for shared, one for camera A only and one for Camera B only.
However for all GI solutions, it takes all lights and objects in the scene, disregarding which ones the camera actually sees and making them contribute to GI. Even objects that dont exist on any layer and lights with every layer disabled on the culling mask still contribute to GI. But that might warrant its own report.
Steps to reproduce
- Make a simple scene
- Add a Camera3D, disable the second layer in the culling masks
- Add some objects and lights, make it so they only exist on the second layer
- Add any type of GI.
- Run the scene, there should be GI coming out of invisible objects.