Game Engine/Unity3D
[Shader] Surface shader의 standard한 Output 구조체들
욤마핫
2015. 4. 1. 20:10
struct SurfaceOutput
{
fixed3 Albedo; // diffuse color
fixed3 Normal; // tangent space normal, if written
fixed3 Emission;
half Specular; // specular power in 0~1 range
fixed Gloss; // specualr intensity
fixed Alpha; // alpha for transparencies
};
Unity5 버젼에서는 다음과 같은 라이팅 모델을 쓰고 있다.
struct SurfaceOutputStnadard
{
fixed3 Albedo; //
fixed3 Normal; //
half3 Emission;
half Metallic; // 0 = non metal, 1 = metal
half Smoothness;// 0 = rough, 1 = smooth
half Occlusion;// (default 1)
fixed Alpha; // alpha for transparencies
};
struct SurfaceOutputStandardSpecular
{
fixed Albedo; // diffuse color
fixxed Specular; // specular color
fixed Normal; // tangent space normal, if written
half3 Emission;
half Smoothness;
half Occlusion;
fixed Alpha;
}