godot: Vulkan: OmniLight3D and SpotLight3D not being rendered on macOS (Intel/AMD GPUs only)

Hello,

I have an issue with Omnilights and Spotlights using the current Godot 4.0 build in MacOS. These lights are not rendering inside the editor or in-game. I don’t know if it can be related to the issue I opened this morning and it seems to be solved (https://github.com/godotengine/godot/issues/45656) since I was able to open Godot.

Godot version:

Identifier:            org.godotengine.godot
Version:               4.0 (4.0)
Code Type:             X86-64 (Native)
Commit:           ae6b2d6edc76de347ccb11c4608b6e8174e1884f (HEAD -> master, origin/master, origin/HEAD)

OS/device including version:

Date/Time:             2021-02-02 07:52:33.631 +0100
OS Version:            Mac OS X 10.15.7 (19H2)
Report Version:        12
Bridge OS Version:     4.6 (17P6610)
GPU:                        Radeon Pro 555X 4 GB graphics


Model: MacBookPro15,1, BootROM 1037.147.4.0.0 (iBridge: 17.16.16610.0.0,0), 6 processors, 6-Core Intel Core i7, 2,2 GHz, 16 GB, SMC 
Graphics: kHW_IntelUHDGraphics630Item, Intel UHD Graphics 630, spdisplays_builtin
Graphics: kHW_AMDRadeonPro555XItem, Radeon Pro 555X, spdisplays_pcie_device, 4 GB
Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, DDR4, 2400 MHz, Micron, 8ATF1G64HZ-2G6E1
Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, DDR4, 2400 MHz, Micron, 8ATF1G64HZ-2G6E1
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x7BF), wl0: Feb 28 2020 15:24:56 version 9.30.357.35.32.5.47 FWID 01-9ce4adf3
Bluetooth: Version 7.0.6f7, 3 services, 25 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.1 Bus
USB Device: Apple T2 Bus
USB Device: Touch Bar Backlight
USB Device: Touch Bar Display
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 47.4
Thunderbolt Bus: MacBook Pro, Apple Inc., 47.4

Issue description:

Spotlights and Omnilights are not rendering properly in current version on Godot 4.0; neither running the game or in the editor. The same scenario is currently working in previous builds (last tested build on 2021/01/16 ). In this case the spotlight or omnilight illuminates the sides of the box the light is facing.

DirectionalLights however are working properly.

Steps to reproduce:

  1. Created new proyect
  2. Create new 3D scene
  3. Create CSGBox3D and a Sporlight pointing to the Box
  4. Verify no light it shown.

Thanks in advance!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 24 (10 by maintainers)

Most upvoted comments

Build of “Shader optimizations to reduce VGPR usage and increase occupancy” (7008e3c6eafa374e5d64ee7867608abe696698c2) against latest MVK (1.1.7)

Iris: image

AMD: Works OK

Seems that AMD stops working on the next commit “Added GPU based cluster builder” (099dee35f47db3e293cb8e60287ffe6a44f3d5d4) and it brings even more problems for Iris.

So I might try to compile earlier version of MoltenVK (1.2.198.1, which was mentioned above) and link it with these commits to see if it has any effect sometime later.

Omnilights are working after installing Godot 4 beta 5.

macOS Ventura 13.0, AMD Radeon Pro 5500 M.

How much lights are supported per mesh in Clustered Renderer btw?

In Vulkan Clustered: As many as you want, as long as there are less than 512 clustered elements present in the view frustum (OmniLights + SpotLights + ReflectionProbes + Decals). The maximum number of clustered elements can be increased in the Project Settings if needed.

In Vulkan Mobile: 1 DirectionalLight + 8 OmniLights + 8 SpotLights per mesh resource, like in Godot 3.2.3 and prior’s GLES3 renderer. Unfortunately, we can’t increase the limit to 32 OmniLights + 32 SpotLights per mesh resource as was done in Godot 3.3 and later. That said, given the mobile focus of the Vulkan Mobile backend, it’s best to rely on baked lightmaps as much as possible for static lighting (using the Static global illumination mode on lights). Also, make use of the light distance fade system to fade distant lights away.

Been trying to compile MoltenVK 1.1.6 (=1.2.198.1) with 099dee3 but there’s some problems with the vulkan side header files and seems like its a no-go. So I tested various combinations (MoltenVK master & 1.1.7, Godot master & 099dee3) and the problems exist there also.

HOWEVER, it seems that the lights work when using the mobile vulkan renderer.

Why don’t you take a look the version I am talking about where this problem started?

Hi again, with the newer version of Godot 4.0 I cannot still see any spotlight or omnilight being rendered. Even with the new Vulkan library version. Dunno If any other MacOs user are experiencing the same issue.

The Vulkan renderer isn’t being actively tested on macOS these days, so it may take a while for this to be fixed.