I just wrote my first shader with 1. multiple passes and 2. BindChannels. I was having difficulty until I realized that in order to use multiple UV maps, that I had to use
Bind "Vertex", vertex
first.
Why is that? It seems irrelevant to me.
I just wrote my first shader with 1. multiple passes and 2. BindChannels. I was having difficulty until I realized that in order to use multiple UV maps, that I had to use
Bind "Vertex", vertex
first.
Why is that? It seems irrelevant to me.
I believe it’s because if you need BindChannels at all, then you are explicitly binding everything. I don’t know why you would ever want vertex information bound to something else, but it still has to be explicit that you’re using them as vertices.
But what about the other half of the sources that I’m not bothering with (Normal, Tangent, and Color)?
I don’t type anything about those, and it still works fine.
It doesn’t appear that your shader makes use of vertex normals, tangents or colours. If you used lighting or vertex colours, I think you would need to bind the appropriate channels. “Vertex”, on the other hand, is the positions of the vertices being transformed by hardware. I can’t think of any shader that wouldn’t require these positions.
Interesting, and likely quite accurate. It certainly is logical, anyway. Thanks for the enlightenment.