RedGPU API - v3.0.0-Alpha
    Preparing search index...

    Class Sampler

    GPU 텍스처 샘플러를 관리하는 클래스입니다.

    • 샘플러의 필터, 어드레스 모드, 애니소트로피 등 다양한 옵션을 설정할 수 있습니다.
    • 동일 옵션의 샘플러는 내부적으로 캐싱하여 중복 생성을 방지합니다.
    • 옵션 변경 시 자동으로 샘플러를 갱신합니다.

    아래는 Sampler의 구조와 동작을 이해하는 데 도움이 되는 추가 샘플 예제 목록입니다.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get gpuDevice(): GPUDevice

      Retrieves the GPU device associated with the current instance.

      Returns GPUDevice

      The GPU device.

    • get magFilter(): GPUFilterMode

      Retrieves the magnification filter mode used by the GPU.

      Returns GPUFilterMode

      The magnification filter mode.

    • set magFilter(value: GPUFilterMode): void

      Sets the magnification filter mode for the GPU texture.

      Parameters

      • value: GPUFilterMode

        The magnification filter mode to be set.

      Returns void

    • get maxAnisotropy(): number

      Retrieves the maximum anisotropy value.

      Returns number

      The maximum anisotropy value.

    • set maxAnisotropy(value: number): void

      Set the maximum anisotropy value for the sampler.

      Parameters

      • value: number

        The value to set as maximum anisotropy. Must be within the range of 1 to 16.

      Returns void

      If the value is not within the specified range.

    • get minFilter(): GPUFilterMode

      Returns the minimum filter mode for the GPU filter.

      Returns GPUFilterMode

      The minimum filter mode for the GPU filter.

    • set minFilter(value: GPUFilterMode): void

      Sets the value of minFilter.

      Parameters

      • value: GPUFilterMode

        The new value for minFilter.

      Returns void

    • get mipmapFilter(): GPUMipmapFilterMode

      Returns the MipmapFilter mode of the GPU object.

      Returns GPUMipmapFilterMode

      The MipmapFilter mode of the GPU.

    • set mipmapFilter(value: GPUMipmapFilterMode): void

      Sets the mipmap filter mode.

      Parameters

      • value: GPUMipmapFilterMode

        The filter mode to be set.

      Returns void

    Methods