I’ve noticed that with an image with transparency, if I apply a shadow, it will create the shadow around the pixel data as expected.
But if I add an inner shadow, it will ignore the transparency and create the shadow around the bounding box of the image canvas irrespective of transparency.
Hi there.
To answer your question of “Is this behaving correctly?” the answer for now is yes. At least in terms of there is no actual bug here, and the application is doing what it is programmed to do.
However, we could certainly consider changing how this operates and would be curious to know of any particular specific use-cases you have in mind where this would be useful to you.
Please reply here with any examples and let us know, and I will pass it on to the rest of the team.
In my role, I tend to use Sketch for artworking, so it’s good for adding rim lighting to cut out images or outlines to objects on the inside, rather than the outside.
Drop shadows respect the alpha channel and render around the visible pixels, but inner shadows are applied to the entire rectangular bounding box of the layer. It is not a bug, just how the effect works.
If you want rim lighting or inside glows on cut-out images, you can mask the image into a shape and apply the inner shadow to the mask. That way it follows the silhouette instead of the box. It would be a useful feature if Sketch added an option like “clip to opaque pixels” for inner shadows.
I thought as much though it does surprise me that it’s not a bug. I’d assume that outer and inner should be consistent.
Maybe I’m going mad also but it feels like Sketch’s masks have changed. Alpha masks now make the mask invisible, meaning I have to duplicate layers to get the content back…was that always the case or a recent change?
Alpha masks have always behaved this way. Note though that this is different to an Outline mask, where the mask layer will still be visible. So if you want the other behaviour, you can switch the mask type under Layer > Mask > Mask Mode.