Cleaning Up the Lighting Code
?
?

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:00Recap and set the stage for the day
🗩
0:00Recap and set the stage for the day
🗩
0:00Recap and set the stage for the day
🗩
0:40Copy into handmade_lighting.h the function signatures of our lighting system functions
0:40Copy into handmade_lighting.h the function signatures of our lighting system functions
0:40Copy into handmade_lighting.h the function signatures of our lighting system functions
1:21Describe the two-stage lighting system structure, noting our desire to have only one function, UpdateLighting()
📖
1:21Describe the two-stage lighting system structure, noting our desire to have only one function, UpdateLighting()
📖
1:21Describe the two-stage lighting system structure, noting our desire to have only one function, UpdateLighting()
📖
3:57Look into relieving PushLightingRenderValues() of the need to call SetLightBounds()
📖
3:57Look into relieving PushLightingRenderValues() of the need to call SetLightBounds()
📖
3:57Look into relieving PushLightingRenderValues() of the need to call SetLightBounds()
📖
5:50Consider storing our light voxel in game_render_commands
📖
5:50Consider storing our light voxel in game_render_commands
📖
5:50Consider storing our light voxel in game_render_commands
📖
8:29Move the VoxelMinCorner and VoxelInvTotalDim from render_setup to game_render_commands as LightingVoxelMinCorner and LightingVoxelInvTotalDim, and propagate this change
8:29Move the VoxelMinCorner and VoxelInvTotalDim from render_setup to game_render_commands as LightingVoxelMinCorner and LightingVoxelInvTotalDim, and propagate this change
8:29Move the VoxelMinCorner and VoxelInvTotalDim from render_setup to game_render_commands as LightingVoxelMinCorner and LightingVoxelInvTotalDim, and propagate this change
11:53Toggle on LIGHTING_USE_FOUR_RAYS
11:53Toggle on LIGHTING_USE_FOUR_RAYS
11:53Toggle on LIGHTING_USE_FOUR_RAYS
12:30Break in ComputeWalkTable()
🏃
12:30Break in ComputeWalkTable()
🏃
12:30Break in ComputeWalkTable()
🏃
13:05Fix the infinite loop in ComputeWalkTable()
13:05Fix the infinite loop in ComputeWalkTable()
13:05Fix the infinite loop in ComputeWalkTable()
13:17See a blank screen
🏃
13:17See a blank screen
🏃
13:17See a blank screen
🏃
13:52Make the new BuildSpatialPartitionForLighting() only operate if LIGHTING_USE_FOUR_RAYS is disabled
13:52Make the new BuildSpatialPartitionForLighting() only operate if LIGHTING_USE_FOUR_RAYS is disabled
13:52Make the new BuildSpatialPartitionForLighting() only operate if LIGHTING_USE_FOUR_RAYS is disabled
14:37See the old lighting, albeit broken
🏃
14:37See the old lighting, albeit broken
🏃
14:37See the old lighting, albeit broken
🏃
14:56Build in -O2
14:56Build in -O2
14:56Build in -O2
15:11Check out our broken old lighting
🏃
15:11Check out our broken old lighting
🏃
15:11Check out our broken old lighting
🏃
15:28Collapse SetUpLightingRegion() into UpdateLighting()
15:28Collapse SetUpLightingRegion() into UpdateLighting()
15:28Collapse SetUpLightingRegion() into UpdateLighting()
22:05See a blank screen
🏃
22:05See a blank screen
🏃
22:05See a blank screen
🏃
22:10Make UpdateAndRenderWorld() call EnableLighting()
22:10Make UpdateAndRenderWorld() call EnableLighting()
22:10Make UpdateAndRenderWorld() call EnableLighting()
24:43Check out our broken, yet streamlined, old lighting
🏃
24:43Check out our broken, yet streamlined, old lighting
🏃
24:43Check out our broken, yet streamlined, old lighting
🏃
25:22Clean up and document UpdateLighting()
25:22Clean up and document UpdateLighting()
25:22Clean up and document UpdateLighting()
33:17Demo the incorrect lighting computations and the flash when the camera moves
🏃
33:17Demo the incorrect lighting computations and the flash when the camera moves
🏃
33:17Demo the incorrect lighting computations and the flash when the camera moves
🏃
33:47Fix UpdateAndRenderWorld() to pass the incoming Camera.SimulationCenter to UpdateLighting()
33:47Fix UpdateAndRenderWorld() to pass the incoming Camera.SimulationCenter to UpdateLighting()
33:47Fix UpdateAndRenderWorld() to pass the incoming Camera.SimulationCenter to UpdateLighting()
35:10The flash when moving the camera is fixed
🏃
35:10The flash when moving the camera is fixed
🏃
35:10The flash when moving the camera is fixed
🏃
35:31Finish documenting UpdateLighting()
35:31Finish documenting UpdateLighting()
35:31Finish documenting UpdateLighting()
36:48Determine to debug wrong lighting results and remove the lighting_box storage from lighting_solution
📖
36:48Determine to debug wrong lighting results and remove the lighting_box storage from lighting_solution
📖
36:48Determine to debug wrong lighting results and remove the lighting_box storage from lighting_solution
📖
37:41Prepare to debug wrong lighting results, removing SplitKd() and trimming out old test cases from RayCast()
37:41Prepare to debug wrong lighting results, removing SplitKd() and trimming out old test cases from RayCast()
37:41Prepare to debug wrong lighting results, removing SplitKd() and trimming out old test cases from RayCast()
40:48The game looks the same
🏃
40:48The game looks the same
🏃
40:48The game looks the same
🏃
40:53Remove more stale lighting code
40:53Remove more stale lighting code
40:53Remove more stale lighting code
44:26Demo the wrong lighting results
🏃
44:26Demo the wrong lighting results
🏃
44:26Demo the wrong lighting results
🏃
45:24Scrutinise RayCast() for errors
📖
45:24Scrutinise RayCast() for errors
📖
45:24Scrutinise RayCast() for errors
📖
49:13Scrutinise ComputeVoxelIrradianceAt() and related functions for errors
📖
49:13Scrutinise ComputeVoxelIrradianceAt() and related functions for errors
📖
49:13Scrutinise ComputeVoxelIrradianceAt() and related functions for errors
📖
51:16Scrutinise the lighting setup code for errors
📖
51:16Scrutinise the lighting setup code for errors
📖
51:16Scrutinise the lighting setup code for errors
📖
55:08Fix FullCast() to pass the RayD from the Solution->SamplingSpheres to RayCast()
55:08Fix FullCast() to pass the RayD from the Solution->SamplingSpheres to RayCast()
55:08Fix FullCast() to pass the RayD from the Solution->SamplingSpheres to RayCast()
57:59Admire our more correct, old lighting
🏃
57:59Admire our more correct, old lighting
🏃
57:59Admire our more correct, old lighting
🏃
58:07Build in -O2
58:07Build in -O2
58:07Build in -O2
58:18Admire our more reasonable, old lighting
🏃
58:18Admire our more reasonable, old lighting
🏃
58:18Admire our more reasonable, old lighting
🏃
58:55Provide an easy means of toggling between the new grid-based and the old AABB ray caster, renaming RayCast() to AABBRayCast()
58:55Provide an easy means of toggling between the new grid-based and the old AABB ray caster, renaming RayCast() to AABBRayCast()
58:55Provide an easy means of toggling between the new grid-based and the old AABB ray caster, renaming RayCast() to AABBRayCast()
1:08:11Check out our old AABB ray cast lighting
🏃
1:08:11Check out our old AABB ray cast lighting
🏃
1:08:11Check out our old AABB ray cast lighting
🏃
1:08:35Split BuildSpatialPartitionForLighting() into GridBuildSpatialPartition() and AABBBuildSpatialPartition()
1:08:35Split BuildSpatialPartitionForLighting() into GridBuildSpatialPartition() and AABBBuildSpatialPartition()
1:08:35Split BuildSpatialPartitionForLighting() into GridBuildSpatialPartition() and AABBBuildSpatialPartition()
1:10:51Check out our old AABB ray cast lighting
🏃
1:10:51Check out our old AABB ray cast lighting
🏃
1:10:51Check out our old AABB ray cast lighting
🏃
1:11:03Toggle on LIGHTING_USE_GRID and fix compile errors
1:11:03Toggle on LIGHTING_USE_GRID and fix compile errors
1:11:03Toggle on LIGHTING_USE_GRID and fix compile errors
1:11:37Hit our assertion in FlatIndexFrom()
🏃
1:11:37Hit our assertion in FlatIndexFrom()
🏃
1:11:37Hit our assertion in FlatIndexFrom()
🏃
1:13:40Make GridBuildSpatialPartition() clip the SpatialGrid down by a CellDim
1:13:40Make GridBuildSpatialPartition() clip the SpatialGrid down by a CellDim
1:13:40Make GridBuildSpatialPartition() clip the SpatialGrid down by a CellDim
1:16:12Hit our assertion in FlatIndexFrom()
🏃
1:16:12Hit our assertion in FlatIndexFrom()
🏃
1:16:12Hit our assertion in FlatIndexFrom()
🏃
1:17:35Fix GridBuildSpatialPartition() to pass the BoxBounds to GetIndexForP()
1:17:35Fix GridBuildSpatialPartition() to pass the BoxBounds to GetIndexForP()
1:17:35Fix GridBuildSpatialPartition() to pass the BoxBounds to GetIndexForP()
1:18:10Admire our moonlight
🏃
1:18:10Admire our moonlight
🏃
1:18:10Admire our moonlight
🏃
1:18:36Build in -O2
1:18:36Build in -O2
1:18:36Build in -O2
1:18:43Admire our moonlight
🏃
1:18:43Admire our moonlight
🏃
1:18:43Admire our moonlight
🏃
1:19:31Toggle off LIGHTING_USE_GRID
1:19:31Toggle off LIGHTING_USE_GRID
1:19:31Toggle off LIGHTING_USE_GRID
1:19:55Determine to remove the lighting_box storage from lighting_solution
🏃
1:19:55Determine to remove the lighting_box storage from lighting_solution
🏃
1:19:55Determine to remove the lighting_box storage from lighting_solution
🏃
1:20:07Rename Boxes to AABBBoxes in lighting_solution, remove RootLightBoxIndex, and flow InputBoxes separately through the pipeline
1:20:07Rename Boxes to AABBBoxes in lighting_solution, remove RootLightBoxIndex, and flow InputBoxes separately through the pipeline
1:20:07Rename Boxes to AABBBoxes in lighting_solution, remove RootLightBoxIndex, and flow InputBoxes separately through the pipeline
1:30:01Hit a write access violation on the ParentBox in SplitBox()
🏃
1:30:01Hit a write access violation on the ParentBox in SplitBox()
🏃
1:30:01Hit a write access violation on the ParentBox in SplitBox()
🏃
1:30:14Make AABBBuildSpatialPartition() initialise the AABBBoxCount to 1
1:30:14Make AABBBuildSpatialPartition() initialise the AABBBoxCount to 1
1:30:14Make AABBBuildSpatialPartition() initialise the AABBBoxCount to 1
1:30:58Run successfully
🏃
1:30:58Run successfully
🏃
1:30:58Run successfully
🏃
1:31:06Add a toggle between the AABB and grid ray caster data in lighting_solution
1:31:06Add a toggle between the AABB and grid ray caster data in lighting_solution
1:31:06Add a toggle between the AABB and grid ray caster data in lighting_solution
1:33:19Run successfully
🏃
1:33:19Run successfully
🏃
1:33:19Run successfully
🏃
1:33:41Build in -O2
1:33:41Build in -O2
1:33:41Build in -O2
1:33:48Run successfully
🏃
1:33:48Run successfully
🏃
1:33:48Run successfully
🏃
1:34:08Change the DebugLines in lighting_solution to be allocated
1:34:08Change the DebugLines in lighting_solution to be allocated
1:34:08Change the DebugLines in lighting_solution to be allocated
1:37:41Run successfully
🏃
1:37:41Run successfully
🏃
1:37:41Run successfully
🏃
1:38:00Consider further areas for cleanup
📖
1:38:00Consider further areas for cleanup
📖
1:38:00Consider further areas for cleanup
📖
1:42:22Introduce lighting_update_params
1:42:22Introduce lighting_update_params
1:42:22Introduce lighting_update_params
1:45:35Plan to split the lighting_solution into pieces
1:45:35Plan to split the lighting_solution into pieces
1:45:35Plan to split the lighting_solution into pieces
1:48:44Q&A
🗩
1:48:44Q&A
🗩
1:48:44Q&A
🗩
1:49:18somebody_took_my_name Q: Is the MaxNodeIndex supposed to be in bounds or one past the bound?
🗪
1:49:18somebody_took_my_name Q: Is the MaxNodeIndex supposed to be in bounds or one past the bound?
🗪
1:49:18somebody_took_my_name Q: Is the MaxNodeIndex supposed to be in bounds or one past the bound?
🗪
1:50:10guybru5h_vi Q: Does the lighting solution support direct lighting like the sun / moon?
🗪
1:50:10guybru5h_vi Q: Does the lighting solution support direct lighting like the sun / moon?
🗪
1:50:10guybru5h_vi Q: Does the lighting solution support direct lighting like the sun / moon?
🗪
1:51:15bulmanator Q: Are you doing this on the CPU purely for educational reasons or is there something else?
🗪
1:51:15bulmanator Q: Are you doing this on the CPU purely for educational reasons or is there something else?
🗪
1:51:15bulmanator Q: Are you doing this on the CPU purely for educational reasons or is there something else?
🗪
1:53:26billdstrong Q: We can put mirrors in every level like Labyrinth
🗪
1:53:26billdstrong Q: We can put mirrors in every level like Labyrinth
🗪
1:53:26billdstrong Q: We can put mirrors in every level like Labyrinth
🗪
1:54:33mindmark42 Q: Can you at some point go over the AVX scatter gather intrinsics?1
🗪
1:54:33mindmark42 Q: Can you at some point go over the AVX scatter gather intrinsics?1
🗪
1:54:33mindmark42 Q: Can you at some point go over the AVX scatter gather intrinsics?1
🗪
1:59:38poikonomo Q: Do you have an idea of how the gameplay will look like or will you wait to finish the engine before getting to it?
🗪
1:59:38poikonomo Q: Do you have an idea of how the gameplay will look like or will you wait to finish the engine before getting to it?
🗪
1:59:38poikonomo Q: Do you have an idea of how the gameplay will look like or will you wait to finish the engine before getting to it?
🗪
2:00:08stuntcoder Q: (Off-topic) On earlier streams you have trouble with RSI. After decades of typing, I too have RSI. Any tips?
🗪
2:00:08stuntcoder Q: (Off-topic) On earlier streams you have trouble with RSI. After decades of typing, I too have RSI. Any tips?
🗪
2:00:08stuntcoder Q: (Off-topic) On earlier streams you have trouble with RSI. After decades of typing, I too have RSI. Any tips?
🗪
2:01:24dolseth Q: Probably covered in some other day, but what's the best update-rate to choose for a game? Jon says it's good to have it high so it looks good on high-update screens, but 120 FPS isn't a multiple of 144 FPS. So what do you recommend?
🗪
2:01:24dolseth Q: Probably covered in some other day, but what's the best update-rate to choose for a game? Jon says it's good to have it high so it looks good on high-update screens, but 120 FPS isn't a multiple of 144 FPS. So what do you recommend?
🗪
2:01:24dolseth Q: Probably covered in some other day, but what's the best update-rate to choose for a game? Jon says it's good to have it high so it looks good on high-update screens, but 120 FPS isn't a multiple of 144 FPS. So what do you recommend?
🗪
2:04:20cleffing Q: Why not take a stab at game design when it's done? Just not interested?
🗪
2:04:20cleffing Q: Why not take a stab at game design when it's done? Just not interested?
🗪
2:04:20cleffing Q: Why not take a stab at game design when it's done? Just not interested?
🗪
2:05:08Thank you, everybody
🗩
2:05:08Thank you, everybody
🗩
2:05:08Thank you, everybody
🗩