Starting Raycast Optimizations
?
?

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:02Welcome to the stream with a plug of the post-stream stream on Jon Blow's channel1
0:02Welcome to the stream with a plug of the post-stream stream on Jon Blow's channel1
0:02Welcome to the stream with a plug of the post-stream stream on Jon Blow's channel1
1:45Demo our stochastically sampled lighting, with the determination to optimise the ray caster
🏃
1:45Demo our stochastically sampled lighting, with the determination to optimise the ray caster
🏃
1:45Demo our stochastically sampled lighting, with the determination to optimise the ray caster
🏃
4:28Check the lighting performance statistics
🏃
4:28Check the lighting performance statistics
🏃
4:28Check the lighting performance statistics
🏃
6:53Calculate our ray casting cycle budget: 2000 cycles per cast
🗹
6:53Calculate our ray casting cycle budget: 2000 cycles per cast
🗹
6:53Calculate our ray casting cycle budget: 2000 cycles per cast
🗹
9:06Consider our scope for optimising RayCast()
📖
9:06Consider our scope for optimising RayCast()
📖
9:06Consider our scope for optimising RayCast()
📖
11:04Comment out two unwanted ifs from RayCast()
11:04Comment out two unwanted ifs from RayCast()
11:04Comment out two unwanted ifs from RayCast()
11:23~350k cycles (70% frame time) spent in 6144 calls to FullCast()
🏃
11:23~350k cycles (70% frame time) spent in 6144 calls to FullCast()
🏃
11:23~350k cycles (70% frame time) spent in 6144 calls to FullCast()
🏃
14:09Make ComputeLightPropagationWork() call the ray caster in a checkerboard pattern
14:09Make ComputeLightPropagationWork() call the ray caster in a checkerboard pattern
14:09Make ComputeLightPropagationWork() call the ray caster in a checkerboard pattern
16:48Check out our lighting
🏃
16:48Check out our lighting
🏃
16:48Check out our lighting
🏃
17:19Toggle on the light maps viewers in OpenGLEndFrame()
17:19Toggle on the light maps viewers in OpenGLEndFrame()
17:19Toggle on the light maps viewers in OpenGLEndFrame()
17:41Check out the light maps
🏃
17:41Check out the light maps
🏃
17:41Check out the light maps
🏃
18:00Make OpenGLChangeToSettings() zoom out of the light maps
18:00Make OpenGLChangeToSettings() zoom out of the light maps
18:00Make OpenGLChangeToSettings() zoom out of the light maps
18:44Check out the light maps
🏃
18:44Check out the light maps
🏃
18:44Check out the light maps
🏃
19:09Double-check out checkerboard code in ComputeLightPropagationWork()
📖
19:09Double-check out checkerboard code in ComputeLightPropagationWork()
📖
19:09Double-check out checkerboard code in ComputeLightPropagationWork()
📖
20:01Consider our checkerboard to be correct
🏃
20:01Consider our checkerboard to be correct
🏃
20:01Consider our checkerboard to be correct
🏃
20:26Make ComputeLightPropagationWork() checkerboard the ray caster calls in X
20:26Make ComputeLightPropagationWork() checkerboard the ray caster calls in X
20:26Make ComputeLightPropagationWork() checkerboard the ray caster calls in X
21:06Check out the checkerboard light maps
🏃
21:06Check out the checkerboard light maps
🏃
21:06Check out the checkerboard light maps
🏃
21:34Make ComputeLightPropagationWork() flip the checkerboard mode each frame
21:34Make ComputeLightPropagationWork() flip the checkerboard mode each frame
21:34Make ComputeLightPropagationWork() flip the checkerboard mode each frame
23:03~175k cycles (62% frame time) spent in 3072 calls to FullCast()
🏃
23:03~175k cycles (62% frame time) spent in 3072 calls to FullCast()
🏃
23:03~175k cycles (62% frame time) spent in 3072 calls to FullCast()
🏃
23:59Make OpenGLChangeToSettings() zoom in to the light maps, and toggle them off in OpenGLEndFrame()
23:59Make OpenGLChangeToSettings() zoom in to the light maps, and toggle them off in OpenGLEndFrame()
23:59Make OpenGLChangeToSettings() zoom in to the light maps, and toggle them off in OpenGLEndFrame()
24:19Admire our lighting
🏃
24:19Admire our lighting
🏃
24:19Admire our lighting
🏃
24:46xxthebigfoxx This makes the propagation twice as slow, though, right?
🗪
24:46xxthebigfoxx This makes the propagation twice as slow, though, right?
🗪
24:46xxthebigfoxx This makes the propagation twice as slow, though, right?
🗪
26:03Consider our scope for optimising RayCast(): Casting against bundles of boxes
📖
26:03Consider our scope for optimising RayCast(): Casting against bundles of boxes
📖
26:03Consider our scope for optimising RayCast(): Casting against bundles of boxes
📖
31:42Ray cast against bundles of boxes, respecifying RayCast() as BoxWiseRayCast() and introducing lighting_box_4x
31:42Ray cast against bundles of boxes, respecifying RayCast() as BoxWiseRayCast() and introducing lighting_box_4x
31:42Ray cast against bundles of boxes, respecifying RayCast() as BoxWiseRayCast() and introducing lighting_box_4x
36:29Consider how best to determine whether to push a box onto the stack or record a hit
📖
36:29Consider how best to determine whether to push a box onto the stack or record a hit
📖
36:29Consider how best to determine whether to push a box onto the stack or record a hit
📖
40:27Spec out the box bundle pushing in BoxWiseRayCast(), written to hopefully generate a conditional move
40:27Spec out the box bundle pushing in BoxWiseRayCast(), written to hopefully generate a conditional move
40:27Spec out the box bundle pushing in BoxWiseRayCast(), written to hopefully generate a conditional move
44:46Consider approaching box-bundle ray casting another way
📖
44:46Consider approaching box-bundle ray casting another way
📖
44:46Consider approaching box-bundle ray casting another way
📖
46:48Consider turning this into a codex-style problem: Writing what we can do, then encoding a hierarchy that accommodates what we've written
📖
46:48Consider turning this into a codex-style problem: Writing what we can do, then encoding a hierarchy that accommodates what we've written
📖
46:48Consider turning this into a codex-style problem: Writing what we can do, then encoding a hierarchy that accommodates what we've written
📖
51:10Try making BoxWiseRayCast() always load 4-wide, and set a mask as it descends the box hierarchy, introducing light_box_stack_entry
51:10Try making BoxWiseRayCast() always load 4-wide, and set a mask as it descends the box hierarchy, introducing light_box_stack_entry
51:10Try making BoxWiseRayCast() always load 4-wide, and set a mask as it descends the box hierarchy, introducing light_box_stack_entry
55:12Consider what the mask gains us
📖
55:12Consider what the mask gains us
📖
55:12Consider what the mask gains us
📖
56:40Write our dream version of box-bundle ray casting
56:40Write our dream version of box-bundle ray casting
56:40Write our dream version of box-bundle ray casting
57:30Consider how to push the boxes most efficiently
📖
57:30Consider how to push the boxes most efficiently
📖
57:30Consider how to push the boxes most efficiently
📖
58:43Work through efficient box bundle pushing in BoxWiseRayCast(), removing light_box_stack_entry and augmenting lighting_box with IsLight_IsLeafContainer
58:43Work through efficient box bundle pushing in BoxWiseRayCast(), removing light_box_stack_entry and augmenting lighting_box with IsLight_IsLeafContainer
58:43Work through efficient box bundle pushing in BoxWiseRayCast(), removing light_box_stack_entry and augmenting lighting_box with IsLight_IsLeafContainer
1:08:1120ms per frame, without ray casting
🏃
1:08:1120ms per frame, without ray casting
🏃
1:08:1120ms per frame, without ray casting
🏃
1:08:41Make SplitBox() set IsLight_IsLeafContainer
1:08:41Make SplitBox() set IsLight_IsLeafContainer
1:08:41Make SplitBox() set IsLight_IsLeafContainer
1:11:58The ray casting doesn't fully happen
🏃
1:11:58The ray casting doesn't fully happen
🏃
1:11:58The ray casting doesn't fully happen
🏃
1:12:25Scour SplitBox() for possible bugs
📖
1:12:25Scour SplitBox() for possible bugs
📖
1:12:25Scour SplitBox() for possible bugs
📖
1:14:07Check the lighting performance statistics: 0 TotalPartitionsTested, 0 TotalPartitionLeavesUsed
🏃
1:14:07Check the lighting performance statistics: 0 TotalPartitionsTested, 0 TotalPartitionLeavesUsed
🏃
1:14:07Check the lighting performance statistics: 0 TotalPartitionsTested, 0 TotalPartitionLeavesUsed
🏃
1:14:25Scour RayCast() for possible bugs
📖
1:14:25Scour RayCast() for possible bugs
📖
1:14:25Scour RayCast() for possible bugs
📖
1:15:50Step in to RayCast(), wondering if RemedyBG can freeze threads
🏃
1:15:50Step in to RayCast(), wondering if RemedyBG can freeze threads
🏃
1:15:50Step in to RayCast(), wondering if RemedyBG can freeze threads
🏃
1:16:35Disable multithreading in EndLightingComputation()
1:16:35Disable multithreading in EndLightingComputation()
1:16:35Disable multithreading in EndLightingComputation()
1:17:00Step in to RayCast(), see TotalPartitionsTested increment on the first frame, but not on subsequent frames
🏃
1:17:00Step in to RayCast(), see TotalPartitionsTested increment on the first frame, but not on subsequent frames
🏃
1:17:00Step in to RayCast(), see TotalPartitionsTested increment on the first frame, but not on subsequent frames
🏃
1:21:14Enable SplitBox() to unset LightBox_IsLeafContainer if it did split
1:21:14Enable SplitBox() to unset LightBox_IsLeafContainer if it did split
1:21:14Enable SplitBox() to unset LightBox_IsLeafContainer if it did split
1:22:3050ms per frame, single-threaded, with a correctly lit world
🏃
1:22:3050ms per frame, single-threaded, with a correctly lit world
🏃
1:22:3050ms per frame, single-threaded, with a correctly lit world
🏃
1:23:08Enable multithreading in EndLightingComputation()
1:23:08Enable multithreading in EndLightingComputation()
1:23:08Enable multithreading in EndLightingComputation()
1:23:1820ms per frame, with a correctly lit world
🏃
1:23:1820ms per frame, with a correctly lit world
🏃
1:23:1820ms per frame, with a correctly lit world
🏃
1:25:25Stop timing FullCast() and ComputeLightPropagationWork()
1:25:25Stop timing FullCast() and ComputeLightPropagationWork()
1:25:25Stop timing FullCast() and ComputeLightPropagationWork()
1:26:1120ms per frame, EndLightingComputation and Frame Display vying for the top consumer spot
🏃
1:26:1120ms per frame, EndLightingComputation and Frame Display vying for the top consumer spot
🏃
1:26:1120ms per frame, EndLightingComputation and Frame Display vying for the top consumer spot
🏃
1:27:10Disable the checkerboard in ComputeLightPropagationWork()
1:27:10Disable the checkerboard in ComputeLightPropagationWork()
1:27:10Disable the checkerboard in ComputeLightPropagationWork()
1:27:2830ms per frame, 50% frame time in EndLightingComputation
🏃
1:27:2830ms per frame, 50% frame time in EndLightingComputation
🏃
1:27:2830ms per frame, 50% frame time in EndLightingComputation
🏃
1:28:07Toggle off the specular–diffuse transform in ComputeLightPropagationWork()
1:28:07Toggle off the specular–diffuse transform in ComputeLightPropagationWork()
1:28:07Toggle off the specular–diffuse transform in ComputeLightPropagationWork()
1:28:3330ms per frame, 47% frame time in Frame Display, 40% frame time in EndLightingComputation
🏃
1:28:3330ms per frame, 47% frame time in Frame Display, 40% frame time in EndLightingComputation
🏃
1:28:3330ms per frame, 47% frame time in Frame Display, 40% frame time in EndLightingComputation
🏃
1:28:44Toggle on the specular–diffuse transform in ComputeLightPropagationWork()
1:28:44Toggle on the specular–diffuse transform in ComputeLightPropagationWork()
1:28:44Toggle on the specular–diffuse transform in ComputeLightPropagationWork()
1:28:5122–30ms per frame, up to 50–70% frame time in EndLightingComputation
🏃
1:28:5122–30ms per frame, up to 50–70% frame time in EndLightingComputation
🏃
1:28:5122–30ms per frame, up to 50–70% frame time in EndLightingComputation
🏃
1:29:36Try making SplitBox() split boxes into eight
1:29:36Try making SplitBox() split boxes into eight
1:29:36Try making SplitBox() split boxes into eight
1:29:5024ms per frame, 67% frame time in EndLightingComputation
🏃
1:29:5024ms per frame, 67% frame time in EndLightingComputation
🏃
1:29:5024ms per frame, 67% frame time in EndLightingComputation
🏃
1:29:58Try making SplitBox() split boxes into two
1:29:58Try making SplitBox() split boxes into two
1:29:58Try making SplitBox() split boxes into two
1:30:0324ms per frame, 67% frame time in EndLightingComputation
🏃
1:30:0324ms per frame, 67% frame time in EndLightingComputation
🏃
1:30:0324ms per frame, 67% frame time in EndLightingComputation
🏃
1:30:07Try making SplitBox() split boxes into four
1:30:07Try making SplitBox() split boxes into four
1:30:07Try making SplitBox() split boxes into four
1:30:1124ms per frame, 67% frame time in EndLightingComputation
🏃
1:30:1124ms per frame, 67% frame time in EndLightingComputation
🏃
1:30:1124ms per frame, 67% frame time in EndLightingComputation
🏃
1:30:23Consider casting more rays, four out of the same slot
📖
1:30:23Consider casting more rays, four out of the same slot
📖
1:30:23Consider casting more rays, four out of the same slot
📖
1:31:4630ms per frame, 48% frame time in EndLightingComputation
🏃
1:31:4630ms per frame, 48% frame time in EndLightingComputation
🏃
1:31:4630ms per frame, 48% frame time in EndLightingComputation
🏃
1:31:56Toggle off the specular–diffuse transform in ComputeLightPropagationWork()
1:31:56Toggle off the specular–diffuse transform in ComputeLightPropagationWork()
1:31:56Toggle off the specular–diffuse transform in ComputeLightPropagationWork()
1:31:5830ms per frame, 44% frame time in EndLightingComputation
🏃
1:31:5830ms per frame, 44% frame time in EndLightingComputation
🏃
1:31:5830ms per frame, 44% frame time in EndLightingComputation
🏃
1:32:08Toggle on the specular–diffuse transform in ComputeLightPropagationWork()
1:32:08Toggle on the specular–diffuse transform in ComputeLightPropagationWork()
1:32:08Toggle on the specular–diffuse transform in ComputeLightPropagationWork()
1:32:1030ms per frame, 48% frame time in EndLightingComputation
🏃
1:32:1030ms per frame, 48% frame time in EndLightingComputation
🏃
1:32:1030ms per frame, 48% frame time in EndLightingComputation
🏃
1:32:26Toggle off the specular–diffuse transform in ComputeLightPropagationWork()
1:32:26Toggle off the specular–diffuse transform in ComputeLightPropagationWork()
1:32:26Toggle off the specular–diffuse transform in ComputeLightPropagationWork()
1:32:2924ms per frame
🏃
1:32:2924ms per frame
🏃
1:32:2924ms per frame
🏃
1:32:40Toggle on the specular–diffuse transform in ComputeLightPropagationWork()
1:32:40Toggle on the specular–diffuse transform in ComputeLightPropagationWork()
1:32:40Toggle on the specular–diffuse transform in ComputeLightPropagationWork()
1:32:4426ms per frame
🏃
1:32:4426ms per frame
🏃
1:32:4426ms per frame
🏃
1:33:17Decrease tUpdateBlend from 8/60 to 4/60 in EndLightingComputation()
1:33:17Decrease tUpdateBlend from 8/60 to 4/60 in EndLightingComputation()
1:33:17Decrease tUpdateBlend from 8/60 to 4/60 in EndLightingComputation()
1:33:29Check out the lighting flicker
🏃
1:33:29Check out the lighting flicker
🏃
1:33:29Check out the lighting flicker
🏃
1:33:42Decrease tUpdateBlend from 4/60 to 1/60 in EndLightingComputation()
1:33:42Decrease tUpdateBlend from 4/60 to 1/60 in EndLightingComputation()
1:33:42Decrease tUpdateBlend from 4/60 to 1/60 in EndLightingComputation()
1:33:46Check out the lighting flicker
🏃
1:33:46Check out the lighting flicker
🏃
1:33:46Check out the lighting flicker
🏃
1:33:56Increase tUpdateBlend from 1/60 to 2/60 in EndLightingComputation()
1:33:56Increase tUpdateBlend from 1/60 to 2/60 in EndLightingComputation()
1:33:56Increase tUpdateBlend from 1/60 to 2/60 in EndLightingComputation()
1:33:58Check out the lighting flicker, looking for a stable solution
🏃
1:33:58Check out the lighting flicker, looking for a stable solution
🏃
1:33:58Check out the lighting flicker, looking for a stable solution
🏃
1:34:36Increase tUpdateBlend from 2/60 to 4/60 in EndLightingComputation()
1:34:36Increase tUpdateBlend from 2/60 to 4/60 in EndLightingComputation()
1:34:36Increase tUpdateBlend from 2/60 to 4/60 in EndLightingComputation()
1:34:44Check out the lighting flicker
🏃
1:34:44Check out the lighting flicker
🏃
1:34:44Check out the lighting flicker
🏃
1:34:48Decrease tUpdateBlend from 4/60 to 2/60 in EndLightingComputation()
1:34:48Decrease tUpdateBlend from 4/60 to 2/60 in EndLightingComputation()
1:34:48Decrease tUpdateBlend from 4/60 to 2/60 in EndLightingComputation()
1:34:51Check out the lighting flicker, and consider basing the tUpdateBlend on the light's contribution
🏃
1:34:51Check out the lighting flicker, and consider basing the tUpdateBlend on the light's contribution
🏃
1:34:51Check out the lighting flicker, and consider basing the tUpdateBlend on the light's contribution
🏃
1:36:00Increase tUpdateBlend from 2/60 to 8/60 in EndLightingComputation()
1:36:00Increase tUpdateBlend from 2/60 to 8/60 in EndLightingComputation()
1:36:00Increase tUpdateBlend from 2/60 to 8/60 in EndLightingComputation()
1:36:09Check out the lighting flicker
🏃
1:36:09Check out the lighting flicker
🏃
1:36:09Check out the lighting flicker
🏃
1:36:52Try making FullCast() oversample by 4×, modifying the EntropyIndex each loop
1:36:52Try making FullCast() oversample by 4×, modifying the EntropyIndex each loop
1:36:52Try making FullCast() oversample by 4×, modifying the EntropyIndex each loop
1:38:05Check out the lighting flicker
🏃
1:38:05Check out the lighting flicker
🏃
1:38:05Check out the lighting flicker
🏃
1:38:48Set tUpdateBlend to 2/60 in FullCast()
1:38:48Set tUpdateBlend to 2/60 in FullCast()
1:38:48Set tUpdateBlend to 2/60 in FullCast()
1:39:05Admire the flicker-free lighting
🏃
1:39:05Admire the flicker-free lighting
🏃
1:39:05Admire the flicker-free lighting
🏃
1:39:43Remove the oversampling from FullCast()
🏃
1:39:43Remove the oversampling from FullCast()
🏃
1:39:43Remove the oversampling from FullCast()
🏃
1:42:23Admire the lighting
🏃
1:42:23Admire the lighting
🏃
1:42:23Admire the lighting
🏃
1:42:37Q&A
🗩
1:42:37Q&A
🗩
1:42:37Q&A
🗩
1:43:04jim0_o Q: Did you notice the instability in timing was connected to the hovering text in the debug UI? The dip seemed correlated with the cursor being on the bar indicating the dip in the debug UI. (When you left the cursor on the same bar it had the dip every time it was passed over, not sure how logical that is.)
🗪
1:43:04jim0_o Q: Did you notice the instability in timing was connected to the hovering text in the debug UI? The dip seemed correlated with the cursor being on the bar indicating the dip in the debug UI. (When you left the cursor on the same bar it had the dip every time it was passed over, not sure how logical that is.)
🗪
1:43:04jim0_o Q: Did you notice the instability in timing was connected to the hovering text in the debug UI? The dip seemed correlated with the cursor being on the bar indicating the dip in the debug UI. (When you left the cursor on the same bar it had the dip every time it was passed over, not sure how logical that is.)
🗪
1:44:20srekel Damn, the scrolling in your editor is just silky smooth, cmuratori. Is it Emacs, 4coder?
🗪
1:44:20srekel Damn, the scrolling in your editor is just silky smooth, cmuratori. Is it Emacs, 4coder?
🗪
1:44:20srekel Damn, the scrolling in your editor is just silky smooth, cmuratori. Is it Emacs, 4coder?
🗪
1:44:30elegacorp Q: What do you think causes the flickering in these lighting calculations? Folks in the chat were discussing it: Do you want the flicker that exists to be more intentional or is it there as a strange side effect of how the lighting is implemented?
🗪
1:44:30elegacorp Q: What do you think causes the flickering in these lighting calculations? Folks in the chat were discussing it: Do you want the flicker that exists to be more intentional or is it there as a strange side effect of how the lighting is implemented?
🗪
1:44:30elegacorp Q: What do you think causes the flickering in these lighting calculations? Folks in the chat were discussing it: Do you want the flicker that exists to be more intentional or is it there as a strange side effect of how the lighting is implemented?
🗪
1:46:09Integration Over Spatial Samples
🖌
1:46:09Integration Over Spatial Samples
🖌
1:46:09Integration Over Spatial Samples
🖌
1:50:03coder_gimmic Q: As previously mentioned in chat, both isLight and IsLeafContainer were 0x1
🗪
1:50:03coder_gimmic Q: As previously mentioned in chat, both isLight and IsLeafContainer were 0x1
🗪
1:50:03coder_gimmic Q: As previously mentioned in chat, both isLight and IsLeafContainer were 0x1
🗪
1:50:17Fix LightBox_IsLight to be 0x2
1:50:17Fix LightBox_IsLight to be 0x2
1:50:17Fix LightBox_IsLight to be 0x2
1:51:05philoez98 Q: Talking about character movement, will we implement a transaction system, something like Jon's?
🗪
1:51:05philoez98 Q: Talking about character movement, will we implement a transaction system, something like Jon's?
🗪
1:51:05philoez98 Q: Talking about character movement, will we implement a transaction system, something like Jon's?
🗪
1:52:45Check Jon's status2
1:52:45Check Jon's status2
1:52:45Check Jon's status2
1:53:47fcatalan Q: Is this already the best lit 2-but-3D game in the whole history of gaming?
🗪
1:53:47fcatalan Q: Is this already the best lit 2-but-3D game in the whole history of gaming?
🗪
1:53:47fcatalan Q: Is this already the best lit 2-but-3D game in the whole history of gaming?
🗪
1:54:06emperormetallix Q: Are you using a diffusion / heat model to average the texture samples over space / time?
🗪
1:54:06emperormetallix Q: Are you using a diffusion / heat model to average the texture samples over space / time?
🗪
1:54:06emperormetallix Q: Are you using a diffusion / heat model to average the texture samples over space / time?
🗪
1:58:52star_prankster Q: Is it okay to use some features from later versions of C++ I may find useful, e.g. lambdas, templates?
🗪
1:58:52star_prankster Q: Is it okay to use some features from later versions of C++ I may find useful, e.g. lambdas, templates?
🗪
1:58:52star_prankster Q: Is it okay to use some features from later versions of C++ I may find useful, e.g. lambdas, templates?
🗪
2:03:52jim0_o Q: Would you mind explaining Transactional and vs. What?
🗪
2:03:52jim0_o Q: Would you mind explaining Transactional and vs. What?
🗪
2:03:52jim0_o Q: Would you mind explaining Transactional and vs. What?
🗪
2:08:08Stop the recording now
🗩
2:08:08Stop the recording now
🗩
2:08:08Stop the recording now
🗩