PhongMaterial 생성자
RedGPUContext 인스턴스
기본 색상(HEX 문자열, 기본값: '#fff')
Optional
name: string머티리얼 이름(옵션)
파이프라인 갱신 시 호출되는 콜백 리스트
알파(투명도) 텍스처
알파 텍스처 샘플러
AO(ambient occlusion) 텍스처
AO 텍스처 샘플러
머티리얼의 기본 색상(RGB)
디퓨즈 텍스처
디퓨즈 텍스처 샘플러
파이프라인 dirty 상태 플래그
발광 색상(RGB)
발광 강도
발광 텍스처
발광 텍스처 샘플러
프래그먼트 GPU 렌더 정보 객체
금속도
노멀 맵 스케일
노멀 맵 텍스처
노멀 맵 텍스처 샘플러
머티리얼의 불투명도(0~1)
거칠기
스펙큘러 색상(RGB)
스펙큘러 강도
스펙큘러 텍스처
스펙큘러 텍스처 샘플러
머티리얼의 틴트 컬러(RGBA)
머티리얼 투명도 여부
2패스 렌더링 사용 여부
SSR(스크린 스페이스 리플렉션) 사용 여부
틴트 컬러 사용 여부
머티리얼의 알파 블렌드 상태 객체 반환
머티리얼의 컬러 블렌드 상태 객체 반환
디스플레이스먼트(변위) 스케일 반환
디스플레이스먼트(변위) 스케일 설정
디스플레이스먼트(변위) 텍스처 반환
Retrieves the GPU device associated with the current instance.
The GPU device.
Retrieves the UUID of the object.
The UUID of the object.
머티리얼의 writeMask 상태 반환
머티리얼의 writeMask 상태 설정
GPUFlagsConstant 값
Adds a listener function to the dirty pipeline listeners array. This function will be called when the pipeline becomes dirty.
The listener function to be added.
Fires the dirty listeners list.
Optional
resetList: boolean = falseIndicates whether to reset the dirty listeners list after firing.
Removes a dirty pipeline listener from the list of listeners.
The listener function to be removed.
머티리얼의 유니폼/컬러/틴트 등 기본 속성값을 유니폼 버퍼에 반영
프래그먼트 셰이더 바인드 그룹/유니폼/텍스처/샘플러 등 상태 갱신
GPU 프래그먼트 렌더 상태 객체 반환
셰이더 엔트리포인트(기본값: 'main')
GPU 렌더 파이프라인 정보 및 유니폼 버퍼 초기화
텍스처 객체 변경 및 DirtyPipeline 리스너 관리
이전 텍스처(BitmapTexture|CubeTexture|ANoiseTexture)
새 텍스처(BitmapTexture|CubeTexture|ANoiseTexture)
PhongMaterial
Phong 라이팅 기반의 다양한 텍스처/파라미터를 지원하는 머티리얼 클래스입니다. 디퓨즈, 스펙큘러, 노멀, AO, 알파, 발광 등 다양한 텍스처와 샘플러, 파라미터를 통해 사실적인 라이팅 효과를 구현할 수 있습니다.
Example
아래는 PhongMaterial의 구조와 동작을 이해하는 데 도움이 되는 추가 샘플 예제 목록입니다.
See
PhongMaterial Texture Combination example