Unshaded but use lightmap?

Godot Version



Can I have a material be unshaded but use the lightmap? need unshaded for performance reasons cuz vertex shading aint implemented yet so lights are really slow on mobile.

Lights with Static bake mode will be skipped on shaded materials if they have lightmaps baked on them. They will still be computed in real-time for dynamic objects (including shadows from static objects), so you’ll need to hide Light3D nodes after baking if you want to avoid this. This comes at the cost of dynamic objects looking dark, so you’ll want to make your dynamic objects unshaded if you do this.

For correct appearance of dynamic objects without relying on real-time lighting, a solution like Add a Light3D bake mode that also bakes direct light for dynamic objects, and disables all real-time lighting computations · Issue #8040 · godotengine/godot-proposals · GitHub is needed.

When I bake a lightmap the lights dont skip the materials it just adds on to the lightmap and i have to manually turn the lights visibility to false

Which rendering method are you using? There’s a known issue with the Mobile rendering methods where lights aren’t skipped on meshes that use the Static bake mode and have lightmaps baked on them: Vulkan Mobile: LightmapGI sampling is not disabled on lights with Static bake mode, causing double lighting to appear · Issue #85145 · godotengine/godot · GitHub

I suggest switching to the Compatibility rendering method if you want to target low-end mobile devices; it’s both faster and more compatible. LightmapGI sampling and baking is supported in 4.3.dev3 and later when using the Compatibility rendering method (baking requires a device that has Vulkan support, but sampling doesn’t).

Haha thats crazy thats exactly what I did lol. Your answer is the solution. For me though, mobile was a faster fps wise on my oculus quest 2. Using compatibility did fix all those weird lightmap glitches like the lightmaps randomly flashing and turning off.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.