godot icon indicating copy to clipboard operation
godot copied to clipboard

Lights and meshes contribute to GI even if not on the same visibility layer as the camera

Open ettiSurreal opened this issue 1 year ago • 0 comments

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

  1. Make a simple scene
  2. Add a Camera3D, disable the second layer in the culling masks
  3. Add some objects and lights, make it so they only exist on the second layer
  4. Add any type of GI.
  5. Run the scene, there should be GI coming out of invisible objects.

Minimal reproduction project

GILeaking.zip

ettiSurreal avatar Mar 09 '23 07:03 ettiSurreal