본문 바로가기

전체 글71

[쉐이더노트] Built-in matrices Built-in matrices Matrices (float4x4) supported: UNITY_MATRIX_MVP: Current model*view*projection matrix UNITY_MATRIX_MV: Current model*view matrix UNITY_MATRIX_V: Current view matrix. UNITY_MATRIX_P: Current projection matrix UNITY_MATRIX_VP: Current view*projection matrix UNITY_MATRIX_T_MV: Transpose of model*view matrix UNITY_MATRIX_IT_MV: Inverse transpose of model*view matrix UNITY_MATRIX_TE.. 2015. 1. 6.
[노트] uv 위치값 변경 3DSMAX 에서 캐릭터 unwrap 작업 완료후 유니티로 import 하게 되면 오른쪽 이미지와 같이 총 4개의 구역으로 분할되며, 이때 유니티에서는 이좌표 그대로 사용 되지 않고 1,2,3,4 의 위치가 2,4,1,3 으로 변환 2015. 1. 6.
[쉐이더노트] 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.