Function createDepthPrePassMesh

  • Internal

    Clones a given mesh to render it in the depth prepass with another material.

    Parameters

    • mesh: Mesh<BufferGeometry, Material | Material[]>

      original mesh

    Returns THREE.Mesh

    Mesh depth pre pass

    Remarks

    Both the original and depth prepass meshes, when rendered in the correct order, create the proper depth prepass effect. The original mesh material is slightly modified by [[createDepthPrePassMaterial]] to support the depth prepass. This method is usable only if the material of this mesh has an opacity value in the range (0,1).

    The DepthPrePass object is created wis a slightly smaller renderOrder as the original mesh to ensure that it's rendered first.

Generated using TypeDoc