Godot: 2D Soft Shadows

Created on 23 May 2016  Â·  5Comments  Â·  Source: godotengine/godot

It would be nice to have 2d soft shadows in Godot.

hard_shadow

As you can see, this doesn't look ok. I used CanvasModulate with a black color to remove the "global" light.

Something like the following would be way better:

soft_shadow

Actually, the option to put the light above/under a Sprite would also be useful (as seen here: http://godotengine.org/qa/1588/how-to-disable-self-shadowing-in-2d?show=1789#c1789)

feature proposal rendering

Most helpful comment

This is already implememted in 3.0

On Aug 4, 2017 2:47 PM, "Asmageddon" notifications@github.com wrote:

@reduz https://github.com/reduz I have not tried implementing it
myself, but I have seen algorithms that accomplish this by using triangles
textured with a gradient, without any shaders or otherwise separate
drawcalls being involved.

https://camo.githubusercontent.com/ead6c73f99dd7ffb6dbe36d7243110f31ee4cfe8/687474703a2f2f617263686976652e67616d656465762e6e65742f696d616765732e67616d656465762e6e65742f66656174757265732f70726f6772616d6d696e672f3264736f6674736861646f772f30314f766572766965772e676966

Image source: https://www.gamedev.net/articles/programming/graphics/
dynamic-2d-soft-shadows-r3065

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/4785#issuecomment-320311342,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z23UfDRF3gdnpYi2BxBMPN0H6nh30ks5sU1kTgaJpZM4IkrSZ
.

All 5 comments

This is too difficult to do with the GLES2 renderer, but with the new renderer for 3.0 it should be much easier.

@reduz I have not tried implementing it myself, but I have seen algorithms that accomplish this by using triangles textured with a gradient, without any shaders or otherwise separate drawcalls being involved.

Image source: https://www.gamedev.net/articles/programming/graphics/dynamic-2d-soft-shadows-r3065

This is already implememted in 3.0

On Aug 4, 2017 2:47 PM, "Asmageddon" notifications@github.com wrote:

@reduz https://github.com/reduz I have not tried implementing it
myself, but I have seen algorithms that accomplish this by using triangles
textured with a gradient, without any shaders or otherwise separate
drawcalls being involved.

https://camo.githubusercontent.com/ead6c73f99dd7ffb6dbe36d7243110f31ee4cfe8/687474703a2f2f617263686976652e67616d656465762e6e65742f696d616765732e67616d656465762e6e65742f66656174757265732f70726f6772616d6d696e672f3264736f6674736861646f772f30314f766572766965772e676966

Image source: https://www.gamedev.net/articles/programming/graphics/
dynamic-2d-soft-shadows-r3065

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/4785#issuecomment-320311342,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z23UfDRF3gdnpYi2BxBMPN0H6nh30ks5sU1kTgaJpZM4IkrSZ
.

Oh! In that case, consider me as reminding that the issue can be closed :P

How about the ability to put the shadow below a parent sprite ? A sprite with child LightOcclusion2D gets affected by the shadow. Is there any way around this ?
https://godotengine.org/qa/1588/how-to-disable-self-shadowing-in-2d?show=1789#c1789

Was this page helpful?
0 / 5 - 0 ratings