When does the transition from clip space to screen coordinates happen?

后端 未结 4 2051
感动是毒
感动是毒 2020-12-12 14:07

I was studying the rendering pipeline and when I got to the clipping stage it was explained that from the view (eye or camera) space we have to pass to the clip space

4条回答
  •  感情败类
    2020-12-12 14:27

    Apparently, according to Apple, clip space is the same as NDC.

    https://developer.apple.com/documentation/metal/hello_triangle

    Quote:

    "The main task of a vertex function (also known as a vertex shader) is to process incoming vertex data and map each vertex to a position in the viewport. This way, subsequent stages in the pipeline can refer to this viewport position and render pixels to an exact location in the drawable. The vertex function accomplishes this task by translating arbitrary vertex coordinates into normalized device coordinates, also known as clip-space coordinates."

    Another quote from comments in sample code:

    "The output position of every vertex shader is in clip space (also known as normalized device coordinate space, or NDC)."

    Perhaps this is because the tutorial is in 2D? Misleading statements..

提交回复
热议问题