Shader/Unity Shader 공부

Unity Shader) 04_2Textures

Hwanggoon 2014. 4. 23. 21:52

Shader "Hwanggoon/2Textures"
{
 Properties
 {
  _MainTex("Main Texture", 2D) = "white" {}
  _SubTex("Sub Texture", 2D)  = "white" {}
 }

 SubShader
 {
  Pass
  {
   SetTexture [_MainTex]
   {
    combine texture double
   }

   SetTexture [_SubTex]
   {
    Combine texture * previous
    // previous : 바로 직전의 SetTexture 커맨드의 결과값
   }
  }
 }
}