Hi,
I’m using OutlinePass in my project. It works great with solid geometry. However, in my scene I also have partially transparent sprites, which may cover a significant part of the screen. Unfortunately the transparency is not taken into account, and objects that are “hidden” behind that transparent part have dimmer outline, which looks strange.
I tried removing the object.isSprite
condition from VisibilityChangeCallBack
and I noticed that sprites receive a standard rectangular outline. What I would expect here is outline in a shape of the actual image, without the transparent part.
I also tried setting NormalBlending
and adding alphaTest
to the depthMaterial
, but nothing changes unless the value is greater than 1 (then of course nothing is rendered to the depth buffer and all outline gets visibleEdgeColor
).
I think the whole problem is because when overriding DepthMaterial
for the whole scene, the textures are not used at all. I even tried adding a line material.map = renderItem.material.map;
after material is overriden in the renderObjects
function, but to no avail. Is there any way to solve this?