API

Interface ParallaxOcclusionProps

Independently implemented contact-refinement parallax occlusion mapping. Displaces surface texture coordinates, not mesh geometry or fragment depth.

interface ParallaxOcclusionProps {
    heightCenter?: number;
    heightChannel?: "r" | "g" | "b" | "a";
    heightScale?: number;
    heightTexture: Texture2D;
    maxSteps?: number;
    minSteps?: number;
    refinementSteps?: number;
}
Index
heightCenter?: number

Placement of the height range: 0 below the mesh, 1 above it. Default 0.

heightChannel?: "r" | "g" | "b" | "a"

Channel containing height, clamped to [0, 1]. Default "r".

heightScale?: number

World-space height range. Default 0.05; zero disables displacement.

heightTexture: Texture2D

Filterable height texture. Use a linear format for RGB height channels.

maxSteps?: number

Coarse-step budget at grazing incidence. Integer [minSteps, 64]. Default 32.

minSteps?: number

Coarse-step budget at normal incidence; fewer steps are taken when the ray crosses fewer height texels. Integer [1, 64]. Default 8.

refinementSteps?: number

Maximum subdivisions of the first contact interval, reached by bisection and stopped once it spans one pixel. Integer [1, 32]. Default 8.