fix: no external module spaced armor occlusion

This commit is contained in:
TrèsAbhi committed 2024-01-20 12:01:05 -06:00
1 parent d12440f60a
commit 871b746cce
2 files changed
+40 -7

No files matched your search

@@ -23,14 +23,8 @@ export function ArmorMeshSpacedArmorDepth(
) {
return (
<>
{!props.include && (
<mesh {...props} renderOrder={0}>
<meshBasicMaterial colorWrite={false} />
</mesh>
)}
{props.include && (
<mesh {...props} renderOrder={1}>
<mesh {...props} renderOrder={0}>
<ThreeCustomShaderMaterial
silent
depthWrite={false}
@@ -44,6 +38,12 @@ export function ArmorMeshSpacedArmorDepth(
/>
</mesh>
)}
{!props.include && (
<mesh {...props} renderOrder={1}>
<meshBasicMaterial colorWrite={false} />
</mesh>
)}
</>
);
}