Home › Per Microsoft HLSL docs, a vertex shader output …
Per Microsoft HLSL docs, a vertex shader output marked SV_POSITION corresponds to which GLSL equivalent?
Agl_FragCoord (window-space position)
Bgl_FragColor (final colour out)
Cgl_VertexID (vertex index)
Dgl_Position (clip-space position)
Answer & Solution
Correct answer: D. gl_Position (clip-space position)
Microsoft HLSL semantics + LearnOpenGL: SV_POSITION = clip-space vertex position; the DX equivalent of gl_Position.
Related questions
Per LearnOpenGL (compute shaders), the WORKGROUP for a GLSL compute shader is invoked via For UNIFORM BUFFER OBJECTS (UBO) and SHADER STORAGE BUFFER OBJECTS (SSBO), the key differePer LearnOpenGL (Normal Mapping), normals stored in a normal map are most commonly in whicPer LearnOpenGL (Lighting), the BLINN-PHONG specular highlight uses which vector instead oIn a fragment shader, BRANCHING on a uniform vs a varying / per-fragment value differs becPer The Book of Shaders, a SDF-based circle shape in a fragment shader at point uv (centrePer LearnOpenGL, the CLIP space output (gl_Position) is converted to NDC by which operatioPer LearnOpenGL (Transformations), the standard order of matrix multiplication for a verte