반응형
Unity 내장 라이팅 3가지 (Lambert , Blinn Phong, Standard = 램버트, 블린 퐁, 스탠다드)
(라이팅 함수?)
Lambert
Lambert 는 Specular 공식이 없다.
Lambert 는 빛에 의한 밝고 어두움이 구현된 가벼운 라이트 구조이다.
Lambert 는 SurfaceOutput 구조체를 사용한다.
ㅡ
Lambert 는 빛의 음영(빛의 밝고 어두움)은 계산하지만, Specular(각도와 조명에 따라 계산된 특정 색의 하이라이트 동그라미)는 계산하지 않는다.
Lambert는 매우 전통적이고 가벼운 라이팅 공식이다.
-
Lambert 사용 시 라이팅함수와 라이팅함수의 구조체를 구형 구조체로 변경해야 한다. (라이팅함수: Standard > Lambert / 라이팅함수의 구조체: StandardOutputStandard > SurfaceOutput )
----------------------------------------------------------------------------------------
Blinn Phong
Blinn Phong 은 Specular 공식이 있다.
Blinn Phong 은 Lambert공식 + Specular 공식 이다.
Blinn Phong 은 빛에 의한 밝고 어두움이 구현(Lambert) + 보는 각도와 조명에 따라 계산된 특정 색의 하이라이트 동그라미로 표현(Specular) 된다.
Blinn Phong 은 SurfaceOutput 구조체를 사용한다.
Blinn Phong 은 Specular를 가볍게 표현할 수 있는 공식이다.
Blinn Phong 사용 시 라이팅함수와 라이팅함수의 구조체를 구형 구조체로 변경해야 한다. (라이팅함수: Standard > Blinn Phong / 라이팅함수의 구조체: StandardOutputStandard > SurfaceOutput )
----------------------------------------------------------------------------------------
(라이팅 함수?)
Lambert
Lambert 는 Specular 공식이 없다.
Lambert 는 빛에 의한 밝고 어두움이 구현된 가벼운 라이트 구조이다.
Lambert 는 SurfaceOutput 구조체를 사용한다.
ㅡ
Lambert 는 빛의 음영(빛의 밝고 어두움)은 계산하지만, Specular(각도와 조명에 따라 계산된 특정 색의 하이라이트 동그라미)는 계산하지 않는다.
Lambert는 매우 전통적이고 가벼운 라이팅 공식이다.
-
Lambert 사용 시 라이팅함수와 라이팅함수의 구조체를 구형 구조체로 변경해야 한다. (라이팅함수: Standard > Lambert / 라이팅함수의 구조체: StandardOutputStandard > SurfaceOutput )
----------------------------------------------------------------------------------------
struct SurfaceOutput
{
fixed3 Albedo; - 물체의 기본 색상
fixed3 Normal; - NormalMap
fixed3 Emission; - 빛의 영향을 받지 않는 색상
half Specular; - Specular의 넓이. 얼마나 넓은 하이라이트가 나오는가. 수치가 높으면 하이라이트가 작아짐
half Gloss; - Specular의 강도. 순수한 Specular의 Opacity같은 느낌
half Alpha; - 알파
}
----------------------------------------------------------------------------------------Blinn Phong
Blinn Phong 은 Specular 공식이 있다.
Blinn Phong 은 Lambert공식 + Specular 공식 이다.
Blinn Phong 은 빛에 의한 밝고 어두움이 구현(Lambert) + 보는 각도와 조명에 따라 계산된 특정 색의 하이라이트 동그라미로 표현(Specular) 된다.
Blinn Phong 은 SurfaceOutput 구조체를 사용한다.
Blinn Phong 은 Specular를 가볍게 표현할 수 있는 공식이다.
Blinn Phong 사용 시 라이팅함수와 라이팅함수의 구조체를 구형 구조체로 변경해야 한다. (라이팅함수: Standard > Blinn Phong / 라이팅함수의 구조체: StandardOutputStandard > SurfaceOutput )
----------------------------------------------------------------------------------------
struct SurfaceOutput
{
fixed3 Albedo; // 물체의 기본 색상
fixed3 Normal; // NormalMap
fixed3 Emission; // 빛의 영향을 받지 않는 색상
half Specular; // Specular의 넓이. 얼마나 넓은 하이라이트가 나오는가. 수치가 높으면 하이라이트가 작아짐
half Gloss; // Specular의 강도. 순수한 Specular의 Opacity같은 느낌
half Alpha; // 알파
}
----------------------------------------------------------------------------------------Standard
Standard 는 PBR(Physically Based Shader; 물리기반쉐이더)이다.
Standard 는 주변환경을 반사해서 Specular를 구현한다.
Standard 는 Diffuse와 Specular가 에너지 보존 법칙에 의해 서로 보완관계를 자동적으로 가진다.
Standard 는 Specular의 칼라가 메탈릭 속성에 따라 자동적으로 결정되는 라이트구조이다.
Standard 는 SurfaceOutputStandard 구조체와 SurfaceOutputStandardSpecular 구조체를 사용한다.
Standard 는 PBR(Physically Based Shader; 물리기반쉐이더)이다.
Standard 는 주변환경을 반사해서 Specular를 구현한다.
Standard 는 Diffuse와 Specular가 에너지 보존 법칙에 의해 서로 보완관계를 자동적으로 가진다.
Standard 는 Specular의 칼라가 메탈릭 속성에 따라 자동적으로 결정되는 라이트구조이다.
Standard 는 SurfaceOutputStandard 구조체와 SurfaceOutputStandardSpecular 구조체를 사용한다.
----------------------------------------------------------------------------------------struct SurfaceOutputStandard
{
fixed3 Albedo; // 물체의 기본 색상
fixed3 Normal; // NormalMap
fixed3 Emission; // 빛의 영향을 받지 않는 색상
half Metallic; // 재질이 금속인가 아닌가?
half Smoothness; // 재질이 거친가 매끈한가?
half Occlusion; // 차폐되어 어둡게 되는 강도
half Alpha; // 알파
}
----------------------------------------------------------------------------------------
[추가참조]
https://docs.unity3d.com/kr/current/Manual/SL-SurfaceShaders.html
https://docs.unity3d.com/kr/current/Manual/SL-SurfaceShaderLightingExamples.html
반응형
'정리필요' 카테고리의 다른 글
LUT (look-up texture) (0) | 2018.05.09 |
---|---|
Unity_쉐이더 Properties (0) | 2018.04.26 |
[그래픽스2] (0) | 2018.04.22 |
float half fixed 부동소수점 (0) | 2018.04.11 |
[경향하우징] 한국건축 2064 협동조합 '미래의 집짓기' (0) | 2018.02.26 |
댓글