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
111
35
4 years ago 00:34:32 11
RS 103 | Introduction to Lighting
9 years ago 00:46:24 39
Introduction to NPM
9 years ago 00:51:53 63
Introduction to GrowFX
9 years ago 00:08:55 231
Introduction to TimeShaper
11 years ago 00:09:59 175
Introduction to Keyshot
9 years ago 00:03:44 29
Alienation ’Introduction to the Invasion’ Video
10 years ago 00:02:55 51
Introduction to Cells
9 years ago 01:40:16 131
Introduction to TypeScript
6 years ago 00:02:49 95
Introduction to ShadowS!
12 years ago 00:03:51 151
Introduction to Pikkoserver
8 years ago 00:07:43 81
Introduction to Graphs
9 years ago 01:28:23 74
Introduction to WebSockets
8 years ago 00:04:53 64
Introduction to Shardbound
4 years ago 00:04:51 93
Introduction and answers to some questions
9 years ago 00:06:58 505
Introduction to Wire EDM
7 years ago 00:16:07 32
Introduction to NOVA
4 years ago 00:03:39 29
Introduction to Wheelstair
12 years ago 00:07:49 55
Introduction to Belarus
9 years ago 00:49:45 39
Introduction to Computer Graphics
2 years ago 00:25:47 80
Introduction To Perspective
5 years ago 00:26:36 16
Introduction to gRPC
3 years ago 00:45:28 54
Cinema4D to Houdini (Introduction to Attributes)
11 years ago 00:03:40 1.1K
Warframe: Tutorial — Introduction to Dojos (Updated)