No, clip space and NDC space are not the same thing.
Clip space is actually one step away from NDC, all coordinates are divided by Clip.W
to produce NDC. Anything outside of the range [-1,1] in resulting NDC space corresponds to a point that is outside of the clipping volume. There is a reason the coordinate space before NDC is called clip space ;)
Strictly speaking, however, NDC space is not necessarily cubic. It is true that NDC space is a cube in OpenGL, but in Direct3D it is not. In D3D the Z coordinate in NDC space ranges from 0.0 to 1.0, while it ranges from -1.0 to 1.0 in GL. X and Y behave the same in GL and D3D (that is, they range from -1.0 to 1.0). NDC is a standard coordinate space, but it has different representation in different APIs.
Lastly, NDC space to screen space (AKA window space) occurs during rasterization and is defined by your viewport and depth range. Fragment locations really would not make sense in any other coordinate space, and this is what rasterization produces: fragments.
Update:
Introduced in OpenGL 4.5, the extension GL_ARB_clip_control
allows you to adopt D3D's NDC convention in GL.
Traditional OpenGL behavior is:
glClipControl (GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE);
Direct3D behavior can be achieved through:
glClipControl (GL_UPPER_LEFT, GL_ZERO_TO_ONE); // Y-axis is inverted in D3D
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…