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.


in Engine by (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 ;)

by (49 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 ;)

by (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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.