T3D Rendering Layers does not have Light3D Cull Mask functionality
brohd11 opened this issue · 2 comments
Terrain3D version
v0.9.1
System information
Godot v4.2.2.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 Super (NVIDIA; 31.0.15.4659) - Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 Threads)
Is the issue reproducable in the demo?
Yes
Issue description
I have the light's cull mask set to omit layer 2.
The mesh cube is set to the same visual instance layer as Terrain3D is set in the screenshot.
The mesh of Terrain3D still receives the light no matter what layers are being rendered, the mesh instance ignores the light, as per how visual instance should function.
Wondering if this is possible or anyone has a workaround
Thanks guys!
Logs
No response
The terrain is on two layers: the renderer layers (1-20) and the mouse layer (32) as shown in your picture. It's a GPU driven mouse. You can't access layers 21-32 on your light via the UI. Set it by code:
demoscene.gd
@tool
extends Node
func _ready() -> void:
if not Engine.is_editor_hint() and has_node("UI"):
$UI.player = $Player
$World/DirectionalLight3D.light_cull_mask = ~( 1<<31 | 1<<1 ) # Not 32 or 2
I remember reading about these hidden layers in the docs, very cool. That did the trick perfectly, thanks so much!