# lettier/3d-game-shaders-for-beginners

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/lettier-3d-game-shaders-for-beginners).**

19,407 stars · 1,468 forks · C++

## Links

- GitHub: https://github.com/lettier/3d-game-shaders-for-beginners
- Homepage: https://lettier.github.io/3d-game-shaders-for-beginners/index.html
- awesome-repositories: https://awesome-repositories.com/repository/lettier-3d-game-shaders-for-beginners.md

## Topics

`3d` `3d-graphics` `game-development` `gamedev` `glsl` `glsl-shader` `glsl-shaders` `godot` `graphics` `graphics-programming` `hlsl` `indiedev` `opengl` `panda3d` `shader` `shaders` `unity` `unity3d` `vulkan` `webgl`

## Description

This project is an educational resource and technical guide focused on real-time graphics programming and custom shader development. It provides a comprehensive framework for understanding the programmable graphics pipeline, offering tutorials and interactive examples that demonstrate how to manipulate coordinate spaces, textures, and buffers to achieve specific visual results in 3D environments.

The library distinguishes itself by offering a wide array of both photorealistic and non-photorealistic rendering techniques. It covers advanced lighting models, such as ambient occlusion and screen-space reflections, alongside stylized effects like cel shading, geometry outlines, and various artistic filters. These tools allow developers to experiment with complex surface interactions and aesthetic modifications through a modular approach to shader design.

Beyond core lighting and shading, the project includes extensive support for post-processing and pipeline management. It provides utilities for framebuffer inspection, layer compositing, and environmental configuration, enabling users to visualize intermediate rendering stages and toggle effects in real-time. This collection of resources serves as a practical reference for implementing everything from basic texture mapping to sophisticated atmospheric and lens-based visual enhancements.

## Tags

### Game Development

- [Real-Time Rendering Guides](https://awesome-repositories.com/f/game-development/real-time-rendering-guides.md) — A technical reference for understanding the programmable graphics pipeline and applying visual effects to 3D game environments.

### Graphics & Multimedia

- [Custom Shader Programs](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/materials-shading/custom-shader-programs.md) — Executes custom vertex and fragment shader programs to transform geometry and calculate pixel colors within the programmable graphics pipeline.
- [Shaders](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/shaders.md) — Offers a comprehensive guide for writing custom vertex and fragment shaders for 3D graphics. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/index.html))
- [Screen Space Reflection Techniques](https://awesome-repositories.com/f/graphics-multimedia/graphics-and-media/vector-graphics-editors/reflection-tools/screen-space-reflection-techniques.md) — Simulates mirror-like reflections by ray marching through depth and position data. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html))
- [Screen Space Ambient Occlusion](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/logit-space-lighting-adjusters/screen-space-ambient-occlusion.md) — Calculates screen-space occlusion by sampling depth buffers to simulate realistic soft shadows. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/ssao.html))
- [Rendering Pipelines](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/engines/graphics-pipeline-architectures/rendering-pipelines.md) — Executes custom vertex and fragment shader programs to transform geometry and calculate pixel colors within the programmable graphics pipeline. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/glsl.html))
- [3D Graphics Pipelines](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/3d-graphics-pipelines.md) — Executes custom vertex and fragment programs to transform 3D geometry and calculate final pixel colors on the GPU.
- [Shadow Mapping](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/tile-map-renderers/shadow-mapping.md) — Projects scene geometry into depth maps to identify fragments blocked from light sources. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/lighting.html))
- [Graphics Education Resources](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/graphics-education-resources.md) — Demonstrates lighting, shadows, and stylized rendering techniques through educational examples.
- [3D Lighting Models](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/3d-lighting-models.md) — Computes diffuse, specular, and ambient light contributions for every pixel to simulate realistic surface interaction with light sources.
- [Specular Highlights](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/3d-lighting-models/specular-highlights.md) — Calculates realistic light reflections on surfaces by using the halfway vector between the camera and light source to determine specular intensity. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/blinn-phong.html))
- [Toon Shading Models](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/3d-lighting-models/toon-shading-models.md) — Restricts light values to discrete steps to create stylized, non-photorealistic rendering effects. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/cel-shading.html))
- [Deferred Rendering Pipelines](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/deferred-rendering-pipelines.md) — Computes lighting for visible fragments after culling to improve rendering performance. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/deferred-rendering.html))
- [Screen Space Refraction Techniques](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/image-based-lighting/screen-space-refraction-techniques.md) — Calculates refracted UV coordinates to simulate light bending through transparent materials. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-refraction.html))
- [Cel Shading](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/materials-shading/cel-shading.md) — Transforms 3D objects into a flat, cartoon-like appearance by replacing smooth lighting gradients with abrupt transitions. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/cel-shading.html))
- [Stylized Rendering Techniques](https://awesome-repositories.com/f/graphics-multimedia/media-production-suites/animation-tools/mathematical-visualization-engines/3d-surface-visualizations/3d-visual-effects/stylized-rendering-techniques.md) — Implements stylized visual techniques like cel shading, outlines, and posterization to achieve artistic or cartoon-like aesthetics in 3D games.
- [Fresnel Reflectance Models](https://awesome-repositories.com/f/graphics-multimedia/surface-reflection-masks/fresnel-reflectance-models.md) — The library computes a factor based on the viewing angle to modulate surface reflectivity, opacity, or specular intensity for more realistic material rendering. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/fresnel-factor.html))
- [Rim Lighting Models](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/3d-lighting-models/rim-lighting-models.md) — Highlights object silhouettes by calculating the angle between surface normals and the viewer. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/rim-lighting.html))
- [Multi-Pass Rendering Pipelines](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/post-processing-pipelines/multi-pass-rendering-pipelines.md) — Captures intermediate scene data into off-screen textures to enable complex post-processing and multi-stage visual effects.
- [Post-Processing Effects](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/post-processing-effects.md) — Applies screen-space visual techniques like bloom, motion blur, and color grading to enhance the final rendered output of a scene. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/posterization.html))
- [Bloom Effects](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/post-processing-effects/bloom-effects.md) — Simulates light bleeding from bright objects by isolating high-intensity fragments and applying a box blur to create a glowing appearance. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/bloom.html))
- [Depth of Field](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/post-processing-effects/depth-of-field.md) — Blends between sharp and blurred scene textures based on distance from a focus point to simulate camera lens focus. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/depth-of-field.html))
- [Render-to-Texture Buffers](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/3d-graphics-pipelines/texture-mapping-pipelines/render-to-texture-buffers.md) — Captures rendering output into a buffer instead of the screen to store geometry, material, or lighting data for subsequent processing passes. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/render-to-texture.html))
- [Color Grading](https://awesome-repositories.com/f/graphics-multimedia/color-grading.md) — Transforms scene colors by mapping fragment values to a lookup table texture to achieve custom visual styles. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/lookup-table.html))
- [Ambient Occlusion Pass](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/ambient-occlusion-pass.md) — Incorporates pre-calculated occlusion factors into ambient lighting to enhance depth. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/ssao.html))
- [Frustum Light Culling](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/frustum-light-culling.md) — Limits light influence to specific cones by comparing fragment vectors against spotlight directions. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/lighting.html))
- [Light Attenuation Models](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/lighting-systems/lighting-control-systems/light-attenuation-models.md) — Diminishes light intensity using constant, linear, and quadratic factors for realistic falloff. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/lighting.html))
- [Atmospheric Fog](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/post-processing-effects/atmospheric-fog.md) — Blends scene colors with a fog color based on distance from the camera to simulate haze and hide geometry pop-in. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/fog.html))
- [Gamma Correction](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/post-processing-effects/gamma-correction.md) — Transforms color values between linear and sRGB color spaces to ensure accurate lighting and realistic highlights. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/gamma-correction.html))
- [Stylized Outlines](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/post-processing-effects/stylized-outlines.md) — Provides stylized geometry outlines and sketchy distortions to create hand-drawn aesthetic variations on 3D models. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/outlining.html))
- [Outline Rendering Techniques](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/3d-graphics-pipelines/line-geometry-renderers/outline-rendering-techniques.md) — Draws borders around 3D objects by analyzing depth or position data to create stylized, comic-book, or cartoon-like visual effects. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/outlining.html))
- [Compositing Pipelines](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/compositing-pipelines.md) — Combines multiple framebuffer textures into a single output using orthographic projection to layer visual effects similar to image editing software. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/render-to-texture.html))
- [Environmental Fog](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/post-processing-effects/environmental-fog.md) — Modifies fog density and appearance parameters dynamically to observe changes in depth perception and atmospheric rendering. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/running-the-demo.html))
- [Kuwahara Filters](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/post-processing-effects/kuwahara-filters.md) — Analyzes the variance of overlapping sub-windows to select the most consistent color, creating a stylized, painterly blur. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/blur.html))
- [Lens Distortion](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/post-processing-effects/lens-distortion.md) — Offsets color channels in screen space to mimic the optical imperfections of a camera lens. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/chromatic-aberration.html))
- [3D Scene Environment Configurators](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/scene-management-systems/scene-initialization/3d-scene-environment-configurators.md) — Adjusts coordinate systems and texture scaling settings to ensure compatibility between 3D assets and graphics pipeline requirements. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/setup.html))
- [Surface Reflection Masks](https://awesome-repositories.com/f/graphics-multimedia/surface-reflection-masks.md) — Uses specular maps to define which parts of a model should reflect the environment and how shiny those specific areas appear. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html))
- [Surface Roughness Models](https://awesome-repositories.com/f/graphics-multimedia/surface-roughness-models.md) — Blends between sharp and blurred reflection textures based on material properties to simulate different surface finishes. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html))

### User Interface & Experience

- [Texture Mapping](https://awesome-repositories.com/f/user-interface-experience/texture-mapping.md) — Assigns color data to fragment surfaces using normalized UV coordinates for detailed rendering. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/texturing.html))
- [Normal Maps](https://awesome-repositories.com/f/user-interface-experience/texture-mapping/normal-maps.md) — Simulates complex surface geometry details using high-resolution normal maps without increasing polygon counts. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/normal-mapping.html))
- [Motion Blur](https://awesome-repositories.com/f/user-interface-experience/animation-and-motion-systems/blur-effects/motion-blur.md) — Simulates the visual effect of speed by blurring pixels based on the movement of the camera or objects. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/motion-blur.html))
- [Coordinate Converters](https://awesome-repositories.com/f/user-interface-experience/coordinate-systems/coordinate-converters.md) — Converts vertex positions through model, world, view, clip, and screen coordinate systems to map 3D geometry onto a 2D display. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/reference-frames.html))
- [Screen-Space Mappings](https://awesome-repositories.com/f/user-interface-experience/coordinate-systems/coordinate-converters/screen-space-mappings.md) — Transforms 3D world positions into 2D screen coordinates to allow pixel-level operations like blurring, distortion, and depth-based effects.
- [Material Channel Standards](https://awesome-repositories.com/f/user-interface-experience/texture-mapping/material-channel-standards.md) — Organizes material data into consistent channels to enable generalized shader implementation across models. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/setup.html))
- [Box Blurs](https://awesome-repositories.com/f/user-interface-experience/animation-and-motion-systems/blur-effects/box-blurs.md) — Calculates the average color of neighboring pixels within a defined window to create a smooth, blurred visual effect. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/blur.html))

### Repository Format

- [Awesome List](https://awesome-repositories.com/f/repository-format/awesome-list.md) — A community-curated directory that catalogs and links out to other open-source projects, rather than a standalone tool you run yourself.

### Education & Learning Resources

- [Computer Graphics](https://awesome-repositories.com/f/education-learning-resources/educational-resources/systems-applied-computing/scientific-and-specialized-computing/computer-graphics.md) — Provides interactive examples explaining coordinate spaces, textures, and buffers for visual output.

### Development Tools & Productivity

- [Debugging and Inspection Tools](https://awesome-repositories.com/f/development-tools-productivity/debugging-profiling-testing/debugging-diagnostics/debugging-inspection-tools.md) — Displays individual internal rendering buffers to visualize intermediate stages of the graphics pipeline and debug specific shader outputs. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/running-the-demo.html))

### Software Engineering & Architecture

- [Frustum Culling Utilities](https://awesome-repositories.com/f/software-engineering-architecture/performance-reliability/performance-optimization/frustum-culling-utilities.md) — Discards vertices that fall outside the camera view volume to prevent rendering objects that are not visible to the user. ([source](https://lettier.github.io/3d-game-shaders-for-beginners/reference-frames.html))
