Welcome back to the Game Engine Series! In this video we learn how Shader uniforms work and how to use them in our game engine. I also show a cool optimization to precompute all the uniform locations at the start so we never have to look them up during runtime.
📚 Topics Covered:
How shader uniforms work
How to use shader uniforms
Writing a generic Zig function to handle all uniform types
Precomputing shader locations
Come watch me stream engine development live on Twitch / pokelego_dev
🔗 Links:
Runtime Repo ► https://github.com/Zephyr-Engine/zeph...
Sandbox Repo ► https://github.com/Zephyr-Engine/zeph...
Discord ► / discord
X ► https://x.com/pokelego_dev
Previous Video ► • Upgrading to Zig 0.16 & Adding Unit Tests ...
Next Video ► • Buffer Layouts & Asset Pipeline // Zig Gam...
🖥️ Equipment:
Shure MV6 Microphone: https://amzn.to/49rRfre
Logitech G903: https://amzn.to/4pxNera
32" 4K Monitor: https://amzn.to/4jDLbka
Lightbar: https://amzn.to/49xTeKA
Elgato Camlink: https://amzn.to/4jU106B
1TB SSD: https://amzn.to/4jxPFsp
Camera Tripod: https://amzn.to/3Ldr2Vs
Camera SSD: https://amzn.to/3NDKpYk
0:00 Intro
2:07 Adding Math Library
6:44 Improving Buffer Code
14:20 Fetching Uniform Locations
20:20 Comptime Set Uniform Function
26:27 Outro
Attributions:
https://www.flaticon.com/free-icons/g...
Music I use: Bensound
License code: 8LDV4HESGZFJUL96
Artist: : Lunar Years
#GameDev #Zig #GameEngine #Programming