magic-pixels
    Preparing search index...

    Class Texture

    A texture is plain data: an image plus sampling parameters. The renderer uploads it the first time it is used as a uniform and assigns texture units.

    Index
    colorSpace: ColorSpace = ColorSpace.LINEAR

    Whether the image is sRGB-encoded, as every photo or hand-painted texture is ('srgb'), or holds numbers that only look like an image, like a normal or roughness map ('linear', the default: no conversion). 'srgb' uploads with an sRGB internal format so the GPU decodes it to linear values before the shader samples it.

    flipY: boolean = false

    Flip the image vertically on upload (default false). glTF and most image loaders assume row 0 is the top; WebGL's texture coordinate v = 0 is the bottom, so flipping here makes v = 0 line up with the top of the picture instead of flipping UVs in the shader.

    magFilter: Filter = Filter.NEAREST
    minFilter: Filter = Filter.NEAREST
    needsUpdate: boolean = false

    Set to true after the image (or its contents, e.g. a video frame or a canvas) changed so the renderer re-uploads it. The renderer resets it.

    wrapS: Wrapping = Wrapping.CLAMP_TO_EDGE
    wrapT: Wrapping = Wrapping.CLAMP_TO_EDGE