SmartShape2D icon indicating copy to clipboard operation
SmartShape2D copied to clipboard

Help Needed: Shadow Effect Near Shape Edges Using Shaders

Open CodyAdam opened this issue 1 year ago • 2 comments

Hi, I saw on the README this image:

img

At the end of the clip, you can see that the ground has a shadow inside the shape. The closer to the edge of the shape, the more the shadow fades out.

I've been searching for a while now on how to create this effect using shader material, but I haven't found any clues. I don't know how to detect an edge using shaders without resorting to very expensive Gaussian blur techniques.

Does anyone have an idea on:

  • Where this image comes from?
  • How to recreate this shadow effect?

CodyAdam avatar Jul 08 '24 08:07 CodyAdam

I know that this video originates from a reddit post, but I don't know how it was accomplished.

Edit: found it here

mphe avatar Jul 08 '24 09:07 mphe

its been a while but i think i just made a second smart shape that has a gradient as the edge material, and use it to draw the darkening manually :)

GuyUnger avatar Jul 10 '24 18:07 GuyUnger