Unity Shader 11 : RGB . normal . red channel sorting

Shader "Custom/MobileRedLihgtSingnal" {
 Properties {
  _MainTex ("Albedo (RGB)", 2D) = "white" {}
     _MaskTex ("Mask", 2D) = "white"{}
 }
 SubShader {
  Tags { "RenderType"="Opaque" }
  CGPROGRAM
  #pragma surface surf Lambert
  sampler2D _MainTex;
      sampler2D _MaskTex;
  struct Input {
   float2 uv_MainTex;
   float2 uv_MaskTex;
  };
  void surf (Input IN, inout SurfaceOutput o) {
   // Albedo comes from a texture tinted by color
   fixed4 c = tex2D (_MainTex, IN.uv_MainTex);
   float4 m = tex2D(_MaskTex, IN.uv_MaskTex);// + flaot4(abs(sin(_Time)),0,0,0);
   //float4 b = m * float4(abs(sin(_Time * 20)), 0, 0,0);
   float a = abs(sin(_Time*400))+.2;
   o.Albedo = c.rgb;
   o.Emission = c.rgb * m.r * a;
   o.Alpha = c.a;
  }
  ENDCG
 }
 FallBack "Diffuse"

댓글

이 블로그의 인기 게시물

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

UNREAL Android build information

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