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

    Class PhongMaterial

    PhongMaterial

    Phong 라이팅 기반의 다양한 텍스처/파라미터를 지원하는 머티리얼 클래스입니다. 디퓨즈, 스펙큘러, 노멀, AO, 알파, 발광 등 다양한 텍스처와 샘플러, 파라미터를 통해 사실적인 라이팅 효과를 구현할 수 있습니다.

    const sourceTexture = new RedGPU.Resource.BitmapTexture(
    redGPUContext,
    '/RedGPU/examples/assets/github.png'
    );
    const material = new RedGPU.Material.PhongMaterial(redGPUContext);
    material.diffuseTexture = sourceTexture;

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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    __packingList: any[]

    파이프라인 갱신 시 호출되는 콜백 리스트

    alphaTexture: BitmapTexture

    알파(투명도) 텍스처

    alphaTextureSampler: Sampler

    알파 텍스처 샘플러

    aoTexture: BitmapTexture

    AO(ambient occlusion) 텍스처

    aoTextureSampler: Sampler

    AO 텍스처 샘플러

    color: ColorRGB

    머티리얼의 기본 색상(RGB)

    diffuseTexture: BitmapTexture

    디퓨즈 텍스처

    diffuseTextureSampler: Sampler

    디퓨즈 텍스처 샘플러

    dirtyPipeline: boolean = false

    파이프라인 dirty 상태 플래그

    emissiveColor: ColorRGB

    발광 색상(RGB)

    emissiveStrength: number

    발광 강도

    emissiveTexture: BitmapTexture

    발광 텍스처

    emissiveTextureSampler: Sampler

    발광 텍스처 샘플러

    gpuRenderInfo: FragmentGPURenderInfo

    프래그먼트 GPU 렌더 정보 객체

    metallic: number

    금속도

    normalScale: number

    노멀 맵 스케일

    normalTexture: BitmapTexture

    노멀 맵 텍스처

    normalTextureSampler: Sampler

    노멀 맵 텍스처 샘플러

    opacity: number

    머티리얼의 불투명도(0~1)

    roughness: number

    거칠기

    specularColor: ColorRGB

    스펙큘러 색상(RGB)

    specularStrength: number

    스펙큘러 강도

    specularTexture: BitmapTexture

    스펙큘러 텍스처

    specularTextureSampler: Sampler

    스펙큘러 텍스처 샘플러

    tint: ColorRGBA

    머티리얼의 틴트 컬러(RGBA)

    transparent: boolean = false

    머티리얼 투명도 여부

    use2PathRender: boolean

    2패스 렌더링 사용 여부

    useSSR: number

    SSR(스크린 스페이스 리플렉션) 사용 여부

    useTint: boolean

    틴트 컬러 사용 여부

    Accessors

    • get tintBlendMode(): string
    • set tintBlendMode(
          value:
              | "SUBTRACT"
              | "NORMAL"
              | "MULTIPLY"
              | "LIGHTEN"
              | "SCREEN"
              | "LINEAR_DODGE"
              | "DARKEN"
              | "OVERLAY"
              | "COLOR_DODGE"
              | "COLOR_BURN"
              | "HARD_LIGHT"
              | "SOFT_LIGHT"
              | "DIFFERENCE"
              | "EXCLUSION"
              | "DIVIDE"
              | "VIVID_LIGHT"
              | "LINEAR_BURN"
              | "PIN_LIGHT"
              | "SATURATION"
              | "HUE"
              | "LUMINOSITY"
              | "COLOR"
              | "NEGATION"
              | Material.TINT_BLEND_MODE,
      ): void

      Parameters

      • value:
            | "SUBTRACT"
            | "NORMAL"
            | "MULTIPLY"
            | "LIGHTEN"
            | "SCREEN"
            | "LINEAR_DODGE"
            | "DARKEN"
            | "OVERLAY"
            | "COLOR_DODGE"
            | "COLOR_BURN"
            | "HARD_LIGHT"
            | "SOFT_LIGHT"
            | "DIFFERENCE"
            | "EXCLUSION"
            | "DIVIDE"
            | "VIVID_LIGHT"
            | "LINEAR_BURN"
            | "PIN_LIGHT"
            | "SATURATION"
            | "HUE"
            | "LUMINOSITY"
            | "COLOR"
            | "NEGATION"
            | Material.TINT_BLEND_MODE

      Returns void

    Methods