Unity3D/Shader

alpha:fade

일등하이 2021. 11. 30. 16:05
반응형

기본 텍스쳐 한장을 받는 쉐이더 (Lambert)

 

 #pragma surface surf Lambert alpha:fade

텍스쳐에서 0인 모든 알파 값을 사라짐 

alpha:fade 추가 

 

하나를 복사해서 뒤에다 놓으면 depth문제가 발생 

Background (1000) : 가장 먼저 그려집니다 
Geometry (2000) : 불투명 (Opaque) 물체 
AlphaTest (2450) : 알파테스티 물체 
GeometryLast : 불투명 에서 가장 나중에 그려집니다
Transparent (3000) : Geometry 와 AlphaTest이후에 뒤에서 앞으로 순서대로 그려집니다
Overlay (4000) : 중첩되는 효과 

 

Tags { "Queue"="Geometry+1" } 이 오브젝트는 모든 불투명 오브젝트들이 그려지고 나서 그리고 반투명 오브젝트들 이전에 랜더링 되며 인덱스는 2001 입니다
스카이박스는 모든 불투명 모든 반투명 사이에 랜더링 됩니다

 

 

 

참고

https://mgun.tistory.com/2084

https://docs.unity3d.com/kr/530/Manual/SL-SubShaderTags.html

https://forum.unity.com/threads/difference-between-alphatest-and-transparent-renderqueue.458750/

반응형