Graphics

tex2DProj 에 대한 이해

Renderer 2021. 1. 18. 14:48

tex2DProj 를 Microsoft Docs 에는 다음과 같이 소개하고 있다.

 

Samples a 2D texture using a projective divide; the texture coordinate is divided by t.w before the lookup takes place.

 

이게 무슨 소린지 수식으로 풀어쓰면 아래와 같다.

 

tex2Dproj(_Tex, projCoord) == tex2D(_Tex, projCoord.xy / projCoord.w)

 

왜 w 로 나누는가에 대해서는 동차절단공간(Homogeneous clip space) 에 대한 이해가 필요한데

 

이것은 다음에 정리하기로