Debugging the Raycaster
?
?

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:01Welcome to Handmade Coffee, roasted by Irad1 and presented to Casey at Handmade Seattle
🗩
0:01Welcome to Handmade Coffee, roasted by Irad1 and presented to Casey at Handmade Seattle
🗩
0:01Welcome to Handmade Coffee, roasted by Irad1 and presented to Casey at Handmade Seattle
🗩
3:05Demo the current state of our raycast lighting
🏃
3:05Demo the current state of our raycast lighting
🏃
3:05Demo the current state of our raycast lighting
🏃
8:13Cursorily reacquaint ourselves with EndLightingComputation()
📖
8:13Cursorily reacquaint ourselves with EndLightingComputation()
📖
8:13Cursorily reacquaint ourselves with EndLightingComputation()
📖
8:54Switch from TEST_LIGHT_TRANSFER to TEST_LIGHT_SPHERE in EndLightingComputation()
8:54Switch from TEST_LIGHT_TRANSFER to TEST_LIGHT_SPHERE in EndLightingComputation()
8:54Switch from TEST_LIGHT_TRANSFER to TEST_LIGHT_SPHERE in EndLightingComputation()
9:05Admire our radial falloff lighting solution, mixing four lights
🏃
9:05Admire our radial falloff lighting solution, mixing four lights
🏃
9:05Admire our radial falloff lighting solution, mixing four lights
🏃
11:42Switch from TEST_LIGHT_SPHERE to TEST_LIGHT_TRANSFER in EndLightingComputation(), and let it assume that all rays hit light sources
11:42Switch from TEST_LIGHT_SPHERE to TEST_LIGHT_TRANSFER in EndLightingComputation(), and let it assume that all rays hit light sources
11:42Switch from TEST_LIGHT_SPHERE to TEST_LIGHT_TRANSFER in EndLightingComputation(), and let it assume that all rays hit light sources
12:44Admire our voxel-to-voxel interpolation
🏃
12:44Admire our voxel-to-voxel interpolation
🏃
12:44Admire our voxel-to-voxel interpolation
🏃
13:25Make EndLightingComputation() draw a simple shadow if a light source is found to be occluded
13:25Make EndLightingComputation() draw a simple shadow if a light source is found to be occluded
13:25Make EndLightingComputation() draw a simple shadow if a light source is found to be occluded
14:54See our anomalous shadows
🏃
14:54See our anomalous shadows
🏃
14:54See our anomalous shadows
🏃
15:35Toggle on the ray cast debug lines in EndLightingComputation()
15:35Toggle on the ray cast debug lines in EndLightingComputation()
15:35Toggle on the ray cast debug lines in EndLightingComputation()
15:56See our rays
🏃
15:56See our rays
🏃
15:56See our rays
🏃
16:28Note that we are drawing a subset of 8³ out of 32³ rays
📖
16:28Note that we are drawing a subset of 8³ out of 32³ rays
📖
16:28Note that we are drawing a subset of 8³ out of 32³ rays
📖
18:44Disable lighting in CompileZBiasProgram()
18:44Disable lighting in CompileZBiasProgram()
18:44Disable lighting in CompileZBiasProgram()
19:14Look at our rays in bright light, to see some which hit non-obvious objects
🏃
19:14Look at our rays in bright light, to see some which hit non-obvious objects
🏃
19:14Look at our rays in bright light, to see some which hit non-obvious objects
🏃
22:52Make EndLightingComputation() draw all the rays, coloured black if no hit, and yellow if hit
22:52Make EndLightingComputation() draw all the rays, coloured black if no hit, and yellow if hit
22:52Make EndLightingComputation() draw all the rays, coloured black if no hit, and yellow if hit
25:34Begin to reacquaint ourselves with RayCast()
📖
25:34Begin to reacquaint ourselves with RayCast()
📖
25:34Begin to reacquaint ourselves with RayCast()
📖
27:43Prevent RayCast() from initialising NegativeOne
27:43Prevent RayCast() from initialising NegativeOne
27:43Prevent RayCast() from initialising NegativeOne
28:06Continue to reacquaint ourselves with RayCast()
📖
28:06Continue to reacquaint ourselves with RayCast()
📖
28:06Continue to reacquaint ourselves with RayCast()
📖
36:56Consider making RayCast() base tCloseEnough on the particular box, such that boxes at the root of the hierarchy are more likely to be entered than boxes near the leaves
36:56Consider making RayCast() base tCloseEnough on the particular box, such that boxes at the root of the hierarchy are more likely to be entered than boxes near the leaves
36:56Consider making RayCast() base tCloseEnough on the particular box, such that boxes at the root of the hierarchy are more likely to be entered than boxes near the leaves
39:31Continue to reacquaint ourselves with RayCast()
📖
39:31Continue to reacquaint ourselves with RayCast()
📖
39:31Continue to reacquaint ourselves with RayCast()
📖
41:34Address the old early-out condition in RayCast() when all four rays hit
📖
41:34Address the old early-out condition in RayCast() when all four rays hit
📖
41:34Address the old early-out condition in RayCast() when all four rays hit
📖
44:11Delete the old all-hit early-out condition in RayCast(), and restrict the Box push to ones whose closest point it also closer than the current tRay
44:11Delete the old all-hit early-out condition in RayCast(), and restrict the Box push to ones whose closest point it also closer than the current tRay
44:11Delete the old all-hit early-out condition in RayCast(), and restrict the Box push to ones whose closest point it also closer than the current tRay
48:24Finish reacquainting ourselves with RayCast()
📖
48:24Finish reacquainting ourselves with RayCast()
📖
48:24Finish reacquainting ourselves with RayCast()
📖
50:41Look at our rays, and pick a problem one to isolate
🏃
50:41Look at our rays, and pick a problem one to isolate
🏃
50:41Look at our rays, and pick a problem one to isolate
🏃
51:56Try to isolate our problem ray in EndLightingComputation()
51:56Try to isolate our problem ray in EndLightingComputation()
51:56Try to isolate our problem ray in EndLightingComputation()
53:40See that we picked the wrong ray
🏃
53:40See that we picked the wrong ray
🏃
53:40See that we picked the wrong ray
🏃
53:59Fix our ray isolation in EndLightingComputation()
53:59Fix our ray isolation in EndLightingComputation()
53:59Fix our ray isolation in EndLightingComputation()
54:11See that we picked our desired problem ray
🏃
54:11See that we picked our desired problem ray
🏃
54:11See that we picked our desired problem ray
🏃
54:25Add a BreakMePlease in EndLightingComputation()
54:25Add a BreakMePlease in EndLightingComputation()
54:25Add a BreakMePlease in EndLightingComputation()
55:03Break on our BreakMePlease in EndLightingComputation() and inspect our test case
🏃
55:03Break on our BreakMePlease in EndLightingComputation() and inspect our test case
🏃
55:03Break on our BreakMePlease in EndLightingComputation() and inspect our test case
🏃
58:17Make RayCast() initialise AnyInside and AnyCloseEnough
58:17Make RayCast() initialise AnyInside and AnyCloseEnough
58:17Make RayCast() initialise AnyInside and AnyCloseEnough
59:25Break on our BreakMePlease in EndLightingComputation() and step through to RayCast()
🏃
59:25Break on our BreakMePlease in EndLightingComputation() and step through to RayCast()
🏃
59:25Break on our BreakMePlease in EndLightingComputation() and step through to RayCast()
🏃
1:00:03Consider starting our camera at a known good location
🗩
1:00:03Consider starting our camera at a known good location
🗩
1:00:03Consider starting our camera at a known good location
🗩
1:01:05Break on our BreakMePlease in EndLightingComputation(), skip the first frame, step through to RayCast() and inspect our test case
🏃
1:01:05Break on our BreakMePlease in EndLightingComputation(), skip the first frame, step through to RayCast() and inspect our test case
🏃
1:01:05Break on our BreakMePlease in EndLightingComputation(), skip the first frame, step through to RayCast() and inspect our test case
🏃
1:08:47Our ray cast bug possibilities: 1) Erroneous box, correctly hit tested; 2) Correct box, erroneously hit tested
🏃
1:08:47Our ray cast bug possibilities: 1) Erroneous box, correctly hit tested; 2) Correct box, erroneously hit tested
🏃
1:08:47Our ray cast bug possibilities: 1) Erroneous box, correctly hit tested; 2) Correct box, erroneously hit tested
🏃
1:10:27Enable RayCast() to draw its boxes, initially one ring of each
1:10:27Enable RayCast() to draw its boxes, initially one ring of each
1:10:27Enable RayCast() to draw its boxes, initially one ring of each
1:16:33Launch our debug build and see no ray cast box
🏃
1:16:33Launch our debug build and see no ray cast box
🏃
1:16:33Launch our debug build and see no ray cast box
🏃
1:17:05Make EndLightingComputation() pass IsTestCast to RayCast()
1:17:05Make EndLightingComputation() pass IsTestCast to RayCast()
1:17:05Make EndLightingComputation() pass IsTestCast to RayCast()
1:17:39Check out our ray cast boxes
🏃
1:17:39Check out our ray cast boxes
🏃
1:17:39Check out our ray cast boxes
🏃
1:18:08Make RayCast() draw the opposite ring of the boxes
1:18:08Make RayCast() draw the opposite ring of the boxes
1:18:08Make RayCast() draw the opposite ring of the boxes
1:18:25Check out our ray cast boxes
🏃
1:18:25Check out our ray cast boxes
🏃
1:18:25Check out our ray cast boxes
🏃
1:19:04Make RayCast() draw the final edges of its boxes
1:19:04Make RayCast() draw the final edges of its boxes
1:19:04Make RayCast() draw the final edges of its boxes
1:19:47Check out our complete ray cast boxes
🏃
1:19:47Check out our complete ray cast boxes
🏃
1:19:47Check out our complete ray cast boxes
🏃
1:21:29Make RayCast() colour hit boxes cyan if they are containers, and yellow if not
1:21:29Make RayCast() colour hit boxes cyan if they are containers, and yellow if not
1:21:29Make RayCast() colour hit boxes cyan if they are containers, and yellow if not
1:22:45Check out our ray cast boxes, noting the erroneously placed box, and the fact that our light probes are considered colliders
🏃
1:22:45Check out our ray cast boxes, noting the erroneously placed box, and the fact that our light probes are considered colliders
🏃
1:22:45Check out our ray cast boxes, noting the erroneously placed box, and the fact that our light probes are considered colliders
🏃
1:23:41Prevent light probes from being considered colliders, introducing PushOccluder() to perform the occlusion code from PushCube()
1:23:41Prevent light probes from being considered colliders, introducing PushOccluder() to perform the occlusion code from PushCube()
1:23:41Prevent light probes from being considered colliders, introducing PushOccluder() to perform the occlusion code from PushCube()
1:29:01Check out our ray cast boxes, to see that our bad case has disappeared
🏃
1:29:01Check out our ray cast boxes, to see that our bad case has disappeared
🏃
1:29:01Check out our ray cast boxes, to see that our bad case has disappeared
🏃
1:30:02Enable lighting in CompileZBiasProgram()
1:30:02Enable lighting in CompileZBiasProgram()
1:30:02Enable lighting in CompileZBiasProgram()
1:30:22See black
🏃
1:30:22See black
🏃
1:30:22See black
🏃
1:30:57Make EndLightingComputation() draw a simple shadow if a light source is found to be occluded
1:30:57Make EndLightingComputation() draw a simple shadow if a light source is found to be occluded
1:30:57Make EndLightingComputation() draw a simple shadow if a light source is found to be occluded
1:31:24See different erroneous shadows
🏃
1:31:24See different erroneous shadows
🏃
1:31:24See different erroneous shadows
🏃
1:32:28Make EndLightingComputation() draw all our rays
1:32:28Make EndLightingComputation() draw all our rays
1:32:28Make EndLightingComputation() draw all our rays
1:33:12See some black (non-hitting) rays that apparently should be hitting something
🏃
1:33:12See some black (non-hitting) rays that apparently should be hitting something
🏃
1:33:12See some black (non-hitting) rays that apparently should be hitting something
🏃
1:34:07Disable lighting in CompileZBiasProgram()
1:34:07Disable lighting in CompileZBiasProgram()
1:34:07Disable lighting in CompileZBiasProgram()
1:34:44Try to pick a problem ray
🏃
1:34:44Try to pick a problem ray
🏃
1:34:44Try to pick a problem ray
🏃
1:37:28Make EndLightingComputation() just draw a tick mark at the casting locations
1:37:28Make EndLightingComputation() just draw a tick mark at the casting locations
1:37:28Make EndLightingComputation() just draw a tick mark at the casting locations
1:39:09Check out our casting locations
🏃
1:39:09Check out our casting locations
🏃
1:39:09Check out our casting locations
🏃
1:39:32Make EndLightingComputation() colour the tick marks cyan, and draw the rays themselves
1:39:32Make EndLightingComputation() colour the tick marks cyan, and draw the rays themselves
1:39:32Make EndLightingComputation() colour the tick marks cyan, and draw the rays themselves
1:40:14See some tick marks lacking a ray, and vice versa
🏃
1:40:14See some tick marks lacking a ray, and vice versa
🏃
1:40:14See some tick marks lacking a ray, and vice versa
🏃
1:41:17Make EndLightingComputation() draw the direction in which each ray is pointing
1:41:17Make EndLightingComputation() draw the direction in which each ray is pointing
1:41:17Make EndLightingComputation() draw the direction in which each ray is pointing
1:42:15Again see some tick marks lacking a ray, and vice versa
🏃
1:42:15Again see some tick marks lacking a ray, and vice versa
🏃
1:42:15Again see some tick marks lacking a ray, and vice versa
🏃
1:42:58Wonder what could be wrong with our rays
📖
1:42:58Wonder what could be wrong with our rays
📖
1:42:58Wonder what could be wrong with our rays
📖
1:43:54Pick a problem ray to isolate
🏃
1:43:54Pick a problem ray to isolate
🏃
1:43:54Pick a problem ray to isolate
🏃
1:44:47Try to isolate our problem ray in EndLightingComputation()
1:44:47Try to isolate our problem ray in EndLightingComputation()
1:44:47Try to isolate our problem ray in EndLightingComputation()
1:44:57See that we picked our desired problem ray
🏃
1:44:57See that we picked our desired problem ray
🏃
1:44:57See that we picked our desired problem ray
🏃
1:46:07Break on our BreakMePlease in EndLightingComputation(), and inspect our Cast to see that FLT_MAX may be causing the problem
🏃
1:46:07Break on our BreakMePlease in EndLightingComputation(), and inspect our Cast to see that FLT_MAX may be causing the problem
🏃
1:46:07Break on our BreakMePlease in EndLightingComputation(), and inspect our Cast to see that FLT_MAX may be causing the problem
🏃
1:47:02Change EndLightingComputation() to set the CastP of non-hit rays to the light distance
1:47:02Change EndLightingComputation() to set the CastP of non-hit rays to the light distance
1:47:02Change EndLightingComputation() to set the CastP of non-hit rays to the light distance
1:48:53See that our problem ray's check mark is now accompanied by its actual ray, and that it remains a problem ray
🏃
1:48:53See that our problem ray's check mark is now accompanied by its actual ray, and that it remains a problem ray
🏃
1:48:53See that our problem ray's check mark is now accompanied by its actual ray, and that it remains a problem ray
🏃
1:49:22Make EndLightingComputation() pass IsTestCast to RayCast()
1:49:22Make EndLightingComputation() pass IsTestCast to RayCast()
1:49:22Make EndLightingComputation() pass IsTestCast to RayCast()
1:49:30See that our RayCast() failed to test the child boxes through which our ray passes
🏃
1:49:30See that our RayCast() failed to test the child boxes through which our ray passes
🏃
1:49:30See that our RayCast() failed to test the child boxes through which our ray passes
🏃
1:50:12Make RayCast() push all the child boxes into the system
1:50:12Make RayCast() push all the child boxes into the system
1:50:12Make RayCast() push all the child boxes into the system
1:50:42See that we do correctly detect the intersection
🏃
1:50:42See that we do correctly detect the intersection
🏃
1:50:42See that we do correctly detect the intersection
🏃
1:51:33Prevent RayCast() from checking from AnyCloser before pushing on a box
1:51:33Prevent RayCast() from checking from AnyCloser before pushing on a box
1:51:33Prevent RayCast() from checking from AnyCloser before pushing on a box
1:52:17See that we do not detect the intersection
🏃
1:52:17See that we do not detect the intersection
🏃
1:52:17See that we do not detect the intersection
🏃
1:52:27Prevent RayCast() from checking from AnyCloseEnough before pushing on a box
1:52:27Prevent RayCast() from checking from AnyCloseEnough before pushing on a box
1:52:27Prevent RayCast() from checking from AnyCloseEnough before pushing on a box
1:53:02See that we do not detect the intersection
🏃
1:53:02See that we do not detect the intersection
🏃
1:53:02See that we do not detect the intersection
🏃
1:53:09Scrutinise the AnyInside value in RayCast()
📖
1:53:09Scrutinise the AnyInside value in RayCast()
📖
1:53:09Scrutinise the AnyInside value in RayCast()
📖
1:55:34Let RayCast() push on a box if AnyInside or AnyCloser
1:55:34Let RayCast() push on a box if AnyInside or AnyCloser
1:55:34Let RayCast() push on a box if AnyInside or AnyCloser
1:56:14See that we do not detect the intersection
🏃
1:56:14See that we do not detect the intersection
🏃
1:56:14See that we do not detect the intersection
🏃
1:56:44Make RayCast() extend tInside to encompass FLT_MAX
1:56:44Make RayCast() extend tInside to encompass FLT_MAX
1:56:44Make RayCast() extend tInside to encompass FLT_MAX
1:57:08See that we do correctly detect the intersection
🏃
1:57:08See that we do correctly detect the intersection
🏃
1:57:08See that we do correctly detect the intersection
🏃
1:57:23Restore our full checks in EndLightingComputation() before pushing a box
1:57:23Restore our full checks in EndLightingComputation() before pushing a box
1:57:23Restore our full checks in EndLightingComputation() before pushing a box
1:57:40Look at our correct ray
🏃
1:57:40Look at our correct ray
🏃
1:57:40Look at our correct ray
🏃
1:57:49Make EndLightingComputation() draw all our rays, without boxes
1:57:49Make EndLightingComputation() draw all our rays, without boxes
1:57:49Make EndLightingComputation() draw all our rays, without boxes
1:58:23Find that our rays look a little more sane
🏃
1:58:23Find that our rays look a little more sane
🏃
1:58:23Find that our rays look a little more sane
🏃
1:59:16Disable the test drawing in EndLightingComputation(), and enable lighting in CompileZBiasProgram()
1:59:16Disable the test drawing in EndLightingComputation(), and enable lighting in CompileZBiasProgram()
1:59:16Disable the test drawing in EndLightingComputation(), and enable lighting in CompileZBiasProgram()
2:00:22See our shadows, and determine to cast rays from light probe points
🏃
2:00:22See our shadows, and determine to cast rays from light probe points
🏃
2:00:22See our shadows, and determine to cast rays from light probe points
🏃
2:01:20Make EndLightingComputation() draw all our rays
2:01:20Make EndLightingComputation() draw all our rays
2:01:20Make EndLightingComputation() draw all our rays
2:01:37Admire our rays in the lit scene
🏃
2:01:37Admire our rays in the lit scene
🏃
2:01:37Admire our rays in the lit scene
🏃
2:02:31Q&A
🗩
2:02:31Q&A
🗩
2:02:31Q&A
🗩
2:03:48eerrman1 Q: Where did you learn programming, like this lighting stuff, previously?
🗪
2:03:48eerrman1 Q: Where did you learn programming, like this lighting stuff, previously?
🗪
2:03:48eerrman1 Q: Where did you learn programming, like this lighting stuff, previously?
🗪
2:06:53smack_ssbm Q: Which parts of the CRT do you think are the most poorly designed or unnecessary? What do you feel is missing?
🗪
2:06:53smack_ssbm Q: Which parts of the CRT do you think are the most poorly designed or unnecessary? What do you feel is missing?
🗪
2:06:53smack_ssbm Q: Which parts of the CRT do you think are the most poorly designed or unnecessary? What do you feel is missing?
🗪
2:09:15euphius Q: Did you learn new things about game programming while working on Handmade Hero? If yes, what?
🗪
2:09:15euphius Q: Did you learn new things about game programming while working on Handmade Hero? If yes, what?
🗪
2:09:15euphius Q: Did you learn new things about game programming while working on Handmade Hero? If yes, what?
🗪
2:10:36ablindorphan Q: Can you imagine any debug tools that would make stuff like graphics programming and lighting easier to debug (especially for beginners)?
🗪
2:10:36ablindorphan Q: Can you imagine any debug tools that would make stuff like graphics programming and lighting easier to debug (especially for beginners)?
🗪
2:10:36ablindorphan Q: Can you imagine any debug tools that would make stuff like graphics programming and lighting easier to debug (especially for beginners)?
🗪
2:15:35bulmanator Q: Is it possible to get cl.exe and msbuild without installing Visual Studio?
🗪
2:15:35bulmanator Q: Is it possible to get cl.exe and msbuild without installing Visual Studio?
🗪
2:15:35bulmanator Q: Is it possible to get cl.exe and msbuild without installing Visual Studio?
🗪
2:16:07enemypanda Q: How do you split your time between learning theory and practice?
🗪
2:16:07enemypanda Q: How do you split your time between learning theory and practice?
🗪
2:16:07enemypanda Q: How do you split your time between learning theory and practice?
🗪
2:16:37erik_ava Q: How many hours did you expect Handmade Hero was going to be at the start?
🗪
2:16:37erik_ava Q: How many hours did you expect Handmade Hero was going to be at the start?
🗪
2:16:37erik_ava Q: How many hours did you expect Handmade Hero was going to be at the start?
🗪
2:18:30mariaberry Q: Are you planning to do another series after you're done with Handmade Hero?
🗪
2:18:30mariaberry Q: Are you planning to do another series after you're done with Handmade Hero?
🗪
2:18:30mariaberry Q: Are you planning to do another series after you're done with Handmade Hero?
🗪
2:18:34enemypanda Q: Any plans for physics?
🗪
2:18:34enemypanda Q: Any plans for physics?
🗪
2:18:34enemypanda Q: Any plans for physics?
🗪
2:18:49Wrap it up
🗩
2:18:49Wrap it up
🗩
2:18:49Wrap it up
🗩