본문 바로가기

unity8

[쉐이더노트] Surface Shader compile directives #pragma optional params alpha - 알파블랜딩 모드, 반투명 쉐이더에 사용한다. alphatest:VariableName - 알파테스팅 모드, transparent-cutout 쉐이더에 사용하며, Cutoff 값은 변수 이름의 이름을 따름 vertex:VertexFunction - 커스텀 버텍스, 버텍스 쉐이더 추가시 사용 finalcolor:ColorFunction - 파이널 컬러 커스텀 exclude_path:prepass 또는 exclude_path:forward - 디퍼드나 포워드 렌더링 둘중 하나의 패스를 제거해 한쪽으로만 가게 한다 addshadow - 그림자 생성과 수집 패스를 추가. 절차적인 버텍스 애니메이션이 그림자에 영향을 미치도록 커스텀 버텍스 수정함수와 함께 사.. 2014. 12. 22.
[쉐이더노트] input structure Surface Shader input structure The input structure Input generally has any texture coordinates needed by the shader. Texture coordinates must be named “uv” followed by texture name (or start it with “uv2” to use second texture coordinate set). Additional values that can be put into Input structure: float3 viewDir - will contain view direction, for computing Parallax effects, rim lighting etc. fl.. 2014. 11. 19.
[쉐이더노트] SurfaceOutput struct SurfaceOutput { half3 Albedo; half3 Normal; half3 Emission; half Specular; half Gloss; half Alpha; }; 2014. 11. 19.
[쉐이더노트] appdata_full struct appdata_full { float4 vertex : POSITION; float4 tangent : TANGENT; float3 normal : NORMAL; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; fixed4 color : COLOR; #if defined(SHADER_API_XBOX360) half4 texcoord2 : TEXCOORD2; half4 texcoord3 : TEXCOORD3; half4 texcoord4 : TEXCOORD4; half4 texcoord5 : TEXCOORD5; #endif }; 2014. 11. 14.