Home › Per LearnOpenGL, a UNIFORM variable in a GLSL sh…
Per LearnOpenGL, a UNIFORM variable in a GLSL shader is best described as which?
AA per-pixel output of the fragment shader
BA per-vertex attribute changing each vertex
CA value set from CPU + constant across one draw
DA texture sampled from a 2D image
Answer & Solution
Correct answer: C. A value set from CPU + constant across one draw
LearnOpenGL Uniforms: uniforms are set on the host (CPU) before glDrawCall(). Same value visible to every shader invocation in that draw.
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 Microsoft HLSL docs, a vertex shader output marked SV_POSITION corresponds to which GLPer LearnOpenGL, the CLIP space output (gl_Position) is converted to NDC by which operatio