빨강(1,0,0)

> 기본 코드

Shader "Custom/NewShader" // 이름
{ 
    Properties // 엔진에서 입력할 수 있는 부위
    {

    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }

        CGPROGRAM
        #pragma surface surf Standard // Standard까지만 있으면 됨

        struct Input // 엔진에서 받아오는 데이터 구조체. 무조건 1개는 있어야 함
        {
            float2 uv_MainTex;
        };
      

        void surf (Input IN, inout SurfaceOutputStandard o) // 색상, 이미지 출력부 
        {
                o.Albedo = float3(1,0,0); // (R,G,B)
                
                o.Alpha = 1;
        }
        ENDCG
    }
    FallBack "Diffuse"
}

 

+ Recent posts