How did roblox code decals?

Been having some blending issues with my renderer. (face cull test off for the tree draw calls) As you can see it seems to not be able to blend with itself.

Now the easy solution would be to simply alpha test itself in a binary fashion however doing that led to weird artifacts, for example, high poly models with tiny triangles (the size of pixels) would spaz out to white “speks” for some reason. (Go full screen with a clean high-resolution monitor)

Do note that that only happens when there are specular map values (not PBR).
Even if I were to mitigate this with some binary material values this still wouldn’t be practical at a larger scale.

I wondered if Roblox has the same issues and it turned out they didn’t even support alpha testing.
Screen Shot 2021-06-05 at 11.45.25 AM

However, what I thought was really odd was that when doing this same method but instead to a 2 sided polygon, rather a multi-sided part just extremely fin it worked.


That begged me the question is this just a topology issue here? I haven’t tried this with Roblox’s cube method yet but this is the tree asset.

spec tree.obj (643 Bytes)

Material File Source code

# Blender MTL File: 'None'
# Material Count: 1

newmtl Material
Ns 323.999994
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd diffuseTree.png
map_Ks spec.jpg
1 Like