Handmade Hero»Episode Guide
Basic Multigrid Lighting Upward Iteration
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:03Recap and set the stage for the day
0:03Recap and set the stage for the day
0:03Recap and set the stage for the day
0:54"You can't win 'em all but you're certainly not gonna win if you never roll"α
0:54"You can't win 'em all but you're certainly not gonna win if you never roll"α
0:54"You can't win 'em all but you're certainly not gonna win if you never roll"α
0:59Run the game to see where we're at with respect to lighting
0:59Run the game to see where we're at with respect to lighting
0:59Run the game to see where we're at with respect to lighting
4:13A few words on multigrid solvers
4:13A few words on multigrid solvers
4:13A few words on multigrid solvers
6:54The two halves of our problem: 1) Getting our lighting information down to the renderer
6:54The two halves of our problem: 1) Getting our lighting information down to the renderer
6:54The two halves of our problem: 1) Getting our lighting information down to the renderer
9:222) We will need normals
9:222) We will need normals
9:222) We will need normals
9:59handmade_opengl.h: Rename WriteEmit to WriteEmitFramebuffer in the light_buffer struct, and describe the framebuffers in this struct
9:59handmade_opengl.h: Rename WriteEmit to WriteEmitFramebuffer in the light_buffer struct, and describe the framebuffers in this struct
9:59handmade_opengl.h: Rename WriteEmit to WriteEmitFramebuffer in the light_buffer struct, and describe the framebuffers in this struct
14:33Blackboard: On the possible need for an additional texture to write into
14:33Blackboard: On the possible need for an additional texture to write into
14:33Blackboard: On the possible need for an additional texture to write into
20:06handmade_opengl.cpp: Toggle on the framebuffer visualisation code in OpenGLRenderCommands()
20:06handmade_opengl.cpp: Toggle on the framebuffer visualisation code in OpenGLRenderCommands()
20:06handmade_opengl.cpp: Toggle on the framebuffer visualisation code in OpenGLRenderCommands()
22:50Research glReadBuffer1
22:50Research glReadBuffer1
22:50Research glReadBuffer1
24:27handmade_opengl.cpp: Enable the framebuffer visualisation code to pick from a colour buffer
24:27handmade_opengl.cpp: Enable the framebuffer visualisation code to pick from a colour buffer
24:27handmade_opengl.cpp: Enable the framebuffer visualisation code to pick from a colour buffer
27:30Run the game a get a black screen
27:30Run the game a get a black screen
27:30Run the game a get a black screen
27:58handmade_opengl.cpp: Introduce FakeSeedLighting() and ComputeLightTransport()
27:58handmade_opengl.cpp: Introduce FakeSeedLighting() and ComputeLightTransport()
27:58handmade_opengl.cpp: Introduce FakeSeedLighting() and ComputeLightTransport()
30:17"I assume it's "hare-brained", like the rabbit. Or is it "hair-brained", like the follicle?"β
30:17"I assume it's "hare-brained", like the rabbit. Or is it "hair-brained", like the follicle?"β
30:17"I assume it's "hare-brained", like the rabbit. Or is it "hair-brained", like the follicle?"β
30:29handmade_opengl.cpp: Implement FakeSeedLighting() and introduce OpenGLBeginScreenFill() and OpenGLEndScreenFill() to perform some of ResolveMultisample()
30:29handmade_opengl.cpp: Implement FakeSeedLighting() and introduce OpenGLBeginScreenFill() and OpenGLEndScreenFill() to perform some of ResolveMultisample()
30:29handmade_opengl.cpp: Implement FakeSeedLighting() and introduce OpenGLBeginScreenFill() and OpenGLEndScreenFill() to perform some of ResolveMultisample()
35:06Run the game to make sure that that still works
35:06Run the game to make sure that that still works
35:06Run the game to make sure that that still works
35:23handmade_opengl.cpp: Finish implementing FakeSeedLighting()
35:23handmade_opengl.cpp: Finish implementing FakeSeedLighting()
35:23handmade_opengl.cpp: Finish implementing FakeSeedLighting()
37:12handmade_opengl.cpp: Introduce CompileFakeSeedLighting() based on CompileResolveMultisample(), with some structured artwork
37:12handmade_opengl.cpp: Introduce CompileFakeSeedLighting() based on CompileResolveMultisample(), with some structured artwork
37:12handmade_opengl.cpp: Introduce CompileFakeSeedLighting() based on CompileResolveMultisample(), with some structured artwork
41:12handmade_opengl.h: Introduce fake_seed_lighting_program struct and add it to open_gl
41:12handmade_opengl.h: Introduce fake_seed_lighting_program struct and add it to open_gl
41:12handmade_opengl.h: Introduce fake_seed_lighting_program struct and add it to open_gl
42:14handmade_opengl.cpp: Introduce a version of UseProgramBegin() that only takes a Prog and Setup, and enable OpenGLRenderCommands() to set up the debug lighting framebuffer
42:14handmade_opengl.cpp: Introduce a version of UseProgramBegin() that only takes a Prog and Setup, and enable OpenGLRenderCommands() to set up the debug lighting framebuffer
42:14handmade_opengl.cpp: Introduce a version of UseProgramBegin() that only takes a Prog and Setup, and enable OpenGLRenderCommands() to set up the debug lighting framebuffer
44:30Run the game to see a green screen, and investigate why we do
44:30Run the game to see a green screen, and investigate why we do
44:30Run the game to see a green screen, and investigate why we do
45:45Consult the Quick Reference Card2 and the OpenGL Spec3 to determine how to line up the output fragments with the framebuffer's bound colour attachments
45:45Consult the Quick Reference Card2 and the OpenGL Spec3 to determine how to line up the output fragments with the framebuffer's bound colour attachments
45:45Consult the Quick Reference Card2 and the OpenGL Spec3 to determine how to line up the output fragments with the framebuffer's bound colour attachments
50:23handmade_opengl.cpp: Specify the fragments into which CompileFakeSeedLighting() should write our test colours
50:23handmade_opengl.cpp: Specify the fragments into which CompileFakeSeedLighting() should write our test colours
50:23handmade_opengl.cpp: Specify the fragments into which CompileFakeSeedLighting() should write our test colours
51:18Run the game to see that that worked
51:18Run the game to see that that worked
51:18Run the game to see that that worked
51:21handmade_platform.h: Add DebugLightBufferIndex and DebugLightBufferTexIndex to game_render_settings
51:21handmade_platform.h: Add DebugLightBufferIndex and DebugLightBufferTexIndex to game_render_settings
51:21handmade_platform.h: Add DebugLightBufferIndex and DebugLightBufferTexIndex to game_render_settings
54:50Determine to provide debug keys to control the lighting framebuffers
54:50Determine to provide debug keys to control the lighting framebuffers
54:50Determine to provide debug keys to control the lighting framebuffers
56:22handmade_opengl.h: Move the DebugLightBuffer settings into open_gl
56:22handmade_opengl.h: Move the DebugLightBuffer settings into open_gl
56:22handmade_opengl.h: Move the DebugLightBuffer settings into open_gl
56:50win32_handmade.cpp: Add debug keys in Win32ProcessPendingMessage() for cycling through the lighting framebuffers
56:50win32_handmade.cpp: Add debug keys in Win32ProcessPendingMessage() for cycling through the lighting framebuffers
56:50win32_handmade.cpp: Add debug keys in Win32ProcessPendingMessage() for cycling through the lighting framebuffers
58:10Note the "Sign extension bug" issue4
58:10Note the "Sign extension bug" issue4
58:10Note the "Sign extension bug" issue4
58:45win32_handmade.cpp: Continue adding these debug keys in Win32ProcessPendingMessage()5
58:45win32_handmade.cpp: Continue adding these debug keys in Win32ProcessPendingMessage()5
58:45win32_handmade.cpp: Continue adding these debug keys in Win32ProcessPendingMessage()5
1:00:54handmade_opengl.cpp: Make OpenGLRenderCommands() keep our framebuffer indices in bounds
1:00:54handmade_opengl.cpp: Make OpenGLRenderCommands() keep our framebuffer indices in bounds
1:00:54handmade_opengl.cpp: Make OpenGLRenderCommands() keep our framebuffer indices in bounds
1:02:58handmade_math.h: Introduce a version of Clamp() that works on s32s
1:02:58handmade_math.h: Introduce a version of Clamp() that works on s32s
1:02:58handmade_math.h: Introduce a version of Clamp() that works on s32s
1:03:32win32_handmade.cpp: Tweak those bindings in Win32ProcessPendingMessage()
1:03:32win32_handmade.cpp: Tweak those bindings in Win32ProcessPendingMessage()
1:03:32win32_handmade.cpp: Tweak those bindings in Win32ProcessPendingMessage()
1:04:20Run the game to try cycling through the framebuffers, and investigate why nothing happens
1:04:20Run the game to try cycling through the framebuffers, and investigate why nothing happens
1:04:20Run the game to try cycling through the framebuffers, and investigate why nothing happens
1:05:39win32_handmade.cpp: Change Win32ProcessPendingMessage() to use 0 and 9
1:05:39win32_handmade.cpp: Change Win32ProcessPendingMessage() to use 0 and 9
1:05:39win32_handmade.cpp: Change Win32ProcessPendingMessage() to use 0 and 9
1:06:47Run the game to see that 0 and 9 do work
1:06:47Run the game to see that 0 and 9 do work
1:06:47Run the game to see that 0 and 9 do work
1:07:12Investigate which VK_ keys are available to us
1:07:12Investigate which VK_ keys are available to us
1:07:12Investigate which VK_ keys are available to us
1:10:06win32_handmade.cpp: Make Win32ProcessPendingMessage() use VK_OEM_PLUS and VK_OEM_MINUS
1:10:06win32_handmade.cpp: Make Win32ProcessPendingMessage() use VK_OEM_PLUS and VK_OEM_MINUS
1:10:06win32_handmade.cpp: Make Win32ProcessPendingMessage() use VK_OEM_PLUS and VK_OEM_MINUS
1:10:46Run the game to try out our key bindings, and investigate why we can't cycle between the textures
1:10:46Run the game to try out our key bindings, and investigate why we can't cycle between the textures
1:10:46Run the game to try out our key bindings, and investigate why we can't cycle between the textures
1:12:29handmade_opengl.cpp: Double-check CompileFinalStretch()
1:12:29handmade_opengl.cpp: Double-check CompileFinalStretch()
1:12:29handmade_opengl.cpp: Double-check CompileFinalStretch()
1:13:05Consult the documentation on Framebuffer6
1:13:05Consult the documentation on Framebuffer6
1:13:05Consult the documentation on Framebuffer6
1:15:00handmade_opengl.cpp: Make OpenGLChangeToSettings() specify the mapping table and call glDrawBuffers() for both framebuffers7,8
1:15:00handmade_opengl.cpp: Make OpenGLChangeToSettings() specify the mapping table and call glDrawBuffers() for both framebuffers7,8
1:15:00handmade_opengl.cpp: Make OpenGLChangeToSettings() specify the mapping table and call glDrawBuffers() for both framebuffers7,8
1:17:52Run the game and cycle between our texture
1:17:52Run the game and cycle between our texture
1:17:52Run the game and cycle between our texture
1:18:30win32_handmade.cpp: Enable Win32ProcessPendingMessage() to print out debug text for the keyboard input
1:18:30win32_handmade.cpp: Enable Win32ProcessPendingMessage() to print out debug text for the keyboard input
1:18:30win32_handmade.cpp: Enable Win32ProcessPendingMessage() to print out debug text for the keyboard input
1:20:26Run the game and inspect that output
1:20:26Run the game and inspect that output
1:20:26Run the game and inspect that output
1:21:05win32_handmade.cpp: Fix Win32ProcessPendingMessage() to only handle the lighting keys in the IsDown path
1:21:05win32_handmade.cpp: Fix Win32ProcessPendingMessage() to only handle the lighting keys in the IsDown path
1:21:05win32_handmade.cpp: Fix Win32ProcessPendingMessage() to only handle the lighting keys in the IsDown path
1:22:05Run the game to see that this is more stable
1:22:05Run the game to see that this is more stable
1:22:05Run the game to see that this is more stable
1:22:25handmade_opengl.cpp: Try to make CompileFakeSeedLighting() use vec3 textures
1:22:25handmade_opengl.cpp: Try to make CompileFakeSeedLighting() use vec3 textures
1:22:25handmade_opengl.cpp: Try to make CompileFakeSeedLighting() use vec3 textures
1:24:15Run the game to see that that seems to work
1:24:15Run the game to see that that seems to work
1:24:15Run the game to see that that seems to work
1:25:02handmade_opengl.cpp: Enable CompileFakeSeedLighting() to light the scene with an emitter that is red on the left and green on the right
1:25:02handmade_opengl.cpp: Enable CompileFakeSeedLighting() to light the scene with an emitter that is red on the left and green on the right
1:25:02handmade_opengl.cpp: Enable CompileFakeSeedLighting() to light the scene with an emitter that is red on the left and green on the right
1:36:01handmade_opengl.cpp: Make CompileFakeSeedLighting() use a v4 for the output gl_FragData
1:36:01handmade_opengl.cpp: Make CompileFakeSeedLighting() use a v4 for the output gl_FragData
1:36:01handmade_opengl.cpp: Make CompileFakeSeedLighting() use a v4 for the output gl_FragData
1:36:23Run the game, see nothing and investigate why
1:36:23Run the game, see nothing and investigate why
1:36:23Run the game, see nothing and investigate why
1:39:09handmade_opengl.cpp: Force CompileFakeSeedLighting() to draw a red blob
1:39:09handmade_opengl.cpp: Force CompileFakeSeedLighting() to draw a red blob
1:39:09handmade_opengl.cpp: Force CompileFakeSeedLighting() to draw a red blob
1:40:57Run the game, see a 10 pixel blob in the corner of the screen and investigate why
1:40:57Run the game, see a 10 pixel blob in the corner of the screen and investigate why
1:40:57Run the game, see a 10 pixel blob in the corner of the screen and investigate why
1:43:05Realise that we're rendering at 960*540
1:43:05Realise that we're rendering at 960*540
1:43:05Realise that we're rendering at 960*540
1:43:25handmade_opengl.cpp: Make CompileFakeSeedLighting() centre the light and slow down its movement
1:43:25handmade_opengl.cpp: Make CompileFakeSeedLighting() centre the light and slow down its movement
1:43:25handmade_opengl.cpp: Make CompileFakeSeedLighting() centre the light and slow down its movement
1:44:43Run the game and try moving the light
1:44:43Run the game and try moving the light
1:44:43Run the game and try moving the light
1:45:16handmade_opengl.cpp: Implement the upward phase of ComputeLightTransport(), building successively less detailed light buffers
1:45:16handmade_opengl.cpp: Implement the upward phase of ComputeLightTransport(), building successively less detailed light buffers
1:45:16handmade_opengl.cpp: Implement the upward phase of ComputeLightTransport(), building successively less detailed light buffers
1:50:39handmade_opengl.cpp: Introduce OpenGLBindTex() for ComputeLightTransport() to call
1:50:39handmade_opengl.cpp: Introduce OpenGLBindTex() for ComputeLightTransport() to call
1:50:39handmade_opengl.cpp: Introduce OpenGLBindTex() for ComputeLightTransport() to call
1:53:49handmade_opengl.cpp: Introduce CompileMultiLightUp() based on CompileFinalStretch()
1:53:49handmade_opengl.cpp: Introduce CompileMultiLightUp() based on CompileFinalStretch()
1:53:49handmade_opengl.cpp: Introduce CompileMultiLightUp() based on CompileFinalStretch()
2:03:01handmade_opengl.cpp: Introduce a blank CompileMultiLightDown() and fix compile errors
2:03:01handmade_opengl.cpp: Introduce a blank CompileMultiLightDown() and fix compile errors
2:03:01handmade_opengl.cpp: Introduce a blank CompileMultiLightDown() and fix compile errors
2:05:41Run the game to see that one of our lower detail textures is black, and investigate why
2:05:41Run the game to see that one of our lower detail textures is black, and investigate why
2:05:41Run the game to see that one of our lower detail textures is black, and investigate why
2:10:03handmade_opengl.cpp: Try to make ComputeLightTransport() use the FakeSeedLighting() program at every level
2:10:03handmade_opengl.cpp: Try to make ComputeLightTransport() use the FakeSeedLighting() program at every level
2:10:03handmade_opengl.cpp: Try to make ComputeLightTransport() use the FakeSeedLighting() program at every level
2:10:46Run the game to determine that there's something wrong with CompileMultiLightUp()
2:10:46Run the game to determine that there's something wrong with CompileMultiLightUp()
2:10:46Run the game to determine that there's something wrong with CompileMultiLightUp()
2:11:42handmade_opengl.cpp: Manually set all the values in CompileMultiLightUp()
2:11:42handmade_opengl.cpp: Manually set all the values in CompileMultiLightUp()
2:11:42handmade_opengl.cpp: Manually set all the values in CompileMultiLightUp()
2:12:16Run the game to see no pixels being filled
2:12:16Run the game to see no pixels being filled
2:12:16Run the game to see no pixels being filled
2:12:34handmade_opengl.cpp: Make CompileMultiLightUp() correctly set the input position
2:12:34handmade_opengl.cpp: Make CompileMultiLightUp() correctly set the input position
2:12:34handmade_opengl.cpp: Make CompileMultiLightUp() correctly set the input position
2:12:50Run the game and successfully cycle through the colours
2:12:50Run the game and successfully cycle through the colours
2:12:50Run the game and successfully cycle through the colours
2:13:01handmade_opengl.cpp: Remove the debug code from CompileMultiLightUp()
2:13:01handmade_opengl.cpp: Remove the debug code from CompileMultiLightUp()
2:13:01handmade_opengl.cpp: Remove the debug code from CompileMultiLightUp()
2:13:10Run the game and cycle through the detail levels, but see that texture 1 uses red rather than green, and investigate why
2:13:10Run the game and cycle through the detail levels, but see that texture 1 uses red rather than green, and investigate why
2:13:10Run the game and cycle through the detail levels, but see that texture 1 uses red rather than green, and investigate why
2:17:034bitlightning Additional semicolon in glGetUniformLocal "SourceBackEmitTex;"
🗪
2:17:034bitlightning Additional semicolon in glGetUniformLocal "SourceBackEmitTex;"
🗪
2:17:034bitlightning Additional semicolon in glGetUniformLocal "SourceBackEmitTex;"
🗪
2:17:21handmade_opengl.cpp: Remove spurious semicolon from CompileMultiLightUp()
2:17:21handmade_opengl.cpp: Remove spurious semicolon from CompileMultiLightUp()
2:17:21handmade_opengl.cpp: Remove spurious semicolon from CompileMultiLightUp()
2:17:28Run the game and cycle through all the textures and detail levels
2:17:28Run the game and cycle through all the textures and detail levels
2:17:28Run the game and cycle through all the textures and detail levels
2:17:48Q&A
🗩
2:17:48Q&A
🗩
2:17:48Q&A
🗩
2:19:14fr0styninja Is this going to be pulled out of the final ship to pull aside as DLC content to charge for?
🗪
2:19:14fr0styninja Is this going to be pulled out of the final ship to pull aside as DLC content to charge for?
🗪
2:19:14fr0styninja Is this going to be pulled out of the final ship to pull aside as DLC content to charge for?
🗪
2:19:394bitlightning Ideas for a good IDE-integrated debugger for Linux, like VS and CDB?
🗪
2:19:394bitlightning Ideas for a good IDE-integrated debugger for Linux, like VS and CDB?
🗪
2:19:394bitlightning Ideas for a good IDE-integrated debugger for Linux, like VS and CDB?
🗪
2:21:08d7samurai Could you recap / outline the idea for this lighting scheme?
🗪
2:21:08d7samurai Could you recap / outline the idea for this lighting scheme?
🗪
2:21:08d7samurai Could you recap / outline the idea for this lighting scheme?
🗪
2:22:17zilarrezko Will I be able to pay money for an expansion that crashes every so often?
🗪
2:22:17zilarrezko Will I be able to pay money for an expansion that crashes every so often?
🗪
2:22:17zilarrezko Will I be able to pay money for an expansion that crashes every so often?
🗪
2:22:53hholst80 Is this a single player game or will there be some network / multiplayer features?
🗪
2:22:53hholst80 Is this a single player game or will there be some network / multiplayer features?
🗪
2:22:53hholst80 Is this a single player game or will there be some network / multiplayer features?
🗪
2:24:37Close it down
🗩
2:24:37Close it down
🗩
2:24:37Close it down
🗩