In chapter 4, when implementing the shader functions for the playground at the beginning, the vertex function takes vertices in buffer(0) and the fragment function takes color in buffer(0). So there are 2 things I’m unsure of:
1 - So are the buffers for vertex and fragment shaders completely independent of each other? I.e. buffer(0) for each are different buffers? I would assume so given the example.
2 - What if I want to send a uniform value to both the vertex and fragment shader? Do I have to put it in both a vertex buffer and a fragment buffer? Pardon the imprecise terminology.
I can’t seem to find any of this stated clearly in the Apple docs. I expect it is clarified in later chapters but I’m not there yet.
Thanks,
~chuck