0:00 Intro
1:24 What is a shader?
3:37 Setting up shaders in P5js
5:58 GLSL data types
7:00 Vectors
8:58 Attributes, Uniforms and Varying
10:19 Barebones fragment shader
11:00 Vertex shader
14:57 Fragment shader revisited
15:30 Gradients
16:45 FragCoord tangent
18:28 Mix function
21:22 Setting uniforms
22:43 Uniform images (sampler2D)
24:58
25:12 Uniform arrays
27:05 Circles and SDFs
31:47 Boolean logic
33:25 Debugging shaders
34:13 Conclusion
Resources:
Inigo Quilez YouTube: @InigoQuilez
Inigo Quilez shader:
Kishimisu YouTube: @Kishimisu
Kishimisu shader:
Types of shaders:
GLSL Data Types: (GLSL)
All available p5js shader attributes and uniforms:
gl_FragCoord:
mix function:
Library:
2D SDFs:
Examples:
All examples:
Vertex shader example:
Fragment shader gradient example:
Fragment shader position example:
Fragment shader image example:
Fragment shader array example:
Fragment shader SDF example:
Fragment shader logic example:
Shaders are an incredibly useful programming tool to have under your belt, especially for creative coding and generative art. They unlock a whole heap of potential, but they’re a bit quirky to learn!
This video covers a lot of the fundamentals and will hopefully set you up well for using shaders in the future!
This is a bit of a long/dense video so be sure to take a break if you need, and you can always watch it more than once to help it all sink in!
This video and its examples use P5js in WEBGL mode, however the concepts are transferable to pretty much any environment that you can use shaders in (some syntax may vary, especially in the CPU code).
Follow me:
Support the channel: @BarneyCodes/join
Twitter:
Reddit:
#shaders #graphics #creativecoding
1 view
130
40
1 week ago 00:18:02 2
Occult Hollywood // Cinema as Ritual Magic
1 week ago 00:31:50 1
The Insane World of Mega Rich Pastors
2 weeks ago 00:25:57 1
Curators’ Tour of Silk Roads exhibition at the British Museum
2 weeks ago 00:15:29 1
DLSS 4 on Nvidia RTX 5080 First Look: Super Res + Multi Frame-Gen on Cyberpunk 2077 RT Overdrive!
2 weeks ago 00:14:19 1
The BEST Chinese Carbon Road Bike Wheels vs The BEST Western Road Bike Wheels
2 weeks ago 00:06:33 1
HOUSE in Russian: all the forms of this word
3 weeks ago 05:31:30 2
Python Tutorial for Beginners - Learn Python in 5 Hours [FULL COURSE]
3 weeks ago 00:10:00 1
Yildiz: Alive Free Energy Inventor Magnet Infinity Motor Powers Homes for Free!
3 weeks ago 02:39:28 5
Old English Pronunciation: A Comprehensive Reconstruction
3 weeks ago 03:06:40 1
Volodymyr Zelenskyy: Ukraine, War, Peace, Putin, Trump, NATO, and Freedom | Lex Fridman Podcast #456
3 weeks ago 00:08:24 1
Learn Chinese for Beginners | Nationalities in Chinese | Country Names in Chinese
4 weeks ago 00:42:39 1
Flatpicking Guitar with Molly Tuttle
4 weeks ago 00:20:09 1
EXPOSING The Group That Ruined The TF2 Workshop
4 weeks ago 00:00:36 1
PROJECT NET | Graphics Comparison
4 weeks ago 00:09:23 1
The BEST Distortion Pedal I EVER Tried?! (Lichtlaerm Audio Gehenna)
4 weeks ago 00:03:08 1
Unreal Engine 5 Animation Hack: Attach Actors with Sequencer
4 weeks ago 00:01:31 1
”Chainsaw Man – The Movie: Reze Arc” Official Teaser 2/劇場版『チェンソーマン レゼ篇』特報
4 weeks ago 00:23:46 1
C64 Kid vs NES: What Did I Miss Out On?
4 weeks ago 00:01:43 1
Looney Tunes: Gremlins 2 Intro & Outro 1990
4 weeks ago 00:41:47 2
Phantasia - Future Angels (1981)
1 month ago 00:07:27 1
Hostinger Review 2024 - Is it Worth Buying? ✅🔥🔥🔥👉 91% COUPON Code Included
1 month ago 00:03:49 1
Beginner’s Guide to Football Betting: Everything You Need to Know
1 month ago 00:36:23 1
Yanis Varoufakis: Welcome to the age of technofeudalism
1 month ago 00:06:38 1
Meme Coin SUPER CYCLE - I Made 1 ETH PER DAY with This Meme Coin Trading Bot