Unity Shader Study03

Shader "Unique/Edu01/SurfaceShader04" {
 Properties {
  _MainTex ("Albedo (RGB)", 2D) = "white" {}
     _MainTex2 ("Albedo (RGB)", 2D) = "white" {}
 }
 SubShader {
  Tags { "RenderType"="Transparent" "Queue"="Transparent"}
  LOD 200
  CGPROGRAM
  #pragma surface surf Standard alpha:fade
  sampler2D _MainTex;
     sampler2D _MainTex2;
  struct Input {
   float2 uv_MainTex;
   float2 uv_MainTex2;
  };
  UNITY_INSTANCING_CBUFFER_START(Props)
   // put more per-instance properties here
  UNITY_INSTANCING_CBUFFER_END
  void surf (Input IN, inout SurfaceOutputStandard o) {
   fixed4 d = tex2D(_MainTex2, float2(IN.uv_MainTex2.x, IN.uv_MainTex2.y - _Time.y));
   fixed4 c = tex2D (_MainTex, IN.uv_MainTex + d.r);
   //fixed4 d = tex2D(_MainTex2, float2(IN.uv_MainTex2.x + _Time.y, IN.uv_MainTex.y));
   //o.Albedo = c.rgb;
   o.Emission = c.rgb;   //light will not interfere texture
   o.Alpha = c.a;
   //o.Emission = c.rgb * d.rgb;   //light will not interfere texture
   //o.Alpha = c.a * d.a *1.5;
  }
  ENDCG
 }
 FallBack "Diffuse"
}

댓글

이 블로그의 인기 게시물

About AActor!!! "UObject" has no member "BeginPlay"

UNREAL Android build information

C++ 생성자 위임 (delegating constructor)