Shader "Hwanggoon/VertexLit Simple"
{
 Properties
 {
  _MainColor ("Main Color", color) = (0,0,1,1)
  _MainTex ("Main Texture", 2d) = "white"{} // 숫자가 아닌 문자 값으로 할수 있으며, {}는 옵션이다.
 }
 
 SubShader
 {
  Pass
  {
   Material
   {
    Diffuse [_MainColor]
    Ambient [_MainColor]
   }

   Lighting On // Texture 를 그리기 전에 라이트 설정을 해야한다.

   SetTexture [_MainTex]
   {
    Combine texture * primary double
    // Combine : 생상 결합 저정 코드
    // texture : 현재 택스쳐 색상
    // primary : 이전 라이팅 연산된 색상
    // double : 결과값을 x2 해주는 키워드
   }
  }
 }
}

'Shader > Unity Shader 공부' 카테고리의 다른 글

Unity Shader) 05_2Textures_Alpha  (0) 2014.04.23
Unity Shader) 04_2Textures  (0) 2014.04.23
Unity Shader) 02_VertexLit_White  (0) 2014.04.23
Unity Shader) 01_Rad  (0) 2014.04.23
Unity Shader) 기초 참고  (0) 2014.04.23
Posted by Hwanggoon
,