46 lines
2.9 KiB
Plaintext
46 lines
2.9 KiB
Plaintext
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Adding Normal Maps to the Pipeline" vod_platform=youtube id=oww19zUryVg annotator=dspecht annotator=Miblo]
|
|
[2:17][Recap yesterday and plan for today]
|
|
[2:55][Blackboard: Normal maps]
|
|
[5:28][Blackboard: The importance of Normal]
|
|
[6:54][Blackboard: What we need in order to compute lighting based on this Normal]
|
|
[8:27][Blackboard: Where the Normal map fits into the equation]
|
|
[12:11][Blackboard: Description of the surface]
|
|
[14:32][Blackboard: Description of the light]
|
|
[16:58][Blackboard: Casey's proposal]
|
|
[21:52][Blackboard: Blurring based on the surface description]
|
|
[25:28][Introduce the concept of a NormalMap]
|
|
[26:54][Blackboard: Normals have to be Normal]
|
|
[29:21][Introduce Unpack4x8 and unpack the Texels]
|
|
[31:20][Similarly unpack the Normals]
|
|
[32:16][Blackboard: We often bake the description of the surface into the Normal map]
|
|
[33:11][Lerp the Normals]
|
|
[33:55][Introduce environment_map]
|
|
[37:22][Set tEnvMap from Normal.Z]
|
|
[39:02][Blackboard: We might want to switch nearer to 0.25]
|
|
[39:45][Setup the environment_map lookups]
|
|
[44:16][Create ScreenSpaceUV]
|
|
[46:10][Pass that ScreenSpaceUV to SampleEnvironmentMap]
|
|
[46:50][Check if there is a NormalMap]
|
|
[47:13][Pre-light the Texel]
|
|
[47:53][We haven't talked too much about how you compute lighting equations, per se]
|
|
[48:32][Take SampleEnvironmentMap and return the Normal for now]
|
|
[51:19][Plumbing]
|
|
[53:34][Check it out in-game and generate a NormalMap to play with]
|
|
[54:48][Blackboard: The NormalMap that we're going to create]
|
|
[55:21][Implement MakeSphereNormalMap]
|
|
[58:18][Blackboard: Think this through a little more]
|
|
[59:24][Throw in a Normal.z calculation for now and finish MakeSphereNormalMap]
|
|
[1:02:43][Add Normalize to handmade_math.h]
|
|
[1:03:49][Compile and see it in-game]
|
|
[1:04:18][Q&A][:speech]
|
|
[1:05:02][@dsjimenez][Your 2D art already seems to have some shading. Will that just represent ambient lighting when mixed with this dynamic lighting you're trying to do?]
|
|
[1:05:57][@miblo][In MakeSphereNormalMap, should 'Y < Bitmap->Width;' be 'Y < Bitmap->Height;'?]
|
|
[1:06:15][@tenbroya][How far do you think you can increase the capabilities of an engine like this before you start to suffer from performance constraints due to using only the CPU (vs GPU)?]
|
|
[1:07:57][@stelar7][Don't you need to SRBGToLinear1 the normals or use the normals instead of the texel in the lerp?]
|
|
[1:09:44][@pseudonym73][Normal.z = Sqrt(1.0f - Normal.x*Normal.x - Normal.y*Normal.y);]
|
|
[1:12:05][@timbertoes][Is your lighting lookup a similar technique to MatCaps used in other software?]
|
|
[1:12:20][@lukeultra][What benefits do you see from using the extra time it takes to create your own engine from scratch? Is it worth it in your opinion?]
|
|
[1:12:35][@pseudonym73][The catch is that it's going to take the Sqrt of a negative number if you're outside the sphere]
|
|
[1:14:03][We have come to the end of the questions][:speech]
|
|
[/video]
|