Debugging Missing Lighting
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next timestamp
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 and Index Controls

a
w
s
d
h j k l


Esc Close menu / unfocus timestamp

Quotes and References Menus and Index

Enter Jump to timestamp

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:01Recap and set the stage for the day, with a few words about lighting
🗩
0:01Recap and set the stage for the day, with a few words about lighting
🗩
0:01Recap and set the stage for the day, with a few words about lighting
🗩
3:06Run the game with the intention of showing the lighting
🏃
3:06Run the game with the intention of showing the lighting
🏃
3:06Run the game with the intention of showing the lighting
🏃
5:01Read through the lighting code
📖
5:01Read through the lighting code
📖
5:01Read through the lighting code
📖
8:45Run the game to show that bitmaps aren't lit
🏃
8:45Run the game to show that bitmaps aren't lit
🏃
8:45Run the game to show that bitmaps aren't lit
🏃
9:28Continue to read through the lighting code
📖
9:28Continue to read through the lighting code
📖
9:28Continue to read through the lighting code
📖
15:37Run the game, note that we're not getting any emission and step through the code to determine why
🏃
15:37Run the game, note that we're not getting any emission and step through the code to determine why
🏃
15:37Run the game, note that we're not getting any emission and step through the code to determine why
🏃
20:08Press F4 and see the light
🏃
20:08Press F4 and see the light
🏃
20:08Press F4 and see the light
🏃
22:32Make PlayWorld() set UpdatingLighting to true on startup
22:32Make PlayWorld() set UpdatingLighting to true on startup
22:32Make PlayWorld() set UpdatingLighting to true on startup
23:40Run the game and note the long lighting trails
🏃
23:40Run the game and note the long lighting trails
🏃
23:40Run the game and note the long lighting trails
🏃
24:03Make ComputeLightPropagation() interpolate the lighting across 10 frames
24:03Make ComputeLightPropagation() interpolate the lighting across 10 frames
24:03Make ComputeLightPropagation() interpolate the lighting across 10 frames
24:24Run the game to see more flickery light, yet with a shorter trail
🏃
24:24Run the game to see more flickery light, yet with a shorter trail
🏃
24:24Run the game to see more flickery light, yet with a shorter trail
🏃
24:58Consider what could be happening with the snake's light at corners
🏃
24:58Consider what could be happening with the snake's light at corners
🏃
24:58Consider what could be happening with the snake's light at corners
🏃
28:39Remove all PushLight() calls except for those performed by AddSnakeSegment() for the snake's head
28:39Remove all PushLight() calls except for those performed by AddSnakeSegment() for the snake's head
28:39Remove all PushLight() calls except for those performed by AddSnakeSegment() for the snake's head
29:43Run the game to see that the bug persists with our single light source
🏃
29:43Run the game to see that the bug persists with our single light source
🏃
29:43Run the game to see that the bug persists with our single light source
🏃
30:00Admire the UI of Microsoft Visual Studio
💢
30:00Admire the UI of Microsoft Visual Studio
💢
30:00Admire the UI of Microsoft Visual Studio
💢
30:40Step through PushCube() to inspect the lighting values
🏃
30:40Step through PushCube() to inspect the lighting values
🏃
30:40Step through PushCube() to inspect the lighting values
🏃
33:16Step through ExtractReflectorsFromQuads() to follow the light data down the pipe
🏃
33:16Step through ExtractReflectorsFromQuads() to follow the light data down the pipe
🏃
33:16Step through ExtractReflectorsFromQuads() to follow the light data down the pipe
🏃
38:53Step through OutputLightingTextures() to see if we correctly output all the lights
🏃
38:53Step through OutputLightingTextures() to see if we correctly output all the lights
🏃
38:53Step through OutputLightingTextures() to see if we correctly output all the lights
🏃
41:19Enable CompileZBiasProgram() to colour the light by its assigned index
41:19Enable CompileZBiasProgram() to colour the light by its assigned index
41:19Enable CompileZBiasProgram() to colour the light by its assigned index
43:39Run the game to see that the light indices and positions are coherent
🏃
43:39Run the game to see that the light indices and positions are coherent
🏃
43:39Run the game to see that the light indices and positions are coherent
🏃
45:07Make CompileZBiasProgram() colour the light <= 1033 green and > 1033 red
45:07Make CompileZBiasProgram() colour the light <= 1033 green and > 1033 red
45:07Make CompileZBiasProgram() colour the light <= 1033 green and > 1033 red
45:48Run the game to see a suspicious pattern
🏃
45:48Run the game to see a suspicious pattern
🏃
45:48Run the game to see a suspicious pattern
🏃
47:07Read through ComputeLightPropagation() looking for any biasing
📖
47:07Read through ComputeLightPropagation() looking for any biasing
📖
47:07Read through ComputeLightPropagation() looking for any biasing
📖
50:14Mention the problem inherent in graphics programming to do with misalignment of disparate arrays
🗩
50:14Mention the problem inherent in graphics programming to do with misalignment of disparate arrays
🗩
50:14Mention the problem inherent in graphics programming to do with misalignment of disparate arrays
🗩
51:54Provide a specific break point in ComputeLightPropagation()
51:54Provide a specific break point in ComputeLightPropagation()
51:54Provide a specific break point in ComputeLightPropagation()
54:29Run the game, successfully break on our point and step through the code from there
🏃
54:29Run the game, successfully break on our point and step through the code from there
🏃
54:29Run the game, successfully break on our point and step through the code from there
🏃
57:41Realise that ComputeLightPropagation() is incorrectly setting DestEmit[EmitIndex]
🏃
57:41Realise that ComputeLightPropagation() is incorrectly setting DestEmit[EmitIndex]
🏃
57:41Realise that ComputeLightPropagation() is incorrectly setting DestEmit[EmitIndex]
🏃
58:29Make ComputeLightPropagation() correctly set the DestEmit[EmitIndex]
58:29Make ComputeLightPropagation() correctly set the DestEmit[EmitIndex]
58:29Make ComputeLightPropagation() correctly set the DestEmit[EmitIndex]
59:14Run the game to see that the lighting transmission now works
🏃
59:14Run the game to see that the lighting transmission now works
🏃
59:14Run the game to see that the lighting transmission now works
🏃
59:31Revert everything to semi-normal
59:31Revert everything to semi-normal
59:31Revert everything to semi-normal
59:56Run the game to see the light looking pretty clean
🏃
59:56Run the game to see the light looking pretty clean
🏃
59:56Run the game to see the light looking pretty clean
🏃
1:04:15Make PlayWorld() create two rooms
1:04:15Make PlayWorld() create two rooms
1:04:15Make PlayWorld() create two rooms
1:05:16Run the game to see the slowdown caused by lighting recalculation
🏃
1:05:16Run the game to see the slowdown caused by lighting recalculation
🏃
1:05:16Run the game to see the slowdown caused by lighting recalculation
🏃
1:06:46Make PlayWorld() create four rooms
1:06:46Make PlayWorld() create four rooms
1:06:46Make PlayWorld() create four rooms
1:07:04Run the game to see that slowdown
🏃
1:07:04Run the game to see that slowdown
🏃
1:07:04Run the game to see that slowdown
🏃
1:07:35Make PlayWorld() create bigger rooms
1:07:35Make PlayWorld() create bigger rooms
1:07:35Make PlayWorld() create bigger rooms
1:07:51Run the game to see the slowly recalculating lighting
🏃
1:07:51Run the game to see the slowly recalculating lighting
🏃
1:07:51Run the game to see the slowly recalculating lighting
🏃
1:11:24Make PlayWorld() generate rooms in all directions
1:11:24Make PlayWorld() generate rooms in all directions
1:11:24Make PlayWorld() generate rooms in all directions
1:12:22Run the game and crash
🏃
1:12:22Run the game and crash
🏃
1:12:22Run the game and crash
🏃
1:12:48Double the LIGHT_DATA_WIDTH
1:12:48Double the LIGHT_DATA_WIDTH
1:12:48Double the LIGHT_DATA_WIDTH
1:13:04Run the game and consider the frame rate at different zoom levels, at least initially
🏃
1:13:04Run the game and consider the frame rate at different zoom levels, at least initially
🏃
1:13:04Run the game and consider the frame rate at different zoom levels, at least initially
🏃
1:17:15Run it again and see that PeekMessage starts taking more time later
🏃
1:17:15Run it again and see that PeekMessage starts taking more time later
🏃
1:17:15Run it again and see that PeekMessage starts taking more time later
🏃
1:19:08Read through Win32ProcessPendingMessages()
📖
1:19:08Read through Win32ProcessPendingMessages()
📖
1:19:08Read through Win32ProcessPendingMessages()
📖
1:19:53Run the game, check our memory usage and provide a ton of input to the game to get PeekMessage up to the top of the profiler
🏃
1:19:53Run the game, check our memory usage and provide a ton of input to the game to get PeekMessage up to the top of the profiler
🏃
1:19:53Run the game, check our memory usage and provide a ton of input to the game to get PeekMessage up to the top of the profiler
🏃
1:23:29Step into Win32ProcessPendingMessages() to see how often it gets hit, and realise that Alt-Tabbing away removes PeekMessage from the top spot in the profiler
🏃
1:23:29Step into Win32ProcessPendingMessages() to see how often it gets hit, and realise that Alt-Tabbing away removes PeekMessage from the top spot in the profiler
🏃
1:23:29Step into Win32ProcessPendingMessages() to see how often it gets hit, and realise that Alt-Tabbing away removes PeekMessage from the top spot in the profiler
🏃
1:26:15Read through Win32ProcessPendingMessages()
📖
1:26:15Read through Win32ProcessPendingMessages()
📖
1:26:15Read through Win32ProcessPendingMessages()
📖
1:26:50Run the game and spam PeekMessage with mouse movement
🏃
1:26:50Run the game and spam PeekMessage with mouse movement
🏃
1:26:50Run the game and spam PeekMessage with mouse movement
🏃
1:29:56Put our "PeekMessage" TIMED_BLOCK in Win32ProcessPendingMessages() inside the message loop
1:29:56Put our "PeekMessage" TIMED_BLOCK in Win32ProcessPendingMessages() inside the message loop
1:29:56Put our "PeekMessage" TIMED_BLOCK in Win32ProcessPendingMessages() inside the message loop
1:30:21Run the game and again spam PeekMessage with mouse movement
🏃
1:30:21Run the game and again spam PeekMessage with mouse movement
🏃
1:30:21Run the game and again spam PeekMessage with mouse movement
🏃
1:31:55Return our "PeekMessage" TIMED_BLOCK to where it was and allow Win32ProcessPendingMessages() to handle all messages1
1:31:55Return our "PeekMessage" TIMED_BLOCK to where it was and allow Win32ProcessPendingMessages() to handle all messages1
1:31:55Return our "PeekMessage" TIMED_BLOCK to where it was and allow Win32ProcessPendingMessages() to handle all messages1
1:33:53Run the game, try to spam PeekMessage again and find it not rising to the top of the profiler
🏃
1:33:53Run the game, try to spam PeekMessage again and find it not rising to the top of the profiler
🏃
1:33:53Run the game, try to spam PeekMessage again and find it not rising to the top of the profiler
🏃
1:34:59Determine to try and narrow down the problem in Win32ProcessPendingMessages()
1:34:59Determine to try and narrow down the problem in Win32ProcessPendingMessages()
1:34:59Determine to try and narrow down the problem in Win32ProcessPendingMessages()
1:35:36Run the game and successfully produce that bad case
🏃
💢
1:35:36Run the game and successfully produce that bad case
🏃
💢
1:35:36Run the game and successfully produce that bad case
🏃
💢
1:37:17Prevent Win32ProcessPendingMessages() from skipping WM_PAINT messages
1:37:17Prevent Win32ProcessPendingMessages() from skipping WM_PAINT messages
1:37:17Prevent Win32ProcessPendingMessages() from skipping WM_PAINT messages
1:37:31Run the game and again trigger the bad case
🏃
1:37:31Run the game and again trigger the bad case
🏃
1:37:31Run the game and again trigger the bad case
🏃
1:37:49Prevent Win32ProcessPendingMessages() from skipping WM_MOUSEMOVE messages
1:37:49Prevent Win32ProcessPendingMessages() from skipping WM_MOUSEMOVE messages
1:37:49Prevent Win32ProcessPendingMessages() from skipping WM_MOUSEMOVE messages
1:38:08Run the game and fail to produce the bad case, determining that WM_MOUSEMOVE cannot be skipped
🏃
1:38:08Run the game and fail to produce the bad case, determining that WM_MOUSEMOVE cannot be skipped
🏃
1:38:08Run the game and fail to produce the bad case, determining that WM_MOUSEMOVE cannot be skipped
🏃
1:38:58Note our PeekMessage observations
1:38:58Note our PeekMessage observations
1:38:58Note our PeekMessage observations
1:40:04A few words on the utility of our always-on profiler from the debug system
🗩
1:40:04A few words on the utility of our always-on profiler from the debug system
🗩
1:40:04A few words on the utility of our always-on profiler from the debug system
🗩
1:41:13Wonder why this is happening
1:41:13Wonder why this is happening
1:41:13Wonder why this is happening
1:42:04Run the game and try to trigger lots of WM_PAINT messages
🏃
1:42:04Run the game and try to trigger lots of WM_PAINT messages
🏃
1:42:04Run the game and try to trigger lots of WM_PAINT messages
🏃
1:44:29Prevent Win32ProcessPendingMessages() from skipping WM_PAINT messages
1:44:29Prevent Win32ProcessPendingMessages() from skipping WM_PAINT messages
1:44:29Prevent Win32ProcessPendingMessages() from skipping WM_PAINT messages
1:44:54Run the game and experience no bad behaviour
🏃
1:44:54Run the game and experience no bad behaviour
🏃
1:44:54Run the game and experience no bad behaviour
🏃
1:45:16Try to prevent Win32ProcessPendingMessages() from skipping 0x738 messages
1:45:16Try to prevent Win32ProcessPendingMessages() from skipping 0x738 messages
1:45:16Try to prevent Win32ProcessPendingMessages() from skipping 0x738 messages
1:45:44Run the game to see that PeekMessage no longer takes the top spot in the profiler
🏃
1:45:44Run the game to see that PeekMessage no longer takes the top spot in the profiler
🏃
1:45:44Run the game to see that PeekMessage no longer takes the top spot in the profiler
🏃
1:46:08Re-enable Win32ProcessPendingMessages() to skip 0x738 messages
1:46:08Re-enable Win32ProcessPendingMessages() to skip 0x738 messages
1:46:08Re-enable Win32ProcessPendingMessages() to skip 0x738 messages
1:47:12Q&A
🗩
1:47:12Q&A
🗩
1:47:12Q&A
🗩
1:47:16chaoscom Casey, did you notice that the annotation search doesn't seem to be working anymore?2
🗹
🗪
1:47:16chaoscom Casey, did you notice that the annotation search doesn't seem to be working anymore?2
🗹
🗪
1:47:16chaoscom Casey, did you notice that the annotation search doesn't seem to be working anymore?2
🗹
🗪
1:49:31chaoscom Why do you call PeekMessage once for each element in the skip list instead of retrieving the message once (if any) and comparing it against the messages you want to skip?
🗪
1:49:31chaoscom Why do you call PeekMessage once for each element in the skip list instead of retrieving the message once (if any) and comparing it against the messages you want to skip?
🗪
1:49:31chaoscom Why do you call PeekMessage once for each element in the skip list instead of retrieving the message once (if any) and comparing it against the messages you want to skip?
🗪
1:50:27finalspace Q: You got that messages while debugging with the NVidia GPU devy thingy
🗪
1:50:27finalspace Q: You got that messages while debugging with the NVidia GPU devy thingy
🗪
1:50:27finalspace Q: You got that messages while debugging with the NVidia GPU devy thingy
🗪
1:50:34Note the situation in which the 0x738 message is problematic
1:50:34Note the situation in which the 0x738 message is problematic
1:50:34Note the situation in which the 0x738 message is problematic
1:50:58Prevent Win32ProcessPendingMessages() from skipping 0x738 messages
1:50:58Prevent Win32ProcessPendingMessages() from skipping 0x738 messages
1:50:58Prevent Win32ProcessPendingMessages() from skipping 0x738 messages
1:51:36Run the game and find that our fonts are gone
🏃
1:51:36Run the game and find that our fonts are gone
🏃
1:51:36Run the game and find that our fonts are gone
🏃
1:52:24Try to give us a break point in Win32ProcessPendingMessages()
1:52:24Try to give us a break point in Win32ProcessPendingMessages()
1:52:24Try to give us a break point in Win32ProcessPendingMessages()
1:53:40Add an assertion in Win32ProcessPendingMessages()
1:53:40Add an assertion in Win32ProcessPendingMessages()
1:53:40Add an assertion in Win32ProcessPendingMessages()
1:54:02Run and hit that assertion
🏃
1:54:02Run and hit that assertion
🏃
1:54:02Run and hit that assertion
🏃
1:54:19Re-enable Win32ProcessPendingMessages() to skip 0x738
1:54:19Re-enable Win32ProcessPendingMessages() to skip 0x738
1:54:19Re-enable Win32ProcessPendingMessages() to skip 0x738
1:54:29Run the game to see that we freeze
🏃
1:54:29Run the game to see that we freeze
🏃
1:54:29Run the game to see that we freeze
🏃
1:54:43Fix our PeekMessage note
1:54:43Fix our PeekMessage note
1:54:43Fix our PeekMessage note
1:55:34macielda Q: I heard you have talked about it already, but do you have any comments you would like to make about Meltdown and Spectre on record? I missed the pre-stream
🗪
1:55:34macielda Q: I heard you have talked about it already, but do you have any comments you would like to make about Meltdown and Spectre on record? I missed the pre-stream
🗪
1:55:34macielda Q: I heard you have talked about it already, but do you have any comments you would like to make about Meltdown and Spectre on record? I missed the pre-stream
🗪
1:58:19dragoonx6 Q: What in your opinion is the biggest lie / myth most programmers follow / believe in?
🗪
1:58:19dragoonx6 Q: What in your opinion is the biggest lie / myth most programmers follow / believe in?
🗪
1:58:19dragoonx6 Q: What in your opinion is the biggest lie / myth most programmers follow / believe in?
🗪
2:01:04cicero743 Hey Casey do you know SFML? If so, what is your opinion about it?
🗪
2:01:04cicero743 Hey Casey do you know SFML? If so, what is your opinion about it?
🗪
2:01:04cicero743 Hey Casey do you know SFML? If so, what is your opinion about it?
🗪
2:01:16macielda Q: What do you mean when you mentioned "browser security" is a concern these days? Should the OS be secure instead of the browser or something like that?
🗪
💢
2:01:16macielda Q: What do you mean when you mentioned "browser security" is a concern these days? Should the OS be secure instead of the browser or something like that?
🗪
💢
2:01:16macielda Q: What do you mean when you mentioned "browser security" is a concern these days? Should the OS be secure instead of the browser or something like that?
🗪
💢
2:06:51dragoonx6 Q: Alright. Do you think code reviews and / or writing tests helps with that?
🗪
💢
2:06:51dragoonx6 Q: Alright. Do you think code reviews and / or writing tests helps with that?
🗪
💢
2:06:51dragoonx6 Q: Alright. Do you think code reviews and / or writing tests helps with that?
🗪
💢
2:14:25stuckpanda Q: I watched the first 50 or so episodes of Handmade Hero. Quick question about the current state of things: is the GPU / OpenGL / shaders part of the project now?
🗪
2:14:25stuckpanda Q: I watched the first 50 or so episodes of Handmade Hero. Quick question about the current state of things: is the GPU / OpenGL / shaders part of the project now?
🗪
2:14:25stuckpanda Q: I watched the first 50 or so episodes of Handmade Hero. Quick question about the current state of things: is the GPU / OpenGL / shaders part of the project now?
🗪
2:14:40frostyninja Q: When do you plan on showing / adding in the new art
🗪
2:14:40frostyninja Q: When do you plan on showing / adding in the new art
🗪
2:14:40frostyninja Q: When do you plan on showing / adding in the new art
🗪
2:14:49gg_nate Q: Opinion of the .net framework platform?
🗪
2:14:49gg_nate Q: Opinion of the .net framework platform?
🗪
2:14:49gg_nate Q: Opinion of the .net framework platform?
🗪
2:14:52macielda Q: One argument I get from people that use "advanced C++ features" is that the resulting code is more secure and more robust. Do you agree with that? Why?
🗪
2:14:52macielda Q: One argument I get from people that use "advanced C++ features" is that the resulting code is more secure and more robust. Do you agree with that? Why?
🗪
2:14:52macielda Q: One argument I get from people that use "advanced C++ features" is that the resulting code is more secure and more robust. Do you agree with that? Why?
🗪
2:16:16Close this down
🗩
2:16:16Close this down
🗩
2:16:16Close this down
🗩