로딩
요청 처리 중입니다...

유니티 셰이더 Part 3. Texture 입히기

 유니티 셰이더 Part 3. Texture 입히기

1편 단색 셰이더, 2편 Properties를 적용한 Shader에 이어, 이번에는 가장 근간이 되는 Texture를 입혀볼 예정입니다. Shader "Custom/TextureSampler" { Properties { _MainTex ("Texture", 2D) = "white" {} _Color ("Tint Color", Color) = (1,1,1,1) } SubShader { Tags { "RenderType"="Opaque" } Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" sampler2D _MainTex; float4 _MainTex_ST; // Tilling/Offset 정보 (Scale, Translation) float4 _Color; struct appdata { float4 vertex : POSITION; float2 uv : TEXCOORD0; }; str...