Luxar Viewer API Documentation - v2026.10.19
    Preparing search index...
    interface CameraAwareMaterial {
        updateCameraParams(
            resolution: Vector2,
            nearCull?: number,
            pixelRatio?: number,
        ): void;
    }

    Implemented by

    Index
    • Update camera-dependent uniforms (viewport, near cull, pixel ratio).

      Push again after a resize, a near-cull change or a pixel-ratio change. The projection itself — FOV, ortho zoom, off-axis frustum AND the ortho/perspective kind — is read in shader from the projection matrix of the draw (luxarIsOrthoProjection() / isOrthoProjectionTSL()), so a camera-kind flip or a draw through another camera needs no push.

      Parameters

      • resolution: Vector2

        Viewport resolution in pixels

      • OptionalnearCull: number

        Near-fade start distance in world units (consumed by all four geometry materials via the shared perspectiveNearFade)

      • OptionalpixelRatio: number

        Physical render-target pixels per CSS pixel; screen-space appearance constants scale with it above 1×

      Returns void