• Preparing search index...
  • The search index is not available
@xeokit/sdk - v0.1.0
  • @xeokit/sdk
  • model
  • procgen
  • materials
  • heightToNormal

Function heightToNormal

  • heightToNormal(
        height: MaterialPixelBuffer,
        strength?: number,
    ): MaterialPixelBuffer

    Convert a greyscale heightfield buffer into a tangent-space normal map buffer via central-difference gradient. strength scales the gradient (higher values produce more pronounced relief). The gradient lookup wraps at the buffer edges, so the output tiles seamlessly when the input does.

    Parameters

    • height: MaterialPixelBuffer
    • strength: number = 1.0

    Returns MaterialPixelBuffer

    • Defined in packages/sdk/src/model/procgen/paintMaterials/utils.ts:129

Settings

Member Visibility
@xeokit/sdk - v0.1.0
  • Loading...

Generated using TypeDoc