BindChannels 커맨드로 버텍스 데이터 맵을 그래픽스 하드웨어에 매핑하는 방법을 지정할 수 있습니다.
참고: 버텍스 프로그램을 사용하는 경우 _BindChannels_ 는 아무런 영향을 미치지 않습니다. 이 경우 바인딩이 버텍스 셰이더 입력을 통해 제어되기 때문입니다. 이제는 고정 함수 버텍스 프로세싱 대신 프로그램 가능 셰이더를 사용하는 것이 좋습니다.
Unity는 기본적으로 바인딩을 자동으로 계산하지만, 경우에 따라 커스텀 바인딩을 사용하고 싶을 수 있습니다.
예를 들어, 1차 UV 세트가 첫 텍스처 스테이지에 사용되고 2차 UV 세트가 두 번째 텍스처 스테이지에 사용되도록 매핑하거나, 버텍스 컬러를 고려해야 한다고 하드웨어에 알릴 수 있습니다.
BindChannels { Bind "source", target }
버텍스 데이터 source 가 하드웨어 target 에 매핑되도록 지정합니다.
Source는 다음 중 하나일 수 있습니다.
Target은 다음 중 하나일 수 있습니다.
Unity는 타겟에 매핑할 수 있는 소스에 대한 다음과 같은 제한을 적용합니다. Vertex, Normal, Tangent 및 Color 의 소스와 타겟이 일치해야 합니다. 메시의 텍스처 좌표(Texcoord 및 Texcoord1)를 텍스처 좌표 타겟(모든 텍스처 스테이지의 경우__Texcoord, 특정 스테이지의 경우 TexcoordN__)에 매핑할 수 있습니다.
BindChannels는 일반적으로 다음 두 가지 셰이더에 사용됩니다.
// Maps the first UV set to the first texture stage
// and the second UV set to the second texture stage
BindChannels {
Bind "Vertex", vertex
Bind "texcoord", texcoord0
Bind "texcoord1", texcoord1
}
// Maps the first UV set to all texture stages
// and uses vertex colors
BindChannels {
Bind "Vertex", vertex
Bind "texcoord", texcoord
Bind "Color", color
}
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.