Combine box shadow with a signed distance field

Computer Graphics Asked by weichsem on January 2, 2021

I’m using 2d signed distance fields in my current project for drawing shapes (example: and I want to add drop shadows to them. At first I thought I could exploit the sdfs distance property to achieve good enough looking drop shadows, but I found that in many cases this left undesirable results in the interior of the shapes where there is often a darker ‘x’ in center.

I found this shadertoy which is produces exactly what I am looking for in terms of quality and performance, but I can’t seem to figure out how I would combine this 1d box blur effect with arbitrary sdf shapes to achieve a nice looking drop shadow. Is there a way I can combine these two techniques to get great looking shadows?

Add your own answers!

Related Questions

BRDF for point lights should not return values over 1

1  Asked on August 27, 2021 by emil-kabirov


Dynamic Array in GLSL

3  Asked on January 13, 2021 by archmede


Combine box shadow with a signed distance field

0  Asked on January 2, 2021 by weichsem


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP