DataPlusProgram / GodotGoldSrcBSP

A plugin to load GoldSrc maps into Godot
MIT License
140 stars 18 forks source link

Set double-sided shadow casting mode on the generated MeshInstances to fix real-time lights shadows #4

Closed Calinou closed 2 years ago

Calinou commented 2 years ago

Imported maps have one-sided walls, which results in broken real-time light shadows. Using Reverse Cull Face on the light and using a negative bias value does not always fix this, but changing the MeshInstances' shadow casting mode to Double Sided does fix this :slightly_smiling_face:

Default shadow on DirectionalLight

image

Reverse Cull Face on DirectionalLight

image

Double-sided Shadows on MeshInstances

image

It's still not perfect, but it's much better than it used to be. I have a pending PR for this.