WEBVTT

1
00:00:00.080 --> 00:00:01.679
<v Speaker 1>You know that feeling when you're playing a game and

2
00:00:01.720 --> 00:00:05.559
<v Speaker 1>the graphics just pop, the way light catches the surface,

3
00:00:05.960 --> 00:00:10.359
<v Speaker 1>or those subtle reflections, maybe even that really distinct stylized look,

4
00:00:10.439 --> 00:00:13.960
<v Speaker 1>you know that makes a world feel real or sometimes

5
00:00:14.039 --> 00:00:17.120
<v Speaker 1>magically hand drawn. Well, a lot of that visual match

6
00:00:17.160 --> 00:00:18.640
<v Speaker 1>comes down to something called shads.

7
00:00:18.879 --> 00:00:21.399
<v Speaker 2>Absolutely, they're kind of like the secret sauce. Whden't you say?

8
00:00:21.679 --> 00:00:24.640
<v Speaker 2>They define how light interacts with everything you see exactly.

9
00:00:24.719 --> 00:00:27.679
<v Speaker 1>It turns simple three D models into something visually rich.

10
00:00:27.800 --> 00:00:31.079
<v Speaker 2>They're really the unsung heroes working away at the pixel level.

11
00:00:31.199 --> 00:00:33.240
<v Speaker 2>It's where art definitely meets code.

12
00:00:33.399 --> 00:00:36.799
<v Speaker 1>So today we're doing a deep dive into this fascinating

13
00:00:36.840 --> 00:00:40.320
<v Speaker 1>world Unity Shads and Effects. Right, we're drawing from a

14
00:00:40.359 --> 00:00:43.799
<v Speaker 1>really great resource, the Unity five point x Shaters and

15
00:00:43.799 --> 00:00:48.439
<v Speaker 1>Effects Cookbook. Our mission is basically to unpack how developers

16
00:00:48.520 --> 00:00:52.240
<v Speaker 1>use shader programming to really bring their Unity projects to life.

17
00:00:52.320 --> 00:00:54.759
<v Speaker 2>Yeah, and give you a shortcut to understanding what's behind

18
00:00:54.880 --> 00:00:58.039
<v Speaker 2>modern game visuals from you know, the basic building blocks

19
00:00:58.399 --> 00:01:01.359
<v Speaker 2>right up to some really mind ending real time effects.

20
00:01:01.640 --> 00:01:05.640
<v Speaker 1>And this cookbook the authors are top notch Alan Zuconi

21
00:01:05.680 --> 00:01:09.359
<v Speaker 1>develops thirty under thirty developer behind zero Arbitalis and.

22
00:01:09.400 --> 00:01:12.840
<v Speaker 2>Kenneth Lammers, He's got what over fifteen years in the industry,

23
00:01:13.040 --> 00:01:16.439
<v Speaker 2>worked on huge titles like Call of Duty three, Alan Wake.

24
00:01:16.719 --> 00:01:19.680
<v Speaker 1>So yeah, there definitely are expert guides for this for sure.

25
00:01:20.519 --> 00:01:23.280
<v Speaker 1>So if you've ever wondered how games get those stunning visuals,

26
00:01:23.799 --> 00:01:26.799
<v Speaker 1>how a simple cube can look like metal or wood,

27
00:01:26.920 --> 00:01:28.879
<v Speaker 1>or how an explosion just looks.

28
00:01:28.719 --> 00:01:31.879
<v Speaker 2>Right, then this deep dive is definitely for you. Get

29
00:01:31.920 --> 00:01:33.439
<v Speaker 2>ready for some aha moments.

30
00:01:33.560 --> 00:01:35.799
<v Speaker 1>Let's start right at the beginning. Then at its core,

31
00:01:35.920 --> 00:01:36.799
<v Speaker 1>what is a shader?

32
00:01:37.280 --> 00:01:39.959
<v Speaker 2>Okay? So think of it like a tiny program, a

33
00:01:40.000 --> 00:01:42.959
<v Speaker 2>specialized program that runs on your graphics card, okay, and

34
00:01:43.040 --> 00:01:45.680
<v Speaker 2>its job is to tell the graphics card how light

35
00:01:45.719 --> 00:01:48.840
<v Speaker 2>should behave on a surface. Imagine you have a plane

36
00:01:48.879 --> 00:01:51.519
<v Speaker 2>three D cube. Yep. The shader is what makes it

37
00:01:51.560 --> 00:01:54.840
<v Speaker 2>look like shiny metal or rough wood or maybe even glass.

38
00:01:55.159 --> 00:01:57.879
<v Speaker 2>It's not just slapping on a picture. It's simulating how

39
00:01:57.959 --> 00:01:59.840
<v Speaker 2>light interacts with that material.

40
00:01:59.760 --> 00:02:02.400
<v Speaker 1>A right, So it's about the light interaction, not just

41
00:02:02.439 --> 00:02:05.280
<v Speaker 1>the color. Makes sense, it's the visual identity exactly. But

42
00:02:05.319 --> 00:02:08.039
<v Speaker 1>how does this shader fit into, you know, the bigger

43
00:02:08.080 --> 00:02:12.199
<v Speaker 1>picture in unity the rendering process? What's the chain of command.

44
00:02:12.199 --> 00:02:15.960
<v Speaker 2>Good question. Let's break it down. So in Unity, everything

45
00:02:15.960 --> 00:02:17.800
<v Speaker 2>you see is basically a game object.

46
00:02:17.719 --> 00:02:20.240
<v Speaker 1>Right, characters, props everything.

47
00:02:20.280 --> 00:02:23.439
<v Speaker 2>Yeah, And for a three D game object to show up,

48
00:02:23.719 --> 00:02:26.719
<v Speaker 2>it usually needs a component called a mesh renderer. Think

49
00:02:26.719 --> 00:02:30.960
<v Speaker 2>of the mesh render like the stage manager deciding how

50
00:02:31.000 --> 00:02:32.280
<v Speaker 2>that three D model appears.

51
00:02:32.360 --> 00:02:35.240
<v Speaker 1>Okay, like deciding its costume and lighting pretty much.

52
00:02:35.360 --> 00:02:37.919
<v Speaker 2>Yeah, And that mesh render uses something called a material.

53
00:02:38.000 --> 00:02:40.560
<v Speaker 2>The material is like the specific recipe is its silk

54
00:02:40.840 --> 00:02:43.479
<v Speaker 2>is a burlap? Got it? And that material contains the shader.

55
00:02:43.800 --> 00:02:46.560
<v Speaker 2>The shader is the actual set of instructions defining how

56
00:02:46.680 --> 00:02:49.360
<v Speaker 2>light bounces off that silk or burlap. So the chain

57
00:02:49.439 --> 00:02:52.319
<v Speaker 2>is game object, mish renderer, material.

58
00:02:51.960 --> 00:02:55.520
<v Speaker 1>Shader, clear object renderer, material shader. And speaking of Unity,

59
00:02:55.639 --> 00:02:58.039
<v Speaker 1>Unity five brought a big change rate hebr oh.

60
00:02:57.960 --> 00:03:01.599
<v Speaker 2>Huge physically based rendering PBR that became the new standard.

61
00:03:01.800 --> 00:03:04.599
<v Speaker 1>What was so revolutionary about it? More realistic graphics?

62
00:03:04.879 --> 00:03:07.120
<v Speaker 2>Well, yes, but it was more than that. The real

63
00:03:07.159 --> 00:03:12.120
<v Speaker 2>insight was that PBR provided a consistent, physically plausible way

64
00:03:12.240 --> 00:03:16.719
<v Speaker 2>to describe materials. Consistent how meaning artists could define a material,

65
00:03:16.800 --> 00:03:19.960
<v Speaker 2>say brushed aluminum, and it would look correct under almost

66
00:03:20.000 --> 00:03:24.400
<v Speaker 2>any lighting condition morning sun, dim, indoor lights, whatever. No

67
00:03:24.560 --> 00:03:26.520
<v Speaker 2>more endless tweaking for every scene.

68
00:03:26.719 --> 00:03:30.680
<v Speaker 1>Ah okay, so it behaves predictably based on physics Exactly.

69
00:03:30.680 --> 00:03:33.280
<v Speaker 2>It was a massive step up from the older diffuse

70
00:03:33.319 --> 00:03:36.400
<v Speaker 2>and specular models in Unity four, which often needed a

71
00:03:36.400 --> 00:03:37.560
<v Speaker 2>lot more manual fiddling.

72
00:03:37.680 --> 00:03:40.080
<v Speaker 1>That sounds like a life saver for artists, and I

73
00:03:40.120 --> 00:03:42.280
<v Speaker 1>hear properties make it even easier for them.

74
00:03:42.319 --> 00:03:45.000
<v Speaker 2>What are those properties? Are Billiant. They're basically controls that

75
00:03:45.039 --> 00:03:48.159
<v Speaker 2>show up in the Unity Editor in the Materials Inspector tab.

76
00:03:48.120 --> 00:03:49.520
<v Speaker 1>Like sliders and color pickers.

77
00:03:49.599 --> 00:03:52.759
<v Speaker 2>Precisely, a shaded programmer writes a line of code like

78
00:03:52.879 --> 00:03:55.120
<v Speaker 2>color main, color color and boom, the artist get a

79
00:03:55.159 --> 00:03:59.199
<v Speaker 2>color swatch in the editor. Or roughness roughness range zero

80
00:03:59.240 --> 00:04:02.560
<v Speaker 2>one zero point gives them a slider, so the artists.

81
00:04:02.240 --> 00:04:05.080
<v Speaker 1>Can tweet the look, change the color, adjust roughness without

82
00:04:05.120 --> 00:04:06.439
<v Speaker 1>needing to code exactly.

