I came across this code to create inner shadow in Skia. I replicated it in vvvv:
trying-inner-shadow.vl (31.9 KB)
You’d notice that in my replica DropShadowOnly
works but DropShadowAndForeground
doesn’t. When I choose DropShadowAndForeground
, I expected to see a pink rectangle with some shadow at its sides but I’m seeing a black rectangle instead.
I suspect it is not working because in the code sourceGraphic
is defined like so:
auto sourceGraphic = SkImageFilters::ColorFilter(
SkColorFilters::Blend(SK_ColorBLACK, SkBlendMode::kDst), nullptr);
But if I do the same in vvvv I get a null error:
I had to put an AvoidNULL node in between to suppress the exception. But putting it also meant I’ll get the fallback value and not the value I actually wanted.
How do I solve this? I want the error to go away while keeping the actual functionality.