0 votes

I'm trying to light up the top of a wall, while still using that wall as an occluder to cast shadows. I've included a picture of the results I have so far. If you notice the bottom left wall you can see the result I'm looking to achieve (with the wall lit up), but then the shadow doesn't cast right from the corner. Is there a way to achieve a lit up wall AND have shadows cast properly?

Thanks in advance.

https://pasteboard.co/J9h3thj.png

asked May 20 in Engine by Omee (12 points)

2 Answers

0 votes

Hey, hope this will help even though I am not utra comfortable with lights
My basic idea with this would be to having tour wall being lit normally and not casting shadows at all + another object typically as a child of the wall that would copy its shape and be used only as shadow cast
Other comments may prove more straightforward ;)

answered May 21 by astrale-sharp (48 points)
0 votes

To give the shadows that nice, soft edge look set the variables filter, filter smooth, and gradient length under Light2D shadow section. Godot supports Percentage Closer Filtering (PCF), which takes multiple samples of the shadow map around a pixel and blurs them to create a smooth shadow effect. The higher the number of samples the smoother the shadow will look, but the slower it will run. But beware, it takes lots of tweaking to find the perfect result ;)

answered May 21 by A112Studio (178 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.