83
00:04:06.520 --> 00:04:09.360
<v Speaker 2>That's the whole point. It separates the technical shader logic

84
00:04:09.400 --> 00:04:10.599
<v Speaker 2>from the artistic tweaking.

85
00:04:10.680 --> 00:04:13.840
<v Speaker 1>And crucially, where are the values for those properties stored

86
00:04:14.319 --> 00:04:14.960
<v Speaker 1>in the shader?

87
00:04:15.240 --> 00:04:18.160
<v Speaker 2>No, that's the key distinction. The properties are defined in

88
00:04:18.199 --> 00:04:22.040
<v Speaker 2>the shader, but there's specific values the chosen color the

89
00:04:22.079 --> 00:04:24.560
<v Speaker 2>slider setting are stored in the material.

90
00:04:24.800 --> 00:04:28.240
<v Speaker 1>Ah, so you can have one shader like metal, but

91
00:04:28.519 --> 00:04:32.399
<v Speaker 1>multiple materials using it, shiny steel, rusty iron, each with

92
00:04:32.439 --> 00:04:33.680
<v Speaker 1>different property values.

93
00:04:33.720 --> 00:04:36.120
<v Speaker 2>You got it. Change a property on the shiny steel

94
00:04:36.160 --> 00:04:40.839
<v Speaker 2>material and all objects using that material update instantly. Super flexible.

95
00:04:41.000 --> 00:04:43.920
<v Speaker 1>Okay, Now, for anyone brave enough to write their own shaders,

96
00:04:44.000 --> 00:04:48.000
<v Speaker 1>debugging sounds like fun. That magenta color, ah, the dreaded magenta.

97
00:04:48.199 --> 00:04:50.680
<v Speaker 2>Yeah, unlike C sharp scripts that just stop your game

98
00:04:50.879 --> 00:04:56.279
<v Speaker 2>shader errors, don't halt anything. Instead, your object turns bright unshaded.

99
00:04:55.839 --> 00:04:57.920
<v Speaker 1>Magenta, a very clear error message.

100
00:04:57.959 --> 00:05:01.600
<v Speaker 2>It certainly gets your attention. Commonness, the steaks are you know, typos,

101
00:05:01.680 --> 00:05:05.639
<v Speaker 2>missing semicolms forgetting a bracket or having a property defined

102
00:05:05.639 --> 00:05:07.439
<v Speaker 2>but not actually using it in the shader code. It

103
00:05:07.480 --> 00:05:08.120
<v Speaker 2>needs that link.

104
00:05:08.360 --> 00:05:11.160
<v Speaker 1>Good to know. Also heard something about floats in CIG

105
00:05:11.360 --> 00:05:12.439
<v Speaker 1>being slightly different.

106
00:05:12.680 --> 00:05:16.120
<v Speaker 2>Yeah, minor thing, but it catches people. In CIG the

107
00:05:16.199 --> 00:05:19.240
<v Speaker 2>shader language you just write one point zero, one point

108
00:05:19.240 --> 00:05:22.040
<v Speaker 2>oh f like you often do in Sea Shark, small detail,

109
00:05:22.120 --> 00:05:23.879
<v Speaker 2>big magenta headache if you forget.

110
00:05:24.079 --> 00:05:26.959
<v Speaker 1>Okay, so we've got the basics. Shaders tell light what

111
00:05:27.079 --> 00:05:30.600
<v Speaker 1>to do. Artists use materials and properties to tweak them.

112
00:05:30.879 --> 00:05:34.519
<v Speaker 1>But how do we get specific looks making something actually

113
00:05:34.560 --> 00:05:36.079
<v Speaker 1>look like wood or stone?

114
00:05:36.160 --> 00:05:39.279
<v Speaker 2>Right? That takes us into surface shaders, textures and lighting models.

115
00:05:39.600 --> 00:05:41.519
<v Speaker 2>This is where the real visual magic.

116
00:05:41.240 --> 00:05:44.199
<v Speaker 1>Happens surface shaders. What's the core idea there?

117
00:05:44.439 --> 00:05:47.680
<v Speaker 2>A surface shad basically has two main parts. First, there's

118
00:05:47.680 --> 00:05:50.680
<v Speaker 2>a surface function. In this function, you tell unity about

119
00:05:50.720 --> 00:05:54.079
<v Speaker 2>the physical properties of your surface, like it's base color, albedo,

120
00:05:54.439 --> 00:05:59.279
<v Speaker 2>how smooth or rough it is, smoothness if it's metallic, metallic, maybe,

121
00:05:59.279 --> 00:06:00.000
<v Speaker 2>how transparent?

122
00:06:00.079 --> 00:06:03.199
<v Speaker 1>And alpha okay, describing the material itself exactly.

123
00:06:03.279 --> 00:06:05.639
<v Speaker 2>Then all that information gets past to a lighting model.

124
00:06:06.000 --> 00:06:08.680
<v Speaker 2>The lighting model takes those surface properties and information about

125
00:06:08.680 --> 00:06:11.519
<v Speaker 2>the lights in your scene and calculates the final color

126
00:06:11.560 --> 00:06:12.360
<v Speaker 2>for each pixel.

127
00:06:12.600 --> 00:06:15.639
<v Speaker 1>So it combines the what it is with how it's

128
00:06:15.680 --> 00:06:16.639
<v Speaker 1>lit precisely.

129
00:06:16.720 --> 00:06:19.759
<v Speaker 2>And there are different structs or data packages for these properties,

130
00:06:19.800 --> 00:06:23.439
<v Speaker 2>like Surf's output standard for PBR. They hold things like albedo,

131
00:06:23.560 --> 00:06:27.680
<v Speaker 2>normal emission, metallic, smoothness, alpha, got it, and.

132
00:06:27.680 --> 00:06:30.720
<v Speaker 1>I understand c The shader language is pretty smart about

133
00:06:30.759 --> 00:06:32.600
<v Speaker 1>handling data pact rays.

134
00:06:32.839 --> 00:06:35.240
<v Speaker 2>Yeah, CG is really efficient. It uses things like float

135
00:06:35.240 --> 00:06:37.800
<v Speaker 2>three or float four. These packed rays. Think a float

136
00:06:37.839 --> 00:06:42.240
<v Speaker 2>three holding xyz for position or RGB for color. A

137
00:06:42.319 --> 00:06:45.000
<v Speaker 2>float four adds W or alpha.

138
00:06:44.800 --> 00:06:47.120
<v Speaker 1>So it groups related numbers together, right, and.

139
00:06:47.000 --> 00:06:48.920
<v Speaker 2>This lets you do cool stuff called swizzling. Like if

140
00:06:48.920 --> 00:06:50.720
<v Speaker 2>you have a color and a float four called color,

141
00:06:50.959 --> 00:06:53.199
<v Speaker 2>you can grab just the RGB parts really easily by

142
00:06:53.199 --> 00:06:56.360
<v Speaker 2>writing color dot RGB, or even rearrange them like color

143
00:06:56.360 --> 00:06:59.680
<v Speaker 2>dot bgr meat, trek, or even smearing. Assigning a single

144
00:06:59.720 --> 00:07:02.360
<v Speaker 2>value you like point five to a float three will

145
00:07:02.360 --> 00:07:05.720
<v Speaker 2>set all three components xyz two point five. It's all

146
00:07:05.759 --> 00:07:09.399
<v Speaker 2>about doing math on multiple values at once, which gpuser.

147
00:07:08.920 --> 00:07:10.839
<v Speaker 1>Great app Okay, back to textures. How do you get

148
00:07:10.839 --> 00:07:14.079
<v Speaker 1>a flat image, say bricks, onto a three D wall.

149
00:07:14.160 --> 00:07:17.120
<v Speaker 2>That's texture mapping. It relies on something called UV data

150
00:07:17.160 --> 00:07:18.959
<v Speaker 2>stored in the three D model itself.

151
00:07:19.360 --> 00:07:21.360
<v Speaker 1>UV data like coordinates.

152
00:07:21.399 --> 00:07:24.879
<v Speaker 2>Exactly each vertex corner point of your three D model

153
00:07:24.959 --> 00:07:28.079
<v Speaker 2>has two coordinates U and V, usually ranging from zero

154
00:07:28.120 --> 00:07:30.759
<v Speaker 2>to one. Think of it like flattening a three D

155
00:07:30.839 --> 00:07:34.120
<v Speaker 2>model onto a two D plane. These uvs tell the

156
00:07:34.120 --> 00:07:36.720
<v Speaker 2>shader exactly which part of the two D texture image

157
00:07:36.879 --> 00:07:39.480
<v Speaker 2>corresponds to which part of the three D model's.

158
00:07:39.120 --> 00:07:41.800
<v Speaker 1>Surface, and the GPU figures out the bits in between

159
00:07:41.839 --> 00:07:42.399
<v Speaker 1>the vertices.

160
00:07:42.480 --> 00:07:45.279
<v Speaker 2>Yep, it interpolates the uvs across the surface. Then the

161
00:07:45.319 --> 00:07:49.040
<v Speaker 2>shader uses a function usually text two D, to look

162
00:07:49.120 --> 00:07:51.439
<v Speaker 2>up or sample the color from the texture at that

163
00:07:51.519 --> 00:07:53.519
<v Speaker 2>specific UV coordinate for each pixel.

164
00:07:53.759 --> 00:07:57.040
<v Speaker 1>Clever? Can you animate textures this way like flowing water?

165
00:07:57.240 --> 00:08:00.480
<v Speaker 2>Absolutely? You can modify the UV coordinates over time. Just

166
00:08:00.519 --> 00:08:03.279
<v Speaker 2>add unities built in time variable or some fraction of

167
00:08:03.319 --> 00:08:07.319
<v Speaker 2>it to the U or V coordinate before sampling the texture. Presto.

168
00:08:07.480 --> 00:08:10.240
<v Speaker 2>Scrolling texture a classic way to fake movement.

169
00:08:10.519 --> 00:08:12.959
<v Speaker 1>Nice, But what about adding really fine detail, like the

170
00:08:13.000 --> 00:08:15.879
<v Speaker 1>tiny bumps on that brick wall where scratches on metal.

171
00:08:16.120 --> 00:08:19.000
<v Speaker 1>Adding tons of polygons would kill performance, right.

172
00:08:18.920 --> 00:08:21.120
<v Speaker 2>You definitely don'tant a model every single bump. That's where

173
00:08:21.160 --> 00:08:23.480
<v Speaker 2>normal mapping comes in. It's a fantastic technique.

174
00:08:23.480 --> 00:08:25.399
<v Speaker 1>How does that work? Is it another texture?

175
00:08:25.600 --> 00:08:28.959
<v Speaker 2>It is. It's a special texture, often purplish, called a

176
00:08:28.959 --> 00:08:31.920
<v Speaker 2>normal map or sometimes a bump map. But instead of

177
00:08:31.920 --> 00:08:36.159
<v Speaker 2>storing color, the RGB values in this texture actually represent

178
00:08:36.360 --> 00:08:39.679
<v Speaker 2>directions direction. Yeah, they represent the direction that the surface

179
00:08:39.759 --> 00:08:42.799
<v Speaker 2>normal is pointing at that specific pixel. The normal is

180
00:08:42.840 --> 00:08:45.480
<v Speaker 2>like an imaginary line pointing straight out from the surface.

181
00:08:46.039 --> 00:08:48.759
<v Speaker 2>By slightly changing the direction of this normal according to

182
00:08:48.799 --> 00:08:51.559
<v Speaker 2>the map, you trick the lighting calculation aw.

183
00:08:51.440 --> 00:08:53.200
<v Speaker 1>So the light bounces off as if there was a

184
00:08:53.240 --> 00:08:55.960
<v Speaker 1>bump there, even though the geometry is flat exactly.

185
00:08:56.080 --> 00:08:59.240
<v Speaker 2>It gives this incredible illusion of surface detail bumps, grooves,

186
00:08:59.320 --> 00:09:03.000
<v Speaker 2>rivet scratches without adding any extra polygons. It's super efficient.

187
00:09:03.559 --> 00:09:07.480
<v Speaker 2>Unity even provides a function unpacked normal to easily decode

188
00:09:07.480 --> 00:09:09.279
<v Speaker 2>the information from the normal map texture.

189
00:09:09.559 --> 00:09:13.559
<v Speaker 1>That's seriously cool. Okay, so normal maps fake detail on

190
00:09:13.639 --> 00:09:16.879
<v Speaker 1>solid surfaces. What about things that aren't solid, like glass

191
00:09:17.080 --> 00:09:21.200
<v Speaker 1>or ghosts or fire. Transparency sounds difficult.

192
00:09:21.440 --> 00:09:25.159
<v Speaker 2>It is surprisingly more complex than you might think. See

193
00:09:25.240 --> 00:09:28.799
<v Speaker 2>for solid objects, the graphics card does clever stuff like

194
00:09:28.919 --> 00:09:32.120
<v Speaker 2>z ordering, figuring out what's in front and only drawing that,

195
00:09:32.279 --> 00:09:35.080
<v Speaker 2>and culling like not drawing the back faces of objects

196
00:09:35.080 --> 00:09:35.639
<v Speaker 2>you can't see.

197
00:09:35.879 --> 00:09:37.039
<v Speaker 1>Makes sense, saves work.

198
00:09:37.559 --> 00:09:40.879
<v Speaker 2>But transparent objects mess that up. You need to see

199
00:09:40.879 --> 00:09:44.480
<v Speaker 2>what's behind them, so they need special handling. You use

200
00:09:44.519 --> 00:09:46.799
<v Speaker 2>shader tags to tell Unity how to handle them, like

201
00:09:46.879 --> 00:09:50.039
<v Speaker 2>setting que transparent tells Unity to draw them after all.

202
00:09:49.919 --> 00:09:53.519
<v Speaker 1>The solid stuff, so order matters a lot critically, and.

203
00:09:53.399 --> 00:09:57.120
<v Speaker 2>You need specific shader directives like hashtag, pregma, surface dot

204
00:09:57.159 --> 00:10:00.399
<v Speaker 2>alpha dot fade to enable blending so the it's parent

205
00:10:00.440 --> 00:10:02.600
<v Speaker 2>object mixes correctly with the background pixels.

206
00:10:02.679 --> 00:10:05.200
<v Speaker 1>Can you do stylized transparency too? I think the book

207
00:10:05.240 --> 00:10:06.639
<v Speaker 1>mentioned a hologram shader.

208
00:10:06.759 --> 00:10:08.639
<v Speaker 2>Oh yeah, that's a neat one. You can use a

209
00:10:08.639 --> 00:10:11.960
<v Speaker 2>mathematical operation called the dot product. You calculate the dot

210
00:10:11.960 --> 00:10:14.200
<v Speaker 2>product between the surface normal and the view direction.

211
00:10:14.440 --> 00:10:15.600
<v Speaker 1>Okay, what does that tell you?

212
00:10:15.840 --> 00:10:18.399
<v Speaker 2>It tells you how much a surface is facing towards

213
00:10:18.480 --> 00:10:21.799
<v Speaker 2>or away from the camera. Surfaces facing you get one value,

214
00:10:21.840 --> 00:10:24.639
<v Speaker 2>Surfaces facing away get another. You can then use this

215
00:10:24.720 --> 00:10:26.759
<v Speaker 2>to make only the edges or the parts facing you

216
00:10:26.799 --> 00:10:30.279
<v Speaker 2>slightly visible, creating that classic sci fi hologram rim.

217
00:10:30.120 --> 00:10:32.840
<v Speaker 1>Effect, just showing the outlines kind of yeah.

218
00:10:32.759 --> 00:10:36.840
<v Speaker 2>Or a faint semi transparent look. It's computationally cheap and

219
00:10:37.039 --> 00:10:40.720
<v Speaker 2>great for ghosts, force fields, selected object outlines, that kind

220
00:10:40.759 --> 00:10:41.000
<v Speaker 2>of thing.

221
00:10:41.759 --> 00:10:44.360
<v Speaker 1>All right, we're using all these textures, color normal maps,

222
00:10:44.399 --> 00:10:47.840
<v Speaker 1>maybe others. Textures take up memory, right, especially on mobile,

223
00:10:48.200 --> 00:10:49.600
<v Speaker 1>any tricks for optimizing that.

224
00:10:49.799 --> 00:10:53.240
<v Speaker 2>Big time textures are often a major memory hog. A

225
00:10:53.320 --> 00:10:56.679
<v Speaker 2>really common technique is texture packing, sometimes called channel.

226
00:10:56.399 --> 00:10:59.240
<v Speaker 1>Packing, packing like zipping files sort of.

227
00:10:59.399 --> 00:11:02.960
<v Speaker 2>But for data, many maps you need might only be grayscale,

228
00:11:03.039 --> 00:11:05.200
<v Speaker 2>like a roughness map or a metallic map, or an

229
00:11:05.240 --> 00:11:08.039
<v Speaker 2>ambient inclusion map. They only need one channel of.

230
00:11:08.080 --> 00:11:11.080
<v Speaker 1>Data instead of the usual three for RGB color exactly.

231
00:11:11.320 --> 00:11:13.759
<v Speaker 2>So you can take say your roughness map and put

232
00:11:13.759 --> 00:11:15.960
<v Speaker 2>it into the red channel of a texture. Take your

233
00:11:16.000 --> 00:11:18.600
<v Speaker 2>metallic map, put it in the green channel, maybe an

234
00:11:18.639 --> 00:11:21.120
<v Speaker 2>ambient inclusion map in the blue channel, and something else

235
00:11:21.120 --> 00:11:21.960
<v Speaker 2>in the alpha channel.

236
00:11:22.039 --> 00:11:25.960
<v Speaker 1>Ah. So one our GBA texture holds four different gray

237
00:11:26.000 --> 00:11:26.840
<v Speaker 1>scale maps.

238
00:11:26.919 --> 00:11:29.080
<v Speaker 2>You got it. It saves a ton of memory and

239
00:11:29.200 --> 00:11:32.039
<v Speaker 2>reduces the number of texture samples the shader needs to do.

240
00:11:32.600 --> 00:11:36.720
<v Speaker 2>Super common for character models and especially terrain. For terrain,

241
00:11:37.080 --> 00:11:41.279
<v Speaker 2>you might have one packed texture controlling how grass, dirt, rock,

242
00:11:41.480 --> 00:11:45.080
<v Speaker 2>and snow blend together using a function called LURP.

243
00:11:44.879 --> 00:11:46.440
<v Speaker 1>LURP linear interpolation.

244
00:11:46.639 --> 00:11:49.720
<v Speaker 2>Yeah, it smoothly blends between two values based on a

245
00:11:49.720 --> 00:11:51.960
<v Speaker 2>third value. So you could use the red channel of

246
00:11:51.960 --> 00:11:54.559
<v Speaker 2>your blend map to control the blend between dirt and grass,

247
00:11:54.759 --> 00:11:56.679
<v Speaker 2>the green channel for grass and rock, and so on.

248
00:11:57.200 --> 00:11:57.879
<v Speaker 2>Very efficient.

249
00:11:57.960 --> 00:12:00.879
<v Speaker 1>Okay, that makes sense. We mentioned lighting models earlier as

250
00:12:00.960 --> 00:12:04.200
<v Speaker 1>part of surface shaders. Why would a developer bother making

251
00:12:04.200 --> 00:12:06.840
<v Speaker 1>a custom lighting model. If Unity has good built in

252
00:12:06.879 --> 00:12:09.320
<v Speaker 1>ones like PBR, well, PBR.

253
00:12:08.960 --> 00:12:13.039
<v Speaker 2>Is fantastic for realism. But sometimes you don't want realism.

254
00:12:13.279 --> 00:12:15.840
<v Speaker 2>You want a specific artistic style. Maybe you want your

255
00:12:15.879 --> 00:12:17.559
<v Speaker 2>game to look like a comic book or an old

256
00:12:17.639 --> 00:12:21.080
<v Speaker 2>cartoon or something completely unique. Custom lighting models give you

257
00:12:21.120 --> 00:12:24.919
<v Speaker 2>that precise control over how light and shadow behave, letting

258
00:12:24.960 --> 00:12:26.759
<v Speaker 2>you define your own visual language.

259
00:12:26.799 --> 00:12:30.399
<v Speaker 1>So for non photorealistic rendering NPR.

260
00:12:30.399 --> 00:12:33.360
<v Speaker 2>Exactly, or even just for optimizing for very low end

261
00:12:33.360 --> 00:12:36.720
<v Speaker 2>platforms where PBR might be too expensive. Understanding the classic

262
00:12:36.720 --> 00:12:37.399
<v Speaker 2>models helps too.

263
00:12:37.519 --> 00:12:40.080
<v Speaker 1>Let's talk about those classics. What's Lambertune reflectants.

264
00:12:40.320 --> 00:12:45.000
<v Speaker 2>Lambertine was basically the default diffuse lighting model in Unity four.

265
00:12:45.279 --> 00:12:49.399
<v Speaker 2>It's super simple, very fast. It calculates brightness based only

266
00:12:49.399 --> 00:12:52.159
<v Speaker 2>on the angle between the light hitting the surface and

267
00:12:52.200 --> 00:12:53.840
<v Speaker 2>the surface normal itself.

268
00:12:53.480 --> 00:12:55.960
<v Speaker 1>So how directly the light hits it right, uses a.

269
00:12:55.879 --> 00:12:58.240
<v Speaker 2>Dot product for that. It results in a very matt

270
00:12:58.440 --> 00:13:02.240
<v Speaker 2>non shiny look. Thinks bull flat shading great for stylized

271
00:13:02.240 --> 00:13:04.000
<v Speaker 2>low poly games, very efficient.

272
00:13:03.799 --> 00:13:06.840
<v Speaker 1>And then the opposite end stylistically is maybe tune shading

273
00:13:06.960 --> 00:13:09.360
<v Speaker 1>or cell shading. That comic book look.

274
00:13:09.360 --> 00:13:13.519
<v Speaker 2>Yeah, totally different. Goal tune shading aims for that flat,

275
00:13:13.840 --> 00:13:17.559
<v Speaker 2>hand drawn cartoon style. The trick here is usually a

276
00:13:17.600 --> 00:13:20.679
<v Speaker 2>custom Whiting model that takes the smooth gradient of light

277
00:13:20.720 --> 00:13:21.759
<v Speaker 2>intensity you'd get from.

278
00:13:21.679 --> 00:13:24.120
<v Speaker 1>Lambursha makes it chunky exactly.

279
00:13:24.240 --> 00:13:26.840
<v Speaker 2>It uses something called a ramp map. It's usually a

280
00:13:26.879 --> 00:13:29.919
<v Speaker 2>small one D texture, like a thin strip with distinct

281
00:13:29.919 --> 00:13:33.720
<v Speaker 2>bands of color or brightness. The shader calculates the normal

282
00:13:33.799 --> 00:13:37.879
<v Speaker 2>light intensity often called n Dattel, the dot product of

283
00:13:37.919 --> 00:13:41.000
<v Speaker 2>normal and light direction. Uses that value to look up

284
00:13:41.000 --> 00:13:43.519
<v Speaker 2>a color on the ramp map, and poof, Instead of

285
00:13:43.519 --> 00:13:46.320
<v Speaker 2>a smooth gradient, you get sharp defined bands of color.

286
00:13:46.600 --> 00:13:47.879
<v Speaker 2>That's the cell shaded look.

287
00:13:48.080 --> 00:13:51.919
<v Speaker 1>Clever use of a texture to change the lighting result. Okay,

288
00:13:51.960 --> 00:13:56.519
<v Speaker 1>what about shininess speculat highlights, We've got pong blind fall right.

289
00:13:56.399 --> 00:13:58.519
<v Speaker 2>These are about adding those bright spots you see on

290
00:13:58.559 --> 00:14:02.679
<v Speaker 2>shiny objects. Is sort of a classic foundational model. It

291
00:14:02.720 --> 00:14:05.600
<v Speaker 2>calculates the reflection based on the angle between the direction

292
00:14:05.679 --> 00:14:07.919
<v Speaker 2>the camera is viewing from and the direction the light

293
00:14:07.919 --> 00:14:09.759
<v Speaker 2>would perfectly reflect off the surface, So.

294
00:14:09.759 --> 00:14:11.519
<v Speaker 1>It depends on where you're looking from very.

295
00:14:11.519 --> 00:14:14.279
<v Speaker 2>Much, so it's view dependent. It gives a decent shiny.

296
00:14:13.960 --> 00:14:16.559
<v Speaker 1>Look and Blindphong is it just better.

297
00:14:17.159 --> 00:14:19.799
<v Speaker 2>It's often preferred. Yeah, it's generally faster to calculate, and

298
00:14:20.120 --> 00:14:22.399
<v Speaker 2>in many cases looks a bit more realistic or at

299
00:14:22.440 --> 00:14:25.480
<v Speaker 2>least softer than basic fong. Instead of calculating the full

300
00:14:25.519 --> 00:14:29.039
<v Speaker 2>reflection vector, it uses a clever shortcut involving a half vector,

301
00:14:29.320 --> 00:14:31.399
<v Speaker 2>which is the vector halfway between the light direction and

302
00:14:31.440 --> 00:14:34.120
<v Speaker 2>the view direction. It was the default specular model and

303
00:14:34.240 --> 00:14:36.200
<v Speaker 2>unity for still very useful.

304
00:14:36.279 --> 00:14:40.159
<v Speaker 1>Okay, simple shininess covered. But then there's anisotropic speculator that

305
00:14:40.279 --> 00:14:43.960
<v Speaker 1>sounds complex. Brushed metal hair? How does that work?

306
00:14:44.159 --> 00:14:48.200
<v Speaker 2>Anisotropic is really cool. It simulates materials where the shininess

307
00:14:48.279 --> 00:14:52.240
<v Speaker 2>isn't uniform because the surface has tiny parallel grooves or

308
00:14:52.279 --> 00:14:55.120
<v Speaker 2>fibers I think brushed aluminum. The back of a CD

309
00:14:55.799 --> 00:14:58.120
<v Speaker 2>vinyl records even strands of hair.

310
00:14:58.000 --> 00:15:00.600
<v Speaker 1>So the highlight isn't just a round dot exactly.

311
00:15:00.799 --> 00:15:03.679
<v Speaker 2>Instead of a circular highlight, it stretches the specular highlight

312
00:15:03.720 --> 00:15:06.759
<v Speaker 2>perpendicularly to the direction of those tiny grooves or strands.

313
00:15:07.240 --> 00:15:11.120
<v Speaker 2>It requires extra information, usually from another texture or model data,

314
00:15:11.480 --> 00:15:13.840
<v Speaker 2>telling the shadeer which way the grain or fibers run

315
00:15:13.879 --> 00:15:16.480
<v Speaker 2>on the surface. It has a massive amount of realism

316
00:15:16.519 --> 00:15:17.720
<v Speaker 2>for those kinds of materials.

317
00:15:17.960 --> 00:15:22.240
<v Speaker 1>Wow, Okay, that's pretty specific control. Let's circle back to

318
00:15:22.279 --> 00:15:25.000
<v Speaker 1>PBR and unity five. You said it was a revolution.

319
00:15:25.679 --> 00:15:26.919
<v Speaker 1>What are the main workflows?

320
00:15:27.120 --> 00:15:30.799
<v Speaker 2>The two main ones are standard and standard a specular setup.

321
00:15:30.960 --> 00:15:33.879
<v Speaker 2>The most common one is the standard workflow, which uses

322
00:15:33.919 --> 00:15:34.799
<v Speaker 2>a metallic map.

323
00:15:35.159 --> 00:15:38.679
<v Speaker 1>Metallic workflow. How does that enforce realism?

324
00:15:39.000 --> 00:15:41.919
<v Speaker 2>It works based on a key physical principle. Things are

325
00:15:41.960 --> 00:15:45.840
<v Speaker 2>generally either metallic or non metallic dielectric. Pure metals get

326
00:15:45.879 --> 00:15:48.360
<v Speaker 2>almost all their color from reflected light. They have very

327
00:15:48.440 --> 00:15:52.360
<v Speaker 2>dark or black diffuse color. Their albedo map basically defines

328
00:15:52.399 --> 00:15:53.399
<v Speaker 2>the color of the reflection.

329
00:15:53.960 --> 00:15:56.759
<v Speaker 1>Okay, and non metals like plastic or wood.

330
00:15:57.200 --> 00:16:00.600
<v Speaker 2>Non metals have a colored diffuse component that's their albedo

331
00:16:00.679 --> 00:16:04.159
<v Speaker 2>map color, and their specular reflections are generally noncolored, reflecting

332
00:16:04.200 --> 00:16:06.519
<v Speaker 2>the color of the light source itself. The metallic map,

333
00:16:06.600 --> 00:16:09.639
<v Speaker 2>usually a grayscale texture packed new channel tells the shade

334
00:16:09.679 --> 00:16:12.279
<v Speaker 2>or how metallic. Each part of the surface is. Black

335
00:16:12.320 --> 00:16:15.360
<v Speaker 2>means non metal, white means pure metal, gray is somewhere

336
00:16:15.399 --> 00:16:17.279
<v Speaker 2>in between like dusty or corroded metal.

337
00:16:17.399 --> 00:16:19.039
<v Speaker 1>And smoothness is that packed in there too?

338
00:16:19.320 --> 00:16:24.120
<v Speaker 2>Often? Yes, the smoothness value controlling how sharp or blurry

339
00:16:24.120 --> 00:16:27.000
<v Speaker 2>reflections are is frequently packed into the alpha channel of

340
00:16:27.039 --> 00:16:30.919
<v Speaker 2>the metallic map texture. So one map controls both metalness

341
00:16:30.960 --> 00:16:31.799
<v Speaker 2>and smoothness.

342
00:16:32.159 --> 00:16:35.039
<v Speaker 1>It's efficient PBR in transparency. How does that work? Does

343
00:16:35.080 --> 00:16:37.919
<v Speaker 1>it handle glass and ghosts differently?

344
00:16:38.080 --> 00:16:41.559
<v Speaker 2>It does. PBR offers specific modes. Transparent mode is for

345
00:16:41.639 --> 00:16:45.480
<v Speaker 2>things like proper glass or clear plastics. Crucially, it keeps

346
00:16:45.480 --> 00:16:49.759
<v Speaker 2>all the PBR goodness speculat highlights, reflections, Fresnel effect where

347
00:16:49.919 --> 00:16:53.240
<v Speaker 2>reflectivity changes with the young angle. It looks physically correct.

348
00:16:53.519 --> 00:16:54.919
<v Speaker 1>Okay, what about ghosts?

349
00:16:55.240 --> 00:16:57.639
<v Speaker 2>For that, you'd probably use fade mode. In fade mode,

350
00:16:57.799 --> 00:17:00.559
<v Speaker 2>as the object becomes more transparent, everything fades out, including

351
00:17:00.600 --> 00:17:03.879
<v Speaker 2>the specular highlights and reflections. Perfect for effects where things

352
00:17:03.919 --> 00:17:05.279
<v Speaker 2>need to dissolve completely.

353
00:17:05.359 --> 00:17:06.480
<v Speaker 1>And the third one cut out.

354
00:17:06.640 --> 00:17:09.079
<v Speaker 2>Cutout mode is for things that are geometrically solid but

355
00:17:09.240 --> 00:17:11.880
<v Speaker 2>need to look like they have holes, like chain link fences,

356
00:17:12.000 --> 00:17:15.079
<v Speaker 2>leaves on a tree, or detailed grates. It uses the

357
00:17:15.079 --> 00:17:18.480
<v Speaker 2>alpha channel of the texture, but it's not blended transparency.

358
00:17:18.759 --> 00:17:21.640
<v Speaker 2>It's either fully opaque or fully invisible based on an

359
00:17:21.640 --> 00:17:25.160
<v Speaker 2>alpha cutoff slider, sharp edges, no semi transparency.

360
00:17:25.400 --> 00:17:30.480
<v Speaker 1>Got it makes sense for foliage. Now realistic reflections like

361
00:17:30.680 --> 00:17:34.400
<v Speaker 1>mirrors or shiny floors. You mentioned reflection probes right.

362
00:17:34.519 --> 00:17:37.960
<v Speaker 2>Real time reflections are super expensive, So reflection probes are

363
00:17:37.960 --> 00:17:40.400
<v Speaker 2>a way to capture the environment around a certain point.

364
00:17:40.799 --> 00:17:42.640
<v Speaker 2>Think of it like taking a three hundred and sixty

365
00:17:42.640 --> 00:17:45.200
<v Speaker 2>degree photo from that spot and storing it as a

366
00:17:45.200 --> 00:17:47.319
<v Speaker 2>special texture called a cube map.

367
00:17:47.240 --> 00:17:49.359
<v Speaker 1>Six images, one for each direction.

368
00:17:49.279 --> 00:17:53.839
<v Speaker 2>Exactly up, down, left, right, front, back. Then shiny objects

369
00:17:53.880 --> 00:17:56.359
<v Speaker 2>near that probe can sample this cube map to show

370
00:17:56.359 --> 00:17:58.279
<v Speaker 2>reflections of the surrounding static scenery.

371
00:17:58.319 --> 00:17:59.200
<v Speaker 1>Are they expensive?

372
00:17:59.599 --> 00:18:01.799
<v Speaker 2>They can be, especially if they need to update in

373
00:18:01.880 --> 00:18:04.559
<v Speaker 2>real time, like if dynamic objects need to be reflected.

374
00:18:05.000 --> 00:18:08.359
<v Speaker 2>Often they're baked, meaning they capture the static environment once

375
00:18:08.400 --> 00:18:10.599
<v Speaker 2>in the editor, which is much cheaper at run time.

376
00:18:10.960 --> 00:18:14.200
<v Speaker 2>They're crucial for making metallic PBR materials look believable.

377
00:18:14.400 --> 00:18:18.240
<v Speaker 1>Speaking of baking, light baking, that sounds like pre calculating lighting.

378
00:18:18.559 --> 00:18:21.759
<v Speaker 2>That's exactly what it is. Calculating how light bounces around

379
00:18:21.759 --> 00:18:26.519
<v Speaker 2>realistically in real time. Global illumination or GI is incredibly demanding,

380
00:18:27.240 --> 00:18:31.000
<v Speaker 2>So light baking lets unity pre calculate all that complex

381
00:18:31.119 --> 00:18:35.279
<v Speaker 2>light bouncing for objects that don't move. Your buildings terrain static.

382
00:18:34.839 --> 00:18:36.720
<v Speaker 1>Props and saves that lighting information.

383
00:18:36.839 --> 00:18:40.200
<v Speaker 2>Yeah, saves it into special textures called light maps. At runtime,

384
00:18:40.319 --> 00:18:43.039
<v Speaker 2>these static objects just look up their pre calculated lighting

385
00:18:43.079 --> 00:18:45.640
<v Speaker 2>from the light map. It looks great and is super

386
00:18:45.680 --> 00:18:48.359
<v Speaker 2>fast compared to calculating GI every frame.

387
00:18:48.960 --> 00:18:52.599
<v Speaker 1>But what about things that do move your player character NPCs,

388
00:18:52.720 --> 00:18:56.319
<v Speaker 1>moving objects, They can't use static lightmaps.

389
00:18:55.920 --> 00:18:59.200
<v Speaker 2>Correct for them. We use light probes. You scatter these

390
00:18:59.240 --> 00:19:02.920
<v Speaker 2>probes around your scene, especially where lighting conditions change. Like

391
00:19:03.000 --> 00:19:06.240
<v Speaker 2>light maps, they get baked. They sample the complex bounced

392
00:19:06.319 --> 00:19:08.599
<v Speaker 2>lighting at the specific locations during the bake.

393
00:19:08.519 --> 00:19:11.160
<v Speaker 1>Process, so they store the lighting info at points in

394
00:19:11.200 --> 00:19:12.279
<v Speaker 1>space exactly.

395
00:19:12.960 --> 00:19:15.880
<v Speaker 2>Then, as your character or a dynamic object moves through

396
00:19:15.920 --> 00:19:19.440
<v Speaker 2>the scene, it looks at the nearest light probes, blends

397
00:19:19.480 --> 00:19:22.599
<v Speaker 2>the lighting information sampled by them, and uses that to

398
00:19:22.680 --> 00:19:26.920
<v Speaker 2>light itself. This allows moving objects to feel realistically integrated

399
00:19:26.960 --> 00:19:30.440
<v Speaker 2>into the baked static environment. It's a clever way to

400
00:19:30.480 --> 00:19:33.640
<v Speaker 2>get the best of both worlds, detailed lighting on static

401
00:19:33.680 --> 00:19:35.799
<v Speaker 2>stuff dynamic objects that still fit in.

402
00:19:36.000 --> 00:19:40.000
<v Speaker 1>It's all about balancing that realism and performance budget always.

403
00:19:39.680 --> 00:19:40.559
<v Speaker 2>That's the name of the game.

404
00:19:40.559 --> 00:19:43.799
<v Speaker 1>In real time graphics, okay, shifting gears a bit, shaders

405
00:19:43.839 --> 00:19:46.279
<v Speaker 1>aren't just about color and light, right. They can actually

406
00:19:46.400 --> 00:19:50.000
<v Speaker 1>change the shape of objects using vertex functions.

407
00:19:50.119 --> 00:19:53.319
<v Speaker 2>Absolutely. This is where shaters get really powerful beyond just

408
00:19:53.359 --> 00:19:56.799
<v Speaker 2>surface appearance. A Vertex function runs for every vertex or

409
00:19:56.880 --> 00:19:59.519
<v Speaker 2>corner point of your three D model before it even

410
00:19:59.519 --> 00:20:02.680
<v Speaker 2>gets render, and inside this function you can actually change

411
00:20:02.680 --> 00:20:04.440
<v Speaker 2>the vertex's position in three D.

412
00:20:04.440 --> 00:20:07.039
<v Speaker 1>Space, So you can literally move the points of the

413
00:20:07.079 --> 00:20:08.519
<v Speaker 1>model around with code.

414
00:20:08.599 --> 00:20:11.480
<v Speaker 2>Yep, you can deform the geometry. For example, you could

415
00:20:11.480 --> 00:20:14.119
<v Speaker 2>access vertex colors. Did you know you can paint colors

416
00:20:14.119 --> 00:20:16.519
<v Speaker 2>directly onto the vertices of a model in many three

417
00:20:16.599 --> 00:20:17.559
<v Speaker 2>D modeling tools.

418
00:20:17.920 --> 00:20:18.920
<v Speaker 1>I didn't realize that.

419
00:20:19.039 --> 00:20:21.039
<v Speaker 2>Yeah, And you can read those colors in the vertex

420
00:20:21.119 --> 00:20:24.200
<v Speaker 2>shader and use the drive effects maybe make parts glow

421
00:20:24.720 --> 00:20:27.319
<v Speaker 2>or control how much wind affects certain parts of a mesh.

422
00:20:27.440 --> 00:20:30.960
<v Speaker 1>Speaking of wind, can you animate vertices like a waving flag?

423
00:20:31.079 --> 00:20:34.319
<v Speaker 2>Totally? That's a classic use case. Instead of complex physics

424
00:20:34.359 --> 00:20:36.759
<v Speaker 2>or bone animations, you can use a simple sine wave

425
00:20:36.839 --> 00:20:40.279
<v Speaker 2>based on time time and the vertex's position to make

426
00:20:40.400 --> 00:20:43.119
<v Speaker 2>vertices move up and down or back and forth, creating

427
00:20:43.119 --> 00:20:47.440
<v Speaker 2>a realistic waving flag or rippling water effect directly in

428
00:20:47.480 --> 00:20:47.839
<v Speaker 2>the shader.

429
00:20:48.079 --> 00:20:53.200
<v Speaker 1>That's really efficient. What's this normal extrusion technique? It sounds weird,

430
00:20:53.359 --> 00:20:55.440
<v Speaker 1>making things chubbier or skinnier.

431
00:20:55.599 --> 00:20:58.079
<v Speaker 2>It is a bit weird, but very effective. You take

432
00:20:58.079 --> 00:21:01.279
<v Speaker 2>the vertex position and push it outwards or inwards along

433
00:21:01.319 --> 00:21:04.440
<v Speaker 2>its normal direction, that line pointing straight out from the surface.

434
00:21:04.160 --> 00:21:07.319
<v Speaker 1>So everything expands or contracts along its surface direction.

435
00:21:07.599 --> 00:21:10.400
<v Speaker 2>Right, you can make a character look inslated or deflated,

436
00:21:10.920 --> 00:21:14.119
<v Speaker 2>and you can control how much extrusion happens using a

437
00:21:14.160 --> 00:21:17.119
<v Speaker 2>texture map an extrusion map, so you could make certain

438
00:21:17.160 --> 00:21:18.680
<v Speaker 2>parts puff out and others sink in.

439
00:21:18.799 --> 00:21:21.279
<v Speaker 1>And the book mentions zombifying characters.

440
00:21:21.519 --> 00:21:24.039
<v Speaker 2>Yeah, that's a great example. You could use an extrusion

441
00:21:24.079 --> 00:21:26.359
<v Speaker 2>map to make the skin sync in over the bones,

442
00:21:26.680 --> 00:21:30.359
<v Speaker 2>giving that gaunt, skeletal look, or for something less gruesome.

443
00:21:30.559 --> 00:21:33.400
<v Speaker 2>Snow shaders often use it. They might detect which triangles

444
00:21:33.440 --> 00:21:36.319
<v Speaker 2>face upwards, color them white, and then extrude them slightly

445
00:21:36.319 --> 00:21:38.960
<v Speaker 2>along their normal to simulate snow piling up.

446
00:21:39.119 --> 00:21:41.119
<v Speaker 1>Wow and explosions.

447
00:21:41.319 --> 00:21:44.359
<v Speaker 2>Vertex shads are key from many volumetric effects too. For

448
00:21:44.400 --> 00:21:47.200
<v Speaker 2>an explosion, you might start with a sphere mesh, then

449
00:21:47.359 --> 00:21:50.279
<v Speaker 2>use noise textures and time in the vertex shader. To

450
00:21:50.319 --> 00:21:54.359
<v Speaker 2>displace the vertices outwards in a chaotic expanding way. Combine

451
00:21:54.400 --> 00:21:56.400
<v Speaker 2>that with a clip function in the fragment shader to

452
00:21:56.400 --> 00:21:58.839
<v Speaker 2>make parts dissolve, and you get a convincing three D

453
00:21:58.920 --> 00:22:02.200
<v Speaker 2>fireball effect without complex fluid simulations.

454
00:22:02.200 --> 00:22:06.160
<v Speaker 1>Incredible control. Okay, beyond surface shaders, there are vertex and

455
00:22:06.200 --> 00:22:08.839
<v Speaker 1>fragment shaders. These give even more control they do.

456
00:22:09.279 --> 00:22:12.680
<v Speaker 2>Surface shators are actually a higher level abstraction that Unity provides,

457
00:22:12.759 --> 00:22:15.960
<v Speaker 2>making common tasks easier. Under the hood, they get compiled

458
00:22:15.960 --> 00:22:18.960
<v Speaker 2>down into lower level vertex and fragment shaders. Anyway, writing

459
00:22:19.039 --> 00:22:22.039
<v Speaker 2>vertex and fragment shaders directly gives you complete control over

460
00:22:22.079 --> 00:22:22.680
<v Speaker 2>both stages.

461
00:22:22.759 --> 00:22:26.000
<v Speaker 1>Vertext processes geometry, Fragment processes.

462
00:22:25.920 --> 00:22:30.839
<v Speaker 2>Pixels almost it processes fragments, which are potential pixels. A

463
00:22:30.880 --> 00:22:34.799
<v Speaker 2>fragment has color, depth, position, etc. Before potentially gets written

464
00:22:34.799 --> 00:22:37.640
<v Speaker 2>to the screen. But yet, think of the fragment shader

465
00:22:37.759 --> 00:22:40.680
<v Speaker 2>as running for every pixel being rendered for that object.

466
00:22:40.720 --> 00:22:43.480
<v Speaker 1>And this is where the grab pass comes in. That

467
00:22:43.599 --> 00:22:44.720
<v Speaker 1>sounds powerful, It's.

468
00:22:44.720 --> 00:22:47.720
<v Speaker 2>Very powerful for screen effects. A grab pass is a

469
00:22:47.720 --> 00:22:50.200
<v Speaker 2>special command you put in your shader. It tells Unity,

470
00:22:50.640 --> 00:22:54.160
<v Speaker 2>before you draw this object, grab whatever has already been drawn.

471
00:22:54.160 --> 00:22:56.319
<v Speaker 2>To the screen in this area and put it into

472
00:22:56.319 --> 00:22:57.119
<v Speaker 2>a texture for me.

473
00:22:57.400 --> 00:22:59.599
<v Speaker 1>So it gets a snapshot of the background.

474
00:22:59.160 --> 00:23:02.480
<v Speaker 2>Exactly, usually into a texture named grab texture. Now in

475
00:23:02.519 --> 00:23:05.039
<v Speaker 2>your fragment shader for the current object, say a piece

476
00:23:05.039 --> 00:23:07.680
<v Speaker 2>of glass, you can read from that grab texture and

477
00:23:07.720 --> 00:23:11.359
<v Speaker 2>distort it precisely. You can sample the grab texture using

478
00:23:11.359 --> 00:23:15.039
<v Speaker 2>modified UV coordinates. For glass, you might offset the uvs

479
00:23:15.119 --> 00:23:18.519
<v Speaker 2>based on a normal map to simulate refraction. For water,

480
00:23:18.920 --> 00:23:21.160
<v Speaker 2>you might use an animated noise texture to make the

481
00:23:21.240 --> 00:23:25.240
<v Speaker 2>UV's wiggle, creating that shimmering distortion effect. It makes the

482
00:23:25.279 --> 00:23:28.279
<v Speaker 2>object look like it's realistically interacting with the scene behind it.

483
00:23:28.599 --> 00:23:31.599
<v Speaker 1>That's how you get those really convincing glass or heat

484
00:23:31.640 --> 00:23:32.240
<v Speaker 1>haze effects.

485
00:23:32.400 --> 00:23:34.039
<v Speaker 2>Yep. Grab pass is the key.

486
00:23:34.160 --> 00:23:37.599
<v Speaker 1>Okay, amazing visuals, but we need performance, especially on mobile.

487
00:23:37.839 --> 00:23:40.200
<v Speaker 1>How do you optimize shaders make them cheaper?

488
00:23:40.640 --> 00:23:44.519
<v Speaker 2>Several ways. A big one is data precision. GPUs can

489
00:23:44.559 --> 00:23:47.759
<v Speaker 2>work with different levels of floating point precision. Full float

490
00:23:47.920 --> 00:23:52.279
<v Speaker 2>thirty two bit is most precise, but slowest. Half sixteen

491
00:23:52.319 --> 00:23:55.920
<v Speaker 2>bit is less precise, but faster, often perfectly fined for colors,

492
00:23:56.000 --> 00:23:59.680
<v Speaker 2>texture coordinates, maybe even normals fixed. Often eleven bit is

493
00:23:59.680 --> 00:24:02.920
<v Speaker 2>even less precise, but the fastest good for simple color

494
00:24:03.000 --> 00:24:06.039
<v Speaker 2>calculations are things that don't need high accuracy.

495
00:24:05.480 --> 00:24:08.720
<v Speaker 1>So using smaller variable types saves time and memory definitely.

496
00:24:08.720 --> 00:24:11.160
<v Speaker 2>Another trick is the hashtag pragma surface no a ford

497
00:24:11.200 --> 00:24:14.480
<v Speaker 2>Ad directive. Normally Unity might try to calculate lighting for

498
00:24:14.559 --> 00:24:17.039
<v Speaker 2>multiple lights hitting an object in the forward rendering path,

499
00:24:17.240 --> 00:24:21.359
<v Speaker 2>adding complexity. No forward DAD tells Unity only calculate the

500
00:24:21.359 --> 00:24:24.920
<v Speaker 2>brightest directional light per pixel. Handle all other lights more cheaply,

501
00:24:25.039 --> 00:24:28.039
<v Speaker 2>maybe pervertex. Big performance win in scenes with many lights.

502
00:24:28.079 --> 00:24:29.680
<v Speaker 1>Good tip any others.

503
00:24:29.559 --> 00:24:33.599
<v Speaker 2>Sharing texture coordinates uves if multiple textures on your material

504
00:24:33.720 --> 00:24:36.799
<v Speaker 2>use the same mapping, reducing the number of texture lookups

505
00:24:36.799 --> 00:24:40.279
<v Speaker 2>overall using those texture packing techniques you talked about. It's

506
00:24:40.319 --> 00:24:43.480
<v Speaker 2>often about reducing memory, bandwidth and calculation complexity.

507
00:24:43.960 --> 00:24:47.000
<v Speaker 1>With all these shaders potentially running, how do you figure

508
00:24:47.039 --> 00:24:49.440
<v Speaker 1>out which one is causing a slow down if your

509
00:24:49.480 --> 00:24:50.519
<v Speaker 1>game starts lagging?

510
00:24:50.720 --> 00:24:55.079
<v Speaker 2>AH. The profiler Unity's built in profiler c TROL plus

511
00:24:55.079 --> 00:24:58.200
<v Speaker 2>seven or CMD plus seven on Mac is your best

512
00:24:58.240 --> 00:24:58.759
<v Speaker 2>friend here?

513
00:24:58.920 --> 00:25:00.000
<v Speaker 1>What does it show you?

514
00:25:00.119 --> 00:25:03.759
<v Speaker 2>Everything? It shows you frame by frame, what your CPU

515
00:25:03.880 --> 00:25:06.920
<v Speaker 2>and GPU are spending time on. You can see rendering

516
00:25:06.960 --> 00:25:09.720
<v Speaker 2>stats like draw calls, how many separate things are being

517
00:25:09.799 --> 00:25:12.799
<v Speaker 2>drawn triangle counts, and crucially, how much time is being

518
00:25:12.799 --> 00:25:15.599
<v Speaker 2>spent rendering different objects and executing their shaders.

519
00:25:15.640 --> 00:25:18.079
<v Speaker 1>So you can spot the expensive ones exactly.

520
00:25:18.319 --> 00:25:21.680
<v Speaker 2>You can pause the game, scrub through the timeline, find

521
00:25:21.680 --> 00:25:25.079
<v Speaker 2>a performance spike, and drill down. The profiler will often

522
00:25:25.119 --> 00:25:28.000
<v Speaker 2>list rendering tasks and you can see which materials and

523
00:25:28.079 --> 00:25:30.920
<v Speaker 2>therefore which shaders are taking up the most GPU time.

524
00:25:31.359 --> 00:25:32.720
<v Speaker 2>It's essential for optimization.

525
00:25:32.880 --> 00:25:36.000
<v Speaker 1>Okay, essential tool. Now what if you want to change

526
00:25:36.000 --> 00:25:38.839
<v Speaker 1>the look of the entire game, like add a film

527
00:25:38.880 --> 00:25:44.279
<v Speaker 1>grain effect or adjust overall contrast without editing hundreds of materials.

528
00:25:44.519 --> 00:25:47.759
<v Speaker 2>That's where screen effects or post processing effects are used.

529
00:25:48.119 --> 00:25:51.880
<v Speaker 2>They're incredibly powerful for applying a final artistic touch to

530
00:25:51.920 --> 00:25:52.680
<v Speaker 2>the whole scene.

531
00:25:52.720 --> 00:25:54.519
<v Speaker 1>How do they work? Do they use? Grab pass?

532
00:25:54.759 --> 00:25:58.319
<v Speaker 2>Conceptually similar, but usually more optimized. The typical flow is

533
00:25:58.720 --> 00:26:02.200
<v Speaker 2>Unity renders your entire normally. Instead of drawing it directly

534
00:26:02.240 --> 00:26:04.759
<v Speaker 2>to the screen, it draws it into an off screen

535
00:26:04.839 --> 00:26:07.200
<v Speaker 2>buffer called a render texture.

536
00:26:06.880 --> 00:26:08.960
<v Speaker 1>Like an image of the final frame exactly.

537
00:26:09.400 --> 00:26:12.480
<v Speaker 2>Then a special camera with a post processing shader attached

538
00:26:12.680 --> 00:26:16.039
<v Speaker 2>simply draws a full screen quad a plat rectangle using

539
00:26:16.039 --> 00:26:19.079
<v Speaker 2>that render texture as its input. The shader on this

540
00:26:19.200 --> 00:26:21.920
<v Speaker 2>quad can then modify every single pixel of the final

541
00:26:21.960 --> 00:26:23.200
<v Speaker 2>image before it's shown to you.

542
00:26:23.480 --> 00:26:25.720
<v Speaker 1>Ah, so it's like applying a Photoshop filter to the

543
00:26:25.720 --> 00:26:26.759
<v Speaker 1>whole game image.

544
00:26:26.839 --> 00:26:31.160
<v Speaker 2>That's a perfect analogy. You can do brightness, saturation, contrast

545
00:26:31.160 --> 00:26:35.400
<v Speaker 2>adjustments using formulas involving luminance. You can tint the image,

546
00:26:35.400 --> 00:26:39.319
<v Speaker 2>apply Vignett's film grain distortions. Anything you can code in

547
00:26:39.359 --> 00:26:41.400
<v Speaker 2>a shader you can apply to the entire screen.

548
00:26:41.519 --> 00:26:44.119
<v Speaker 1>Can you blend images to like overlaying textures.

549
00:26:44.319 --> 00:26:47.240
<v Speaker 2>Yep. You can sample other textures in your post processing

550
00:26:47.279 --> 00:26:50.039
<v Speaker 2>shader and blend them with the scenes render texture using

551
00:26:50.039 --> 00:26:54.240
<v Speaker 2>standard blend modes. Multiply for darkening, ad or screen for brightening,

552
00:26:54.640 --> 00:26:59.400
<v Speaker 2>overlay for complex contrast. Tons of possibilities for achieving specific

553
00:26:59.480 --> 00:27:00.000
<v Speaker 2>moods and stuff.

554
00:27:00.720 --> 00:27:04.920
<v Speaker 1>So these screen effects are huge for immersion and cinematic feel.

555
00:27:05.480 --> 00:27:06.839
<v Speaker 1>What are some classic examples?

556
00:27:06.880 --> 00:27:08.960
<v Speaker 2>Oh loads, an old movie effect is great when you

557
00:27:09.039 --> 00:27:12.039
<v Speaker 2>combine several things, maybe a CPA tone filter to make

558
00:27:12.039 --> 00:27:14.759
<v Speaker 2>it brownish, a vignette to darken the corners, maybe some

559
00:27:14.839 --> 00:27:18.000
<v Speaker 2>noise or film grain, and then overlay animated dust and

560
00:27:18.039 --> 00:27:22.079
<v Speaker 2>scratches textures using time since time perhaps and random offsets

561
00:27:22.119 --> 00:27:24.799
<v Speaker 2>to make them flicker and shift instantly. Gives that vintage vibe.

562
00:27:24.880 --> 00:27:27.000
<v Speaker 1>Yeah, I can picture that. What about something like night vision?

563
00:27:27.240 --> 00:27:31.440
<v Speaker 2>Another classic usually involves tinting the whole screen green, maybe

564
00:27:31.440 --> 00:27:35.880
<v Speaker 2>boosting brightness or contrast in a nonlinear way, adding scan lines,

565
00:27:36.319 --> 00:27:40.319
<v Speaker 2>thin horizontal dark lines, some static noise, maybe barel distortion

566
00:27:40.519 --> 00:27:43.359
<v Speaker 2>like looking through a lens, and perhaps limiting the color palette.

567
00:27:43.359 --> 00:27:45.960
<v Speaker 2>Put it all together and you get that familiar military

568
00:27:46.079 --> 00:27:49.119
<v Speaker 2>or sci fi night vision look. These effects really sell

569
00:27:49.160 --> 00:27:52.400
<v Speaker 2>the feeling of looking through a specific device or being

570
00:27:52.480 --> 00:27:53.519
<v Speaker 2>in a particular state.

571
00:27:53.880 --> 00:27:57.640
<v Speaker 1>Totally changes the experience. Okay, we're getting into advanced territory

572
00:27:58.039 --> 00:28:00.559
<v Speaker 1>for developers writing lots of shaders. Is there a way

573
00:28:00.559 --> 00:28:02.759
<v Speaker 1>to make things more modular reusable?

574
00:28:02.799 --> 00:28:07.920
<v Speaker 2>Get? Yes, definitely. Unity uses cg include files dot CGC

575
00:28:08.279 --> 00:28:10.759
<v Speaker 2>extensively itself, and you can create your own.

576
00:28:10.599 --> 00:28:13.640
<v Speaker 1>Cg include like header files and c plus plus.

577
00:28:13.240 --> 00:28:15.680
<v Speaker 2>Exactly like that. You put common functions, maybe your custom

578
00:28:15.759 --> 00:28:19.920
<v Speaker 2>lighting calculations, helper functions for noise, complex math routines into

579
00:28:19.920 --> 00:28:22.640
<v Speaker 2>a dot c gene file. Then in your main shader

580
00:28:22.680 --> 00:28:24.759
<v Speaker 2>files you just hashtag include that file.

581
00:28:24.759 --> 00:28:28.160
<v Speaker 1>And you can reuse that code across many shaders YEP.

582
00:28:28.599 --> 00:28:32.160
<v Speaker 2>It keeps your main shader files cleaner, easier read, and

583
00:28:32.240 --> 00:28:35.000
<v Speaker 2>makes maintenance way simpler. If you need to fix a

584
00:28:35.000 --> 00:28:37.599
<v Speaker 2>bug or improve a function in your include file, you

585
00:28:37.680 --> 00:28:40.640
<v Speaker 2>fix it once and all the shaders using it benefit.

586
00:28:41.319 --> 00:28:44.319
<v Speaker 2>It's standard practice for any non trivial shader development.

587
00:28:44.640 --> 00:28:50.160
<v Speaker 1>Smart Now, for something really complex, visually realistic fur or grass,

588
00:28:50.720 --> 00:28:54.480
<v Speaker 1>how is that usually done? It seems impossible with just textures.

589
00:28:54.119 --> 00:28:56.960
<v Speaker 2>It's tricky. One well known technique mentioned in the book

590
00:28:57.240 --> 00:28:59.799
<v Speaker 2>is Lenk Eel's concentric fur shell technique.

591
00:29:00.119 --> 00:29:01.799
<v Speaker 1>Technique sounds layered.

592
00:29:01.960 --> 00:29:05.000
<v Speaker 2>It is, instead of trying to draw millions of individual hairs,

593
00:29:05.000 --> 00:29:08.480
<v Speaker 2>which would destroy performance, you draw the base model multiple times,

594
00:29:08.720 --> 00:29:10.119
<v Speaker 2>slightly enlarged each time.

595
00:29:10.279 --> 00:29:12.039
<v Speaker 1>The same model just scaled up a bit.

596
00:29:12.160 --> 00:29:15.799
<v Speaker 2>Yeah, usually pushed out along the vertex normals. Each shell

597
00:29:16.039 --> 00:29:19.279
<v Speaker 2>or layer uses a special testure that has transparency, often

598
00:29:19.319 --> 00:29:22.720
<v Speaker 2>combined with noise to simulate clumps of hair. The outermost

599
00:29:22.720 --> 00:29:25.160
<v Speaker 2>shell is the most transparent, the inner one's less.

600
00:29:24.920 --> 00:29:26.720
<v Speaker 1>So, so the layers build up to look like.

601
00:29:26.680 --> 00:29:30.880
<v Speaker 2>Dense fur exactly when viewed together. These multiple semi transparent

602
00:29:30.960 --> 00:29:34.000
<v Speaker 2>layers create the illusion of volume and density. You can

603
00:29:34.079 --> 00:29:37.319
<v Speaker 2>even incorporate things like gravity, making the hairs droop slightly,

604
00:29:37.720 --> 00:29:41.279
<v Speaker 2>or view direction effects. It's quite clever, but drawing the

605
00:29:41.279 --> 00:29:44.079
<v Speaker 2>model multiple times can be expensive, so it needs careful tuning.

606
00:29:44.440 --> 00:29:47.000
<v Speaker 2>Works for grass too, or other fuzzy surfaces.

607
00:29:47.160 --> 00:29:52.519
<v Speaker 1>Fascinating technique. Okay, one last advanced topic using a Raisin shaders.

608
00:29:53.039 --> 00:29:56.480
<v Speaker 1>The book mentions heat maps. Can you actually pass array

609
00:29:56.559 --> 00:29:58.720
<v Speaker 1>data from C sharp to a shader easily?

610
00:29:59.400 --> 00:30:01.920
<v Speaker 2>Directly? Passing a C sharp array with a single function

611
00:30:02.039 --> 00:30:04.640
<v Speaker 2>call can be a bit awkward or limited in some

612
00:30:04.799 --> 00:30:08.359
<v Speaker 2>Unity versions pipelines, though there are ways, like compute buffers.

613
00:30:08.359 --> 00:30:11.440
<v Speaker 2>Now often you might pass array data element by element

614
00:30:11.559 --> 00:30:14.640
<v Speaker 2>using multiple set float or set vector calls, or encode

615
00:30:14.680 --> 00:30:17.039
<v Speaker 2>the data into a texture. But once the data is

616
00:30:17.079 --> 00:30:19.359
<v Speaker 2>in the shader, seashee droop itself can work with a

617
00:30:19.440 --> 00:30:21.119
<v Speaker 2>rays declared within the shader code.

618
00:30:21.279 --> 00:30:23.640
<v Speaker 1>So for a heat map, how would that work?

619
00:30:24.200 --> 00:30:26.200
<v Speaker 2>Imagine you want to show hot spots on a terrain map.

620
00:30:26.559 --> 00:30:29.200
<v Speaker 2>You could pass the position and intensity the heat of

621
00:30:29.240 --> 00:30:31.400
<v Speaker 2>several hot spots to the shader. Let's say you pass

622
00:30:31.440 --> 00:30:34.599
<v Speaker 2>ten hot spot positions and ten intensity values inside the

623
00:30:34.640 --> 00:30:37.680
<v Speaker 2>fragment shader for every pixel on the terrain, you would

624
00:30:37.680 --> 00:30:40.440
<v Speaker 2>loop through that array of ten hot spots. For each

625
00:30:40.480 --> 00:30:43.680
<v Speaker 2>hotspot you calculate its distance to the current pixel and

626
00:30:43.759 --> 00:30:46.200
<v Speaker 2>figure out how much heat it contributes. Based on that

627
00:30:46.279 --> 00:30:48.119
<v Speaker 2>distance and its intensity.

628
00:30:47.720 --> 00:30:49.559
<v Speaker 1>Summing up the heat from all nearby.

629
00:30:49.240 --> 00:30:53.240
<v Speaker 2>Hotspots exactly, you accumulate the total heat value for that pixel.

630
00:30:53.920 --> 00:30:56.680
<v Speaker 2>Then you use that final heat value to look up

631
00:30:56.720 --> 00:31:00.839
<v Speaker 2>a color on a gradient texture, a ramp map, maybe

632
00:31:00.880 --> 00:31:03.079
<v Speaker 2>going from blue cold to red.

633
00:31:02.920 --> 00:31:05.119
<v Speaker 1>Hot, and that colors the terrain pixel.

634
00:31:05.240 --> 00:31:07.880
<v Speaker 2>Yep, it creates a visual overlay showing the heat distribution.

635
00:31:08.680 --> 00:31:11.440
<v Speaker 2>The main challenge here, as the book points out, is performance.

636
00:31:11.759 --> 00:31:14.640
<v Speaker 2>Looping through say fifty or one hundred points for every

637
00:31:14.640 --> 00:31:18.240
<v Speaker 2>single pixel on the screen can get very slow, very quickly,

638
00:31:18.319 --> 00:31:21.200
<v Speaker 2>so it requires careful optimization or limiting the number of

639
00:31:21.240 --> 00:31:22.319
<v Speaker 2>influential points.

640
00:31:22.039 --> 00:31:24.440
<v Speaker 1>Per pixel right That per pixel cost adds.

641
00:31:24.240 --> 00:31:25.720
<v Speaker 2>Up fast, hugely fast.

642
00:31:25.759 --> 00:31:28.079
<v Speaker 1>Wow, what a journey. We've really covered a lot from

643
00:31:28.079 --> 00:31:32.200
<v Speaker 1>the absolute basics of what a shader even is through textures, lighting,

644
00:31:32.240 --> 00:31:36.359
<v Speaker 1>the PBR revolution, deforming geometry with vertex shaders, screen wide

645
00:31:36.359 --> 00:31:39.920
<v Speaker 1>effects optimization. It's incredibly deep, it really is.

646
00:31:40.400 --> 00:31:43.480
<v Speaker 2>We've seen how shads are. This amazing blend of technical

647
00:31:43.519 --> 00:31:47.400
<v Speaker 2>programming and artistry. They give developers the tools to define

648
00:31:47.440 --> 00:31:53.000
<v Speaker 2>virtually any look imaginable, from hyperrealism to completely stylized visuals.

649
00:31:52.559 --> 00:31:55.839
<v Speaker 1>And hopefully you listening now have a much deeper appreciation

650
00:31:55.920 --> 00:31:58.079
<v Speaker 1>for what's going on under the hood. When you see

651
00:31:58.079 --> 00:32:00.960
<v Speaker 1>those incredible visuals and games, you know how they craft

652
00:32:01.000 --> 00:32:03.599
<v Speaker 1>that perfect metal sheen, or the look of rough stone,

653
00:32:03.720 --> 00:32:05.880
<v Speaker 1>or even that stylized old film effect.

654
00:32:06.359 --> 00:32:09.640
<v Speaker 2>It's a powerful toolkit enabling so much of the visual,

655
00:32:09.720 --> 00:32:11.640
<v Speaker 2>storytelling and atmosphere we experience.

656
00:32:11.920 --> 00:32:14.440
<v Speaker 1>So here's a final thought for you. Next time you're

657
00:32:14.440 --> 00:32:17.000
<v Speaker 1>playing game, really look at the surfaces. Try to guess

658
00:32:17.000 --> 00:32:20.079
<v Speaker 1>what's going on. Can you spot the telltale signs of

659
00:32:20.119 --> 00:32:23.160
<v Speaker 1>normal mapping adding detail. Can you see how the speculator

660
00:32:23.200 --> 00:32:26.480
<v Speaker 1>highlights change as you move? Could that cool water distortion

661
00:32:26.640 --> 00:32:29.279
<v Speaker 1>be a grab pass? Is that enemy dissolving using a

662
00:32:29.279 --> 00:32:31.119
<v Speaker 1>clip function driven by noise?

663
00:32:31.319 --> 00:32:35.279
<v Speaker 2>Yes? Start dissecting the visuals and maybe even think what

664
00:32:35.400 --> 00:32:38.799
<v Speaker 2>kind of cool effects could you imagine creating. Now knowing

665
00:32:38.839 --> 00:32:39.599
<v Speaker 2>how these pieces

666
00:32:39.599 --> 00:32:43.440
<v Speaker 1>Fit together, the possibilities with shaders really do feel limitless.
