Decal/Texture/Gui Clipping

This bug has been existing for pretty long actually, when you put a decal, texture or gui on a transparent brick, and overlap it with another brick with texture/gui/decal, the texture will overlap randomly, doesnt matter how far away the two decals are, the one behind might still be able to overlap the one in front

Here, by just slightly changing the camera angle the priority changes

3 Likes

Really annoying issue, but you shouldn’t be using decals to begin with (as this specifically is not intended). In this case, I’d take advantage of .FBX files.

1 Like

This is intended. Transparent faces are sorted based on the center of the object that they belong to, so that means that changing the camera could lead to the transparent faces being drawn in a different order.

Here are some threads about the same topic:
http://devforum.roblox.com/t/weird-transparency-bug-needs-confirmation-if-is-bug/32742
Particles are drawn above/under decals based on camera angle instead of physical position

Drawing them in consistent order / intersecting properly would be a lot more expensive rendering-wise.

1 Like

If you use a surfacegui you can use ZOffset to manually specifiy sorting order.

3 Likes

Thanks that actually fixes the issue

1 Like

That could work! In addition, if Roblox added a ZOffset to decals, that could be more efficient and simplify the process of controlling rendering order by avoiding using any GUI elements. All decals/textures attached to a transparent part may benefit from ZOffset, but don’t necessarily need the other features GUIs provide.