Arvtesh / UnityFx.Outline

Screen-space outlines for Unity3d.
MIT License
1.28k stars 90 forks source link

alpha mask or cutout object support request #10

Closed weirdouncle closed 4 years ago

weirdouncle commented 4 years ago

Im using URP and a cutout object looks like this

it will be perfect like the right pic, and thanks for all your works

TIM图片20200729095437

Arvtesh commented 4 years ago

Thank you for the request. I'm going to look into this when I have time. Hopefully it won't take too long.

weirdouncle commented 4 years ago

hi, I'd tried and succeed. OutlineRenderer.cs line 338 change to "_commandBuffer.DrawRenderer(r, _resources.TmpMaterials[j], j);" I think there should be a tag or mark to the tranparent object to choose the renderer method for better performance

Arvtesh commented 4 years ago

@weirdouncle I've just pushed alpha testing support to develop, so next release of the library will support this feature. Your fix might work in some cases, but it's unreliable. The correct solution is adding alpha testing support to the render shader and do some additional setup in OutlineRenderer. Hope this helps.