开发者

Algorithmically generating a drop shadow?

For my game, I need to be able to generate drop shadows. T开发者_开发技巧he kind that only span the bottom right. Like this (neglect the blue square):

Algorithmically generating a drop shadow?

Given a 2D array of RGBA pixels, how could I generate a drop shadow bitmap?

Thanks


This is done by a Gausian blur of a black square. It also can be done with every other shape.


A shadow is a black object of the same shape as the one casting the shadow, blurred and shifted. That's all there is to it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