Optimized Grid Step Selection
?
?

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:02Welcome to the stream with a plug of Handmade Seattle 20201 and thanks to Abner
📖
0:02Welcome to the stream with a plug of Handmade Seattle 20201 and thanks to Abner
📖
0:02Welcome to the stream with a plug of Handmade Seattle 20201 and thanks to Abner
📖
5:25Demo the current state of the lighting
🏃
5:25Demo the current state of the lighting
🏃
5:25Demo the current state of the lighting
🏃
7:01Explain our lighting system's two hot zones GridRayCast() and ComputeLightPropagation()
📖
7:01Explain our lighting system's two hot zones GridRayCast() and ComputeLightPropagation()
📖
7:01Explain our lighting system's two hot zones GridRayCast() and ComputeLightPropagation()
📖
8:52hhlightprof total seconds elapsed: 4.534990
🏃
8:52hhlightprof total seconds elapsed: 4.534990
🏃
8:52hhlightprof total seconds elapsed: 4.534990
🏃
9:39Toggle off the DiffuseWeightMap update in ComputeLightPropagation()
9:39Toggle off the DiffuseWeightMap update in ComputeLightPropagation()
9:39Toggle off the DiffuseWeightMap update in ComputeLightPropagation()
9:46hhlightprof total seconds elapsed: 3.599488
🏃
9:46hhlightprof total seconds elapsed: 3.599488
🏃
9:46hhlightprof total seconds elapsed: 3.599488
🏃
11:36Determine to further optimise GridRayCast()
🗩
11:36Determine to further optimise GridRayCast()
🗩
11:36Determine to further optimise GridRayCast()
🗩
11:56Try decreasing the CostMetric from 16 to 0 in GridRayCast()
11:56Try decreasing the CostMetric from 16 to 0 in GridRayCast()
11:56Try decreasing the CostMetric from 16 to 0 in GridRayCast()
12:17hhlightprof total seconds elapsed: 2.211856
🏃
12:17hhlightprof total seconds elapsed: 2.211856
🏃
12:17hhlightprof total seconds elapsed: 2.211856
🏃
12:33Try increasing the CostMetric from 0 to 1 in GridRayCast()
12:33Try increasing the CostMetric from 0 to 1 in GridRayCast()
12:33Try increasing the CostMetric from 0 to 1 in GridRayCast()
12:57hhlightprof total seconds elapsed: 2.629898
🏃
12:57hhlightprof total seconds elapsed: 2.629898
🏃
12:57hhlightprof total seconds elapsed: 2.629898
🏃
13:22Note the sensitivity of GridRayCast() to repetition
🗩
13:22Note the sensitivity of GridRayCast() to repetition
🗩
13:22Note the sensitivity of GridRayCast() to repetition
🗩
14:36Let GridRayCast() set the CostMetric to our default 16
14:36Let GridRayCast() set the CostMetric to our default 16
14:36Let GridRayCast() set the CostMetric to our default 16
14:55Seek improvements to GridRayCast()
📖
14:55Seek improvements to GridRayCast()
📖
14:55Seek improvements to GridRayCast()
📖
18:28Note the fine-grained nature of our lighting grid
🏃
18:28Note the fine-grained nature of our lighting grid
🏃
18:28Note the fine-grained nature of our lighting grid
🏃
20:03Make ProfileRun() print the spatial grid occupancy2
20:03Make ProfileRun() print the spatial grid occupancy2
20:03Make ProfileRun() print the spatial grid occupancy2
31:45Step in to ProfileRun()
🏃
31:45Step in to ProfileRun()
🏃
31:45Step in to ProfileRun()
🏃
32:08Try to demo RemedyBG's , [comma] Watch window syntax, with thanks to x13pixels
🗹
32:08Try to demo RemedyBG's , [comma] Watch window syntax, with thanks to x13pixels
🗹
32:08Try to demo RemedyBG's , [comma] Watch window syntax, with thanks to x13pixels
🗹
33:57RemedyBG feature request: Formatters for regular variables in the Watch window
🗹
33:57RemedyBG feature request: Formatters for regular variables in the Watch window
🗹
33:57RemedyBG feature request: Formatters for regular variables in the Watch window
🗹
34:33Check the box occupancy values produced by ProfileRun()
🏃
34:33Check the box occupancy values produced by ProfileRun()
🏃
34:33Check the box occupancy values produced by ProfileRun()
🏃
35:05hhlightprof box occupancy: Low
🏃
35:05hhlightprof box occupancy: Low
🏃
35:05hhlightprof box occupancy: Low
🏃
36:34Determine to perform ComputeWalkTable() inline
📖
36:34Determine to perform ComputeWalkTable() inline
📖
36:34Determine to perform ComputeWalkTable() inline
📖
39:12Introduce ComputeWalkTableFast(), which does not return anything, but may be used to verify our results
39:12Introduce ComputeWalkTableFast(), which does not return anything, but may be used to verify our results
39:12Introduce ComputeWalkTableFast(), which does not return anything, but may be used to verify our results
43:03Run hhlightprof successfully
🏃
43:03Run hhlightprof successfully
🏃
43:03Run hhlightprof successfully
🏃
43:12Induce an error in ComputeWalkTableFast()
43:12Induce an error in ComputeWalkTableFast()
43:12Induce an error in ComputeWalkTableFast()
43:22Run hhlightprof without faulting
🏃
43:22Run hhlightprof without faulting
🏃
43:22Run hhlightprof without faulting
🏃
44:18Step through ComputeWalkTableFast()
🏃
44:18Step through ComputeWalkTableFast()
🏃
44:18Step through ComputeWalkTableFast()
🏃
46:11Use a hand-coded assertion in ComputeWalkTableFast()
46:11Use a hand-coded assertion in ComputeWalkTableFast()
46:11Use a hand-coded assertion in ComputeWalkTableFast()
47:13Run hhlightprof with a fault
🏃
47:13Run hhlightprof with a fault
🏃
47:13Run hhlightprof with a fault
🏃
47:22Remove our induced error from ComputeWalkTableFast()
47:22Remove our induced error from ComputeWalkTableFast()
47:22Remove our induced error from ComputeWalkTableFast()
47:30Run hhlightprof successfully
🏃
47:30Run hhlightprof successfully
🏃
47:30Run hhlightprof successfully
🏃
47:48Embark on optimising ComputeWalkTableFast() in SIMD
47:48Embark on optimising ComputeWalkTableFast() in SIMD
47:48Embark on optimising ComputeWalkTableFast() in SIMD
55:07Run hhlightprof with a fault, due to tTerminateResult being totally wrong
🏃
55:07Run hhlightprof with a fault, due to tTerminateResult being totally wrong
🏃
55:07Run hhlightprof with a fault, due to tTerminateResult being totally wrong
🏃
56:02Fix ComputeWalkTableFast() to compute At4 inside the loop
56:02Fix ComputeWalkTableFast() to compute At4 inside the loop
56:02Fix ComputeWalkTableFast() to compute At4 inside the loop
56:55Run hhlightprof successfully
🏃
56:55Run hhlightprof successfully
🏃
56:55Run hhlightprof successfully
🏃
57:15Optimise ComputeWalkTableFast() to compute BestDim using an HCompShuffler
57:15Optimise ComputeWalkTableFast() to compute BestDim using an HCompShuffler
57:15Optimise ComputeWalkTableFast() to compute BestDim using an HCompShuffler
1:02:26Run hhlightprof with a fault, due to dGridResult being wrong
🏃
1:02:26Run hhlightprof with a fault, due to dGridResult being wrong
🏃
1:02:26Run hhlightprof with a fault, due to dGridResult being wrong
🏃
1:03:17Remove 14 and 15 from the HCompShuffler in ComputeWalkTableFast()
1:03:17Remove 14 and 15 from the HCompShuffler in ComputeWalkTableFast()
1:03:17Remove 14 and 15 from the HCompShuffler in ComputeWalkTableFast()
1:04:57Run hhlightprof with a fault, due to tBestRef and tBest differing
🏃
1:04:57Run hhlightprof with a fault, due to tBestRef and tBest differing
🏃
1:04:57Run hhlightprof with a fault, due to tBestRef and tBest differing
🏃
1:06:57Consider how best to traverse the walk table
📖
1:06:57Consider how best to traverse the walk table
📖
1:06:57Consider how best to traverse the walk table
📖
1:10:43Look into _mm_minpos_epu16() at the Intel Intrinsics Guide3
📖
1:10:43Look into _mm_minpos_epu16() at the Intel Intrinsics Guide3
📖
1:10:43Look into _mm_minpos_epu16() at the Intel Intrinsics Guide3
📖
1:13:14Introduce a second HCompShufflerLow to compare the low 16-bits of values with equivalent high 16-bits
1:13:14Introduce a second HCompShufflerLow to compare the low 16-bits of values with equivalent high 16-bits
1:13:14Introduce a second HCompShufflerLow to compare the low 16-bits of values with equivalent high 16-bits
1:15:14Revert the HCompShufflerLow
1:15:14Revert the HCompShufflerLow
1:15:14Revert the HCompShufflerLow
1:15:54Optimise our WalkTable traversal using all four SIMD lanes, replacing the HCompShuffler with BestTable
1:15:54Optimise our WalkTable traversal using all four SIMD lanes, replacing the HCompShuffler with BestTable
1:15:54Optimise our WalkTable traversal using all four SIMD lanes, replacing the HCompShuffler with BestTable
1:31:13Run hhlightprof with a verification fault
🏃
1:31:13Run hhlightprof with a verification fault
🏃
1:31:13Run hhlightprof with a verification fault
🏃
1:34:00Assert in ComputeWalkTableFast() that the CompMask is within bounds of the BestTable
1:34:00Assert in ComputeWalkTableFast() that the CompMask is within bounds of the BestTable
1:34:00Assert in ComputeWalkTableFast() that the CompMask is within bounds of the BestTable
1:34:47Run hhlightprof with a verification fault not on the BestTable bounds
🏃
1:34:47Run hhlightprof with a verification fault not on the BestTable bounds
🏃
1:34:47Run hhlightprof with a verification fault not on the BestTable bounds
🏃
1:36:35Add a breakpoint in ComputeWalkTableFast() on SampleDirIndex 135
1:36:35Add a breakpoint in ComputeWalkTableFast() on SampleDirIndex 135
1:36:35Add a breakpoint in ComputeWalkTableFast() on SampleDirIndex 135
1:36:58Step through ComputeWalkTableFast() on SampleDirIndex 135
🏃
1:36:58Step through ComputeWalkTableFast() on SampleDirIndex 135
🏃
1:36:58Step through ComputeWalkTableFast() on SampleDirIndex 135
🏃
1:40:55Linguistically flip the Best checker in (the working) ComputeWalkTable()
1:40:55Linguistically flip the Best checker in (the working) ComputeWalkTable()
1:40:55Linguistically flip the Best checker in (the working) ComputeWalkTable()
1:41:21Run hhlightprof with a verification fault on SampleDirIndex 256
🏃
1:41:21Run hhlightprof with a verification fault on SampleDirIndex 256
🏃
1:41:21Run hhlightprof with a verification fault on SampleDirIndex 256
🏃
1:42:18Logically flip the sense of the Best checker in ComputeWalkTable(), and redo the BestTable in ComputeWalkTableFast() in line with the original logic
1:42:18Logically flip the sense of the Best checker in ComputeWalkTable(), and redo the BestTable in ComputeWalkTableFast() in line with the original logic
1:42:18Logically flip the sense of the Best checker in ComputeWalkTable(), and redo the BestTable in ComputeWalkTableFast() in line with the original logic
1:45:14Run hhlightprof with a verification fault right off the bat
🏃
1:45:14Run hhlightprof with a verification fault right off the bat
🏃
1:45:14Run hhlightprof with a verification fault right off the bat
🏃
1:45:24Verify the BestTable in ComputeWalkTableFast()
📖
1:45:24Verify the BestTable in ComputeWalkTableFast()
📖
1:45:24Verify the BestTable in ComputeWalkTableFast()
📖
1:47:08Reacquaint ourselves with the Best picking in ComputeWalkTable()
🏃
1:47:08Reacquaint ourselves with the Best picking in ComputeWalkTable()
🏃
1:47:08Reacquaint ourselves with the Best picking in ComputeWalkTable()
🏃
1:47:44Revert the sense of the Best checker in ComputeWalkTable()
1:47:44Revert the sense of the Best checker in ComputeWalkTable()
1:47:44Revert the sense of the Best checker in ComputeWalkTable()
1:48:57Run hhlightprof successfully
🏃
1:48:57Run hhlightprof successfully
🏃
1:48:57Run hhlightprof successfully
🏃
1:49:26Introduce a ShuffleTable in ComputeWalkTableFast()
1:49:26Introduce a ShuffleTable in ComputeWalkTableFast()
1:49:26Introduce a ShuffleTable in ComputeWalkTableFast()
1:51:04Run hhlightprof successfully
🏃
1:51:04Run hhlightprof successfully
🏃
1:51:04Run hhlightprof successfully
🏃
1:51:12Optimise ComputeWalkTableFast() to pick the tBest out of the ShuffleTable
1:51:12Optimise ComputeWalkTableFast() to pick the tBest out of the ShuffleTable
1:51:12Optimise ComputeWalkTableFast() to pick the tBest out of the ShuffleTable
1:54:12Run hhlightprof successfully
🏃
1:54:12Run hhlightprof successfully
🏃
1:54:12Run hhlightprof successfully
🏃
1:54:20Optimise ComputeWalkTableFast() to track tTerminate in SIMD
1:54:20Optimise ComputeWalkTableFast() to track tTerminate in SIMD
1:54:20Optimise ComputeWalkTableFast() to track tTerminate in SIMD
1:55:18Run hhlightprof successfully
🏃
1:55:18Run hhlightprof successfully
🏃
1:55:18Run hhlightprof successfully
🏃
1:55:22Optimise ComputeWalkTableFast() to initialise At4 before the loop, and individually offset the four steps by the CellDim
1:55:22Optimise ComputeWalkTableFast() to initialise At4 before the loop, and individually offset the four steps by the CellDim
1:55:22Optimise ComputeWalkTableFast() to initialise At4 before the loop, and individually offset the four steps by the CellDim
2:00:05Run hhlightprof successfully
🏃
2:00:05Run hhlightprof successfully
🏃
2:00:05Run hhlightprof successfully
🏃
2:00:08Optimise ComputeWalkTableFast() to offset all four steps in SIMD, branchless, using a MaskTable
2:00:08Optimise ComputeWalkTableFast() to offset all four steps in SIMD, branchless, using a MaskTable
2:00:08Optimise ComputeWalkTableFast() to offset all four steps in SIMD, branchless, using a MaskTable
2:04:40Run hhlightprof with a verification fault
🏃
2:04:40Run hhlightprof with a verification fault
🏃
2:04:40Run hhlightprof with a verification fault
🏃
2:04:55Scrutinise our MaskTable
📖
2:04:55Scrutinise our MaskTable
📖
2:04:55Scrutinise our MaskTable
📖
2:05:37Compute a Compare for At4 in ComputeWalkTableFast()
2:05:37Compute a Compare for At4 in ComputeWalkTableFast()
2:05:37Compute a Compare for At4 in ComputeWalkTableFast()
2:06:05Break in to ComputeWalkTableFast() and compare the Compare with our actual At4
🏃
2:06:05Break in to ComputeWalkTableFast() and compare the Compare with our actual At4
🏃
2:06:05Break in to ComputeWalkTableFast() and compare the Compare with our actual At4
🏃
2:07:04Set At4 equal to Compare, saving off the OldAt4
2:07:04Set At4 equal to Compare, saving off the OldAt4
2:07:04Set At4 equal to Compare, saving off the OldAt4
2:07:19Run hhlightprof successfully
🏃
2:07:19Run hhlightprof successfully
🏃
2:07:19Run hhlightprof successfully
🏃
2:07:34Try making ComputeWalkTableFast() offset the At4 in two steps
2:07:34Try making ComputeWalkTableFast() offset the At4 in two steps
2:07:34Try making ComputeWalkTableFast() offset the At4 in two steps
2:08:18Run hhlightprof successfully
🏃
2:08:18Run hhlightprof successfully
🏃
2:08:18Run hhlightprof successfully
🏃
2:08:27Gauge the performance of our ComputeWalkTableFast()4
📖
2:08:27Gauge the performance of our ComputeWalkTableFast()4
📖
2:08:27Gauge the performance of our ComputeWalkTableFast()4
📖
2:11:48Build in -O2
2:11:48Build in -O2
2:11:48Build in -O2
2:12:12Run the game successfully
🏃
2:12:12Run the game successfully
🏃
2:12:12Run the game successfully
🏃
2:12:26Make ComputeWalkTable() compute InvRayD before the stepping loop, to remove a divide within it
2:12:26Make ComputeWalkTable() compute InvRayD before the stepping loop, to remove a divide within it
2:12:26Make ComputeWalkTable() compute InvRayD before the stepping loop, to remove a divide within it
2:13:01The lighting looks completely different
🏃
2:13:01The lighting looks completely different
🏃
2:13:01The lighting looks completely different
🏃
2:13:35Make ComputeWalkTable() compute the InvRayD using a safe ratio
2:13:35Make ComputeWalkTable() compute the InvRayD using a safe ratio
2:13:35Make ComputeWalkTable() compute the InvRayD using a safe ratio
2:15:37The lighting remains different
🏃
2:15:37The lighting remains different
🏃
2:15:37The lighting remains different
🏃
2:16:06Fix ComputeWalkTable() to compute InvRayD after RayD itself
2:16:06Fix ComputeWalkTable() to compute InvRayD after RayD itself
2:16:06Fix ComputeWalkTable() to compute InvRayD after RayD itself
2:16:26The lighting is back to how it was
🏃
2:16:26The lighting is back to how it was
🏃
2:16:26The lighting is back to how it was
🏃
2:16:30Make ComputeWalkTable() compute InvRayD as normal
2:16:30Make ComputeWalkTable() compute InvRayD as normal
2:16:30Make ComputeWalkTable() compute InvRayD as normal
2:16:41The lighting is fine
🏃
2:16:41The lighting is fine
🏃
2:16:41The lighting is fine
🏃
2:16:58Build in -Od
2:16:58Build in -Od
2:16:58Build in -Od
2:17:14Run hhlightprof with a verification fault
🏃
2:17:14Run hhlightprof with a verification fault
🏃
2:17:14Run hhlightprof with a verification fault
🏃
2:17:22Make ComputeWalkTableFast() also precompute InvRayD
2:17:22Make ComputeWalkTableFast() also precompute InvRayD
2:17:22Make ComputeWalkTableFast() also precompute InvRayD
2:17:50Run hhlightprof successfully
🏃
2:17:50Run hhlightprof successfully
🏃
2:17:50Run hhlightprof successfully
🏃
2:18:50Q&A
🗩
2:18:50Q&A
🗩
2:18:50Q&A
🗩
2:19:11centhusiast Q: Hi Casey! I was very sick and my health condition was very bad and for the last three months and now I am fortunately back to life and to Handmade Hero. Could you briefly say what the focus of Handmade Hero was in the last three months? Thank you!
🗪
2:19:11centhusiast Q: Hi Casey! I was very sick and my health condition was very bad and for the last three months and now I am fortunately back to life and to Handmade Hero. Could you briefly say what the focus of Handmade Hero was in the last three months? Thank you!
🗪
2:19:11centhusiast Q: Hi Casey! I was very sick and my health condition was very bad and for the last three months and now I am fortunately back to life and to Handmade Hero. Could you briefly say what the focus of Handmade Hero was in the last three months? Thank you!
🗪
2:20:16infinum Q: handmade_hero Hello Casey, this question may be off-topic but it's really important for me. I know you were doing some UI development. I saw your video on immediate mode UI. I have the only job opportunity to develop UI for mobile app but I've never done that and I need this job. So can you please give me some advice on where to find information, maybe some guides on UI development and were you using some library or did you write everything from scratch? It would be very helpful for me
🗪
2:20:16infinum Q: handmade_hero Hello Casey, this question may be off-topic but it's really important for me. I know you were doing some UI development. I saw your video on immediate mode UI. I have the only job opportunity to develop UI for mobile app but I've never done that and I need this job. So can you please give me some advice on where to find information, maybe some guides on UI development and were you using some library or did you write everything from scratch? It would be very helpful for me
🗪
2:20:16infinum Q: handmade_hero Hello Casey, this question may be off-topic but it's really important for me. I know you were doing some UI development. I saw your video on immediate mode UI. I have the only job opportunity to develop UI for mobile app but I've never done that and I need this job. So can you please give me some advice on where to find information, maybe some guides on UI development and were you using some library or did you write everything from scratch? It would be very helpful for me
🗪
2:23:14somebody_took_my_name Q: What is the best way to debug something that only happens in optimized code?
🗪
2:23:14somebody_took_my_name Q: What is the best way to debug something that only happens in optimized code?
🗪
2:23:14somebody_took_my_name Q: What is the best way to debug something that only happens in optimized code?
🗪
2:23:50mindmark42 Q: How expensive do you think the table lookups are?5,6
🗪
2:23:50mindmark42 Q: How expensive do you think the table lookups are?5,6
🗪
2:23:50mindmark42 Q: How expensive do you think the table lookups are?5,6
🗪
2:28:03tomtetlaw Q: Can you give a general idea of how to optimise branches out of a function?
🗪
2:28:03tomtetlaw Q: Can you give a general idea of how to optimise branches out of a function?
🗪
2:28:03tomtetlaw Q: Can you give a general idea of how to optimise branches out of a function?
🗪
2:29:49legendarior Q: Hello, thank you for all the videos. I am a bored CS student that aced his exams and now does not know what to do during his vacation
🗪
2:29:49legendarior Q: Hello, thank you for all the videos. I am a bored CS student that aced his exams and now does not know what to do during his vacation
🗪
2:29:49legendarior Q: Hello, thank you for all the videos. I am a bored CS student that aced his exams and now does not know what to do during his vacation
🗪
2:29:58lucid_frost Q: What kinds of things would you like the compiler to do to help with this table stuff (if any)?
🗪
2:29:58lucid_frost Q: What kinds of things would you like the compiler to do to help with this table stuff (if any)?
🗪
2:29:58lucid_frost Q: What kinds of things would you like the compiler to do to help with this table stuff (if any)?
🗪
2:30:12centhusiast Q: Could you explain the compile time execution as we have in jai?
🗪
2:30:12centhusiast Q: Could you explain the compile time execution as we have in jai?
🗪
2:30:12centhusiast Q: Could you explain the compile time execution as we have in jai?
🗪
2:30:19billdstrong Q: Would meowhash be suitable to create a custom UUID? It wouldn't be part of the UUID spec, but could it serve the same purpose?
🗪
2:30:19billdstrong Q: Would meowhash be suitable to create a custom UUID? It wouldn't be part of the UUID spec, but could it serve the same purpose?
🗪
2:30:19billdstrong Q: Would meowhash be suitable to create a custom UUID? It wouldn't be part of the UUID spec, but could it serve the same purpose?
🗪
2:30:42End it there
🗩
2:30:42End it there
🗩
2:30:42End it there
🗩