@equinor/videx-3d
    Preparing search index...

    Function OitMaterial

    • A declarative helper that makes the material of its parent mesh participate in the OITRenderPass pipeline, so transparent inline materials are resolved order-independently instead of being treated as opaque occluders.

      Drop it in as a sibling of the material, inside the mesh:

      <mesh geometry={geometry}>
      <shaderMaterial
      uniforms={uniforms}
      vertexShader={vertexShader}
      fragmentShader={fragmentShader}
      transparent
      />
      <OitMaterial side={DoubleSide} />
      </mesh>

      It renders an invisible, empty object3D purely to locate the parent mesh; the wiring is idempotent and a no-op outside the OIT pipeline.

      Parameters

      • __namedParameters: OitMaterialProps

        Props for OitMaterial.

        Props for OitMaterial.

        • Optionalmode?: "inject" | "attach"
          • inject (default): patch the material's shaders at compile time (stock or inline materials whose shader does not already include oit.glsl).
          • attach: the material's shader already #includes oit.glsl and calls oitProcess (library materials); only wire up the variant machinery.
        • OptionalshareUniforms?: string[]

          Names of custom uniform-container properties on the material to share by reference with the per-pass variants. Only needed for non-ShaderMaterial materials that read a custom uniforms object in onBeforeCompile.

        • Optionalside?: Side

          Force a specific side on the OIT variants (e.g. DoubleSide). Defaults to the material's own side.

        • OptionalsyncProperties?: string[]

          Names of value properties (e.g. color, metalness) to keep live on the per-pass variants of a cloned built-in material. See OitMaterialOptions.syncProperties. Ignored for ShaderMaterials (already live via shared uniforms).

      Returns Element