Complex shape character outline

后端 未结 5 2039
太阳男子
太阳男子 2020-12-05 01:07

Say I have this character and I want allow user to select it, so when it s selected I want to show an outline around it.

5条回答
  •  渐次进展
    2020-12-05 01:39

    You can get good results by rendering your outlined object(s) to a texture that is (ideally) the size of your destination framebuffer, then render a framebuffer-sized quad using that texture and have the fragment shader blur or do other image transforms. I have an example here that uses raw WebGL, but you can make a custom ShaderMaterial without too much trouble.

提交回复
热议问题