Toggle navigation
CG Learning
Learning Modules
About
Learning Module
Questions
Helpful Links
Compile Shaders
Shader
Simple Shader
Per Vertex Lambert
Per Fragment Lambert
Per Vertex Phong
Per Fragment Phong
Depth Shader
uLambertColor:
uSpecularColor:
uAmbiLight:
Vertex Shader
Fragment Shader
Handling
Annotations
(W / Mouse wheel up)
zoom in
(S / Mouse wheel down)
zoom out
Drag with
pressed
mouse
rotate view
(1)
Teapot
(Exported from Autodesk 3DsMax)
(2)
Torus knot
(Exported from Autodesk 3DsMax)
(3)
Sphere
(4)
Cube
attribute vec3
aPosition:
Coordinates of
Vertex [x,y,z]
attribute vec3
aNormal:
Normal of
Vertex [x,y,z]
uniform mat3
uNormalMat:
The normal matrix, inverse of uModelViewProj
uniform mat4
uView:
The view matrix
uniform mat4
uModelView:
The model view matrix
uniform mat4
uModelViewProj:
The model view projection matrix
uniform vec3
uLightDir:
Richtungsvektor des Directional Light [x,y,z]
uniform vec3
uCamPos:
Camera position in world
uniform vec3
uAmbiLight:
ambient light color [r,g,b]
uniform vec4
uLambertColor:
Diffuse material color [r,g,b,a]
uniform vec4
uSpecularColor:
Specular material color [r,g,b,a]
uniform vec4
gl_FragColor:
Farbe des Fragments (Pixel) [r,g,b,a]
uniform vec4
gl_Position
Position des Vertex in [r,g,b]
What does 'MVP matrix' usually stand for?
Most Valuable Material matrix
Model View Projection matrix
Mean Value Perspective matrix
Masking Vertex Pattern matrix
Which of the following matrices are projection matrices?
Perspective
Rotation
ModelView
Orthographic
Translation
What is the model matrix? It transforms a 3D model from...
...object space to global space
...object space to clipping space
...eye space to clipping space
...global space to eye space
What is the view matrix? It transforms a 3D model from...
...object space to clipping space
...global space to eye space
...eye space to clipping space
...object space to global space
What is the projection matrix? It transforms a 3D model from...
...global space to eye space
...object space to clipping space
...object space to global space
...eye space to clipping space
How is the model view perspective matrix computed?
MVP = M * V * P
MVP = P * V * M
MVP = V * P * M
MVP = M * P * V
Which of the following names is related to diffuse lighting?
Euler
Lambert
Barycentric
Fresnel
Wikipedia - Transformation Matrix