◀️ ⏫ 🔼
🔽 ▶️
3D Game Shaders For
Beginners
Running The Demo
After you've set up the dependencies, you can run the demo.
C++
./3d-game-shaders-for-beginners
Here's how you run it on Linux or Mac.
3d-game-shaders-for-beginners.exe
Here's how you run it on Windows.
Demo Controls
The demo comes with both keyboard and mouse controls to move the
camera around, toggle on and off the different effects, adjust the fog,
and view the various different framebuffer textures.
Mouse
You can rotate the scene around by holding down the Left
Mouse button and dragging. Hold down the Right Mouse
button and drag to move up, down, left, and/or right. To zoom in, roll
the Mouse Wheel forward. To zoom out, roll the Mouse
Wheel backward.
You can also change the focus point using the mouse. To change the
focus point, click anywhere on the scene using the Middle
Mouse button.
Keyboard
- w to rotate the scene down.
- a to rotate the scene clockwise.
- s to rotate the scene up.
- d to rotate the scene counterclockwise.
- z to zoom in to the scene.
- x to zoom out of the scene.
- ⬅ to move left.
- ➡ to move right.
- ⬆ to move up.
- ⬇ to move down.
- 1 to show midday.
- 2 to show midnight.
- Delete to toggle the sound.
- 3 to toggle fresnel.
- 4 to toggle rim lighting.
- 5 to toggle particles.
- 6 to toggle motion blur.
- 7 to toggle Kuwahara filtering.
- 8 to toggle cel shading.
- 9 to toggle lookup table processing.
- 0 to toggle between Phong and Blinn-Phong.
- y to toggle SSAO.
- u to toggle outlining.
- i to toggle bloom.
- o to toggle normal mapping.
- p to toggle fog.
- h to toggle depth of field.
- j to toggle posterization.
- k to toggle pixelization.
- l to toggle sharpen.
- n to toggle film grain.
- m to toggle screen space reflection.
- , to toggle screen space refraction.
- . to toggle flow mapping.
- / to toggle the sun animation.
- \ to toggle chromatic aberration.
- [ to decrease the fog near distance.
- Shift+[ to increase the fog near
distance.
- ] to increase the fog far distance.
- Shift+] to decrease the fog far distance.
- Shift+- to decrease the amount of foam.
- - to increase the amount of foam.
- Shift+= to decrease the relative index of
refraction.
- = to increase the relative index of refraction.
- Tab to move forward through the framebuffer
textures.
- Shift+Tab to move backward through the
framebuffer textures.
Copyrights
(C) 2019 David Lettier (lettier.com)
(C) 2026 Shivam Kumar
◀️ ⏫ 🔼
🔽 ▶️