Computer Graphics Seminar
MTAT.03.305
Fall 2022
Raimond Tunnel
The Standard Graphics Pipeline
Data
Vertex Shader
Culling & Clipping
Rasterization
Fragment Shader
Visibility tests & Blending
vs
n
vs
vs
The Standard Graphics Pipeline
Data
Culling & Clipping
Rasterization
Visibility tests & Blending
vs
n
vs
vs
Vertex Shader
Fragment Shader
We start with a triangle.
VS
VS
VS
Vertex shader instances parse every vertex.
We start with a triangle.
FS
FS
FS
FS
FS
FS
FS
FS
VS
VS
VS
Vertex shader instances parse every vertex.
We start with a triangle.
Fragment shader instances parse every fragment.
The face is rasterized into fragments.
FS
FS
FS
FS
FS
FS
FS
FS
VS
VS
VS
uniform variable – global immutable values, accessible from all shaders
uniform
CPU
FS
FS
FS
FS
FS
FS
FS
FS
VS
VS
VS
uniform variable – global immutable values, accessible from all shaders
attribute variable – values associated with each vertex
uniform
attribute
CPU
CPU
FS
FS
FS
FS
FS
FS
FS
FS
VS
VS
VS
uniform variable – global immutable values, accessible from all shaders
attribute variable – values associated with each vertex
varying variable – values assigned in the vertex shader� and interpolated to the fragments
uniform
attribute
varying
interpolation
CPU
CPU
FRAGMENT SHADER
VERTEX SHADER
<code>
<code>
uniforms
attributes
Data
GLSL
GLSL
FRAGMENT SHADER
VERTEX SHADER
<code>
<code>
uniforms
attributes
Data
GLSL
GLSL
FRAGMENT SHADER
VERTEX SHADER
<code>
<code>
uniforms
attributes
Data
GLSL
GLSL
Time to <code>
Solutions
You can do it!