Theme Catppuccin
Make yourself at homeCatppuccin

A softer light for long learning sessions.

Appearance

Loading your preference…

Dark palette

Choose a dark palette to try it.

Light uses Latte. Your choices stay in this browser.

Back to your source shelf

Inside the companion

The Shader Workshop

Open a native OpenGL window, draw a triangle, then move a camera around three exhibits.

Project files 8

Move from model to clip space

The camera vertex stage connects model, view, and projection transforms.

12 lines camera.vert
#version 330 core
layout(location = 0) in vec3 a_position;
layout(location = 1) in vec3 a_color;
uniform mat4 u_model;
uniform mat4 u_view;
uniform mat4 u_projection;
out vec3 v_color;
void main() {
    gl_Position = u_projection * u_view * u_model * vec4(a_position, 1.0);
    v_color = a_color;
}

This is the file included with the course. Copy and download give you its complete source.

Taking your work offline? Download all course companions