I am this book whose named <> reader. I bought this book to study Metal. But now I have some question about Metal shader language. I wanna know what “stage_in” is. So I hope doctor Caroline can show me answer. Thanks!
Coincidentally, someone else asked this question a couple of weeks ago. Perhaps you could review the answer, and see if it helps your understanding:
How far into the book are you?
Hello doctor, I read this book in chapter 6 – Textures. And I wanna get some suggestion from you whether I need to remember all step about Metal. If I do that, maybe too many work to do.
There is a lot of work to learn Metal - it’s not an easy job!
If you keep practicing, then the steps will be come easier.
Remember the basic procedure:
Setup all buffers and textures and pipeline states when initialising the renderer.
In draw(in:), set up a render command encoder to encode all the steps that the GPU must take during the draw call. eg. set buffers and textures and pipeline state for each draw call.
Create a vertex shader and a fragment shader.
Did you understand about the
[[stage_in]] attribute from the link I gave you?
I got it doctor Caroline. Thank you too much.