Two-pass Depth Peeling
?
?

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
z Toggle filter mode V Revert filter to original state

Menu toggling

q Quotes r References f Filter 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

Credits Menu

Enter Open URL (in new tab)
0:08Recap and set the stage for the day
0:08Recap and set the stage for the day
0:08Recap and set the stage for the day
0:41Note a couple of things in milton to fix, syncing and stuttering
0:41Note a couple of things in milton to fix, syncing and stuttering
0:41Note a couple of things in milton to fix, syncing and stuttering
1:31Blackboard: Using atomics to write more than one piece of information to a framebuffer
1:31Blackboard: Using atomics to write more than one piece of information to a framebuffer
1:31Blackboard: Using atomics to write more than one piece of information to a framebuffer
5:06Blackboard: Depth Peeling, as a lighter version of atomics
5:06Blackboard: Depth Peeling, as a lighter version of atomics
5:06Blackboard: Depth Peeling, as a lighter version of atomics
10:40Could we get rid of multisampling altogether?
10:40Could we get rid of multisampling altogether?
10:40Could we get rid of multisampling altogether?
13:07Run the game and point out the beautiful fade out
13:07Run the game and point out the beautiful fade out
13:07Run the game and point out the beautiful fade out
15:22handmade_opengl.cpp: Disable multisampling and alpha to coverage, and run the game to show what it looks like
15:22handmade_opengl.cpp: Disable multisampling and alpha to coverage, and run the game to show what it looks like
15:22handmade_opengl.cpp: Disable multisampling and alpha to coverage, and run the game to show what it looks like
18:14handmade_opengl.cpp: Determine to implement just the alpha compositing part
18:14handmade_opengl.cpp: Determine to implement just the alpha compositing part
18:14handmade_opengl.cpp: Determine to implement just the alpha compositing part
24:02handmade_opengl.cpp: Enable the render loop to properly prepare and target the render buffers for depth peeling
24:02handmade_opengl.cpp: Enable the render loop to properly prepare and target the render buffers for depth peeling
24:02handmade_opengl.cpp: Enable the render loop to properly prepare and target the render buffers for depth peeling
28:03Blackboard: Front and Back Pictures
28:03Blackboard: Front and Back Pictures
28:03Blackboard: Front and Back Pictures
28:34handmade_opengl.cpp: Disable GL_BLEND and write out the values directly into the framebuffer
28:34handmade_opengl.cpp: Disable GL_BLEND and write out the values directly into the framebuffer
28:34handmade_opengl.cpp: Disable GL_BLEND and write out the values directly into the framebuffer
29:18Run the game to see the front picture
29:18Run the game to see the front picture
29:18Run the game to see the front picture
30:16Blackboard: The contents of the Front and Back Pictures
30:16Blackboard: The contents of the Front and Back Pictures
30:16Blackboard: The contents of the Front and Back Pictures
32:23handmade_opengl.cpp: Enable OpenGLRenderCommands() to target a second framebuffer
32:23handmade_opengl.cpp: Enable OpenGLRenderCommands() to target a second framebuffer
32:23handmade_opengl.cpp: Enable OpenGLRenderCommands() to target a second framebuffer
37:11handmade_opengl.cpp: Enable the textured_quads case to assume that the framebuffer is bound properly
37:11handmade_opengl.cpp: Enable the textured_quads case to assume that the framebuffer is bound properly
37:11handmade_opengl.cpp: Enable the textured_quads case to assume that the framebuffer is bound properly
38:15Run the game to see the front buffer still there
38:15Run the game to see the front buffer still there
38:15Run the game to see the front buffer still there
38:29handmade_opengl.cpp: Enable UseProgramBegin() to bind the DepthSampler framebuffer
38:29handmade_opengl.cpp: Enable UseProgramBegin() to bind the DepthSampler framebuffer
38:29handmade_opengl.cpp: Enable UseProgramBegin() to bind the DepthSampler framebuffer
42:12handmade_opengl.cpp: Enable OpenGLRenderCommands() to read from more than one texture1
42:12handmade_opengl.cpp: Enable OpenGLRenderCommands() to read from more than one texture1
42:12handmade_opengl.cpp: Enable OpenGLRenderCommands() to read from more than one texture1
47:46win32_handmade.h: Pull in glActiveTexture() from corearb.h2
47:46win32_handmade.h: Pull in glActiveTexture() from corearb.h2
47:46win32_handmade.h: Pull in glActiveTexture() from corearb.h2
48:46Run the game to see everything working fine
48:46Run the game to see everything working fine
48:46Run the game to see everything working fine
49:26handmade_opengl.cpp: Display GlobalFramebufferHandles[1] and run the game to see that back buffer
49:26handmade_opengl.cpp: Display GlobalFramebufferHandles[1] and run the game to see that back buffer
49:26handmade_opengl.cpp: Display GlobalFramebufferHandles[1] and run the game to see that back buffer
49:49handmade_world_mode.cpp: Make UpdateAndRenderWorld() call BeginDepthPeel() and EndDepthPeel()
49:49handmade_world_mode.cpp: Make UpdateAndRenderWorld() call BeginDepthPeel() and EndDepthPeel()
49:49handmade_world_mode.cpp: Make UpdateAndRenderWorld() call BeginDepthPeel() and EndDepthPeel()
52:01handmade_render_group.h: Introduce BeginDepthPeel() and EndDepthPeel()
52:01handmade_render_group.h: Introduce BeginDepthPeel() and EndDepthPeel()
52:01handmade_render_group.h: Introduce BeginDepthPeel() and EndDepthPeel()
52:29Run the game and hit a glActiveTexture error
52:29Run the game and hit a glActiveTexture error
52:29Run the game and hit a glActiveTexture error
52:57win32_handmade.h: Pull in the glActiveTexture() enums from corearb.h3
52:57win32_handmade.h: Pull in the glActiveTexture() enums from corearb.h3
52:57win32_handmade.h: Pull in the glActiveTexture() enums from corearb.h3
53:43Run the game to see the depth peel, and note that the depth comparison is not reliable
53:43Run the game to see the depth peel, and note that the depth comparison is not reliable
53:43Run the game to see the depth peel, and note that the depth comparison is not reliable
55:45handmade_opengl.cpp: Enable the FragmentCode to draw the FragZ
55:45handmade_opengl.cpp: Enable the FragmentCode to draw the FragZ
55:45handmade_opengl.cpp: Enable the FragmentCode to draw the FragZ
58:31Run the game to see the interesting Z values
58:31Run the game to see the interesting Z values
58:31Run the game to see the interesting Z values
1:00:13handmade_opengl.cpp: Switch to showing the front buffer and run the game to see that it looks correct
1:00:13handmade_opengl.cpp: Switch to showing the front buffer and run the game to see that it looks correct
1:00:13handmade_opengl.cpp: Switch to showing the front buffer and run the game to see that it looks correct
1:01:04Run the game and note that all except the white texture is wrong
1:01:04Run the game and note that all except the white texture is wrong
1:01:04Run the game and note that all except the white texture is wrong
1:03:19handmade_opengl.cpp: Investigate where we're sampling from, and how the framebuffer is stored
1:03:19handmade_opengl.cpp: Investigate where we're sampling from, and how the framebuffer is stored
1:03:19handmade_opengl.cpp: Investigate where we're sampling from, and how the framebuffer is stored
1:09:21handmade_opengl.cpp: Try to move FragZ into the 0 to 1 range, and make it a floating point depth buffer
1:09:21handmade_opengl.cpp: Try to move FragZ into the 0 to 1 range, and make it a floating point depth buffer
1:09:21handmade_opengl.cpp: Try to move FragZ into the 0 to 1 range, and make it a floating point depth buffer
1:11:07Run the game and note that it's oddly accurate for the white textured cubes
1:11:07Run the game and note that it's oddly accurate for the white textured cubes
1:11:07Run the game and note that it's oddly accurate for the white textured cubes
1:12:25handmade_opengl.cpp: Enable culling4,5
1:12:25handmade_opengl.cpp: Enable culling4,5
1:12:25handmade_opengl.cpp: Enable culling4,5
1:14:46Run the game and determine that everything in the game is wound backwards
1:14:46Run the game and determine that everything in the game is wound backwards
1:14:46Run the game and determine that everything in the game is wound backwards
1:16:17Blackboard: Winding
1:16:17Blackboard: Winding
1:16:17Blackboard: Winding
1:17:06handmade_render_group.cpp: Double-check that the code should be winding it properly
1:17:06handmade_render_group.cpp: Double-check that the code should be winding it properly
1:17:06handmade_render_group.cpp: Double-check that the code should be winding it properly
1:18:31handmade_opengl.cpp: Try unsuccessfully to switch to using GL_QUADS
1:18:31handmade_opengl.cpp: Try unsuccessfully to switch to using GL_QUADS
1:18:31handmade_opengl.cpp: Try unsuccessfully to switch to using GL_QUADS
1:21:50handmade_opengl.cpp: Switch to GL_TRIANGLES
1:21:50handmade_opengl.cpp: Switch to GL_TRIANGLES
1:21:50handmade_opengl.cpp: Switch to GL_TRIANGLES
1:22:41Run the game to confirm that we are binding triangles correctly, but that the triangle strips must be backwards
1:22:41Run the game to confirm that we are binding triangles correctly, but that the triangle strips must be backwards
1:22:41Run the game to confirm that we are binding triangles correctly, but that the triangle strips must be backwards
1:23:02handmade_render_group.cpp: Fix PushQuad() to push the vertices in the right order
1:23:02handmade_render_group.cpp: Fix PushQuad() to push the vertices in the right order
1:23:02handmade_render_group.cpp: Fix PushQuad() to push the vertices in the right order
1:23:42Run the game to see our culling working properly
1:23:42Run the game to see our culling working properly
1:23:42Run the game to see our culling working properly
1:24:44Determine to ruminate on the incorrect non-white textures
1:24:44Determine to ruminate on the incorrect non-white textures
1:24:44Determine to ruminate on the incorrect non-white textures
1:26:11handmade_opengl.cpp: Introduce CompilePeelComposite()
1:26:11handmade_opengl.cpp: Introduce CompilePeelComposite()
1:26:11handmade_opengl.cpp: Introduce CompilePeelComposite()
1:38:23handmade_opengl.cpp: Enable OpenGLRenderCommands() to composite the depth peels
1:38:23handmade_opengl.cpp: Enable OpenGLRenderCommands() to composite the depth peels
1:38:23handmade_opengl.cpp: Enable OpenGLRenderCommands() to composite the depth peels
1:44:39handmade_opengl.cpp: Just a pass a colour to the shader, so we have less variability
1:44:39handmade_opengl.cpp: Just a pass a colour to the shader, so we have less variability
1:44:39handmade_opengl.cpp: Just a pass a colour to the shader, so we have less variability
1:46:49Run the game to see our composited picture
1:46:49Run the game to see our composited picture
1:46:49Run the game to see our composited picture
1:48:06handmade_opengl.cpp: Determine to ensure that the shader is passing the colour without alpha
1:48:06handmade_opengl.cpp: Determine to ensure that the shader is passing the colour without alpha
1:48:06handmade_opengl.cpp: Determine to ensure that the shader is passing the colour without alpha
1:50:56Blackboard: Solving for unadulterated red
1:50:56Blackboard: Solving for unadulterated red
1:50:56Blackboard: Solving for unadulterated red
1:51:28handmade_opengl.cpp: Make the shader undo the alpha modulation of the colours
1:51:28handmade_opengl.cpp: Make the shader undo the alpha modulation of the colours
1:51:28handmade_opengl.cpp: Make the shader undo the alpha modulation of the colours
1:52:42Run the game to see our current status
1:52:42Run the game to see our current status
1:52:42Run the game to see our current status
1:53:29handmade_opengl.cpp: Double-check the frame buffer creation code
1:53:29handmade_opengl.cpp: Double-check the frame buffer creation code
1:53:29handmade_opengl.cpp: Double-check the frame buffer creation code
1:54:54Step in to OpenGLRenderCommands() and inspect the frame buffers
1:54:54Step in to OpenGLRenderCommands() and inspect the frame buffers
1:54:54Step in to OpenGLRenderCommands() and inspect the frame buffers
1:55:52handmade_opengl.cpp: Make OpenGLRenderCommands() loop over the correct frame buffers
1:55:52handmade_opengl.cpp: Make OpenGLRenderCommands() loop over the correct frame buffers
1:55:52handmade_opengl.cpp: Make OpenGLRenderCommands() loop over the correct frame buffers
1:56:22Run the game to see that we're much better
1:56:22Run the game to see that we're much better
1:56:22Run the game to see that we're much better
1:57:00"Happy day happiness of special deliciousness"α
1:57:00"Happy day happiness of special deliciousness"α
1:57:00"Happy day happiness of special deliciousness"α
1:57:12Determine to implement the depth peel shader tomorrow
1:57:12Determine to implement the depth peel shader tomorrow
1:57:12Determine to implement the depth peel shader tomorrow
1:57:31Q&A
🗩
1:57:31Q&A
🗩
1:57:31Q&A
🗩
1:58:19sausagesuperb I tend to see in a lot of APIs (for example SDL) things like DestroyWindow calls. If this is the last thing you do before exiting the app, doesn't the operating system take care of this for you?
🗪
1:58:19sausagesuperb I tend to see in a lot of APIs (for example SDL) things like DestroyWindow calls. If this is the last thing you do before exiting the app, doesn't the operating system take care of this for you?
🗪
1:58:19sausagesuperb I tend to see in a lot of APIs (for example SDL) things like DestroyWindow calls. If this is the last thing you do before exiting the app, doesn't the operating system take care of this for you?
🗪
1:59:45daniel_collin Have you considered keeping the shader code as separate files so you can do automatic reload on save in the editor, for example, or do you think there won't be enough shader code to motivate the work?
🗪
1:59:45daniel_collin Have you considered keeping the shader code as separate files so you can do automatic reload on save in the editor, for example, or do you think there won't be enough shader code to motivate the work?
🗪
1:59:45daniel_collin Have you considered keeping the shader code as separate files so you can do automatic reload on save in the editor, for example, or do you think there won't be enough shader code to motivate the work?
🗪
2:00:55handmade_opengl.cpp: Investigate why glDrawArrays() is busted
2:00:55handmade_opengl.cpp: Investigate why glDrawArrays() is busted
2:00:55handmade_opengl.cpp: Investigate why glDrawArrays() is busted
2:03:40itfrombit I think your last hardcoded giant triangle strip UV mapping coordinate has a cut and paste error. Should be {1.0, 0.0} instead of {1.0, 1.0}?
🗪
2:03:40itfrombit I think your last hardcoded giant triangle strip UV mapping coordinate has a cut and paste error. Should be {1.0, 0.0} instead of {1.0, 1.0}?
🗪
2:03:40itfrombit I think your last hardcoded giant triangle strip UV mapping coordinate has a cut and paste error. Should be {1.0, 0.0} instead of {1.0, 1.0}?
🗪
2:03:52handmade_opengl.cpp: Fix the final coordinate in Vertices and run the game to see that that wasn't enough to save us
2:03:52handmade_opengl.cpp: Fix the final coordinate in Vertices and run the game to see that that wasn't enough to save us
2:03:52handmade_opengl.cpp: Fix the final coordinate in Vertices and run the game to see that that wasn't enough to save us
2:04:10daniel_collin By the way, it was pointed out that the compatibility bit only works in 3.2+ (and I think you specify 3.0 currently)
🗪
2:04:10daniel_collin By the way, it was pointed out that the compatibility bit only works in 3.2+ (and I think you specify 3.0 currently)
🗪
2:04:10daniel_collin By the way, it was pointed out that the compatibility bit only works in 3.2+ (and I think you specify 3.0 currently)
🗪
2:04:19tmellemseter A bit off-topic, but why is not The Jeff and Casey Show Season 5 on the Molly Rocket website?
🗪
2:04:19tmellemseter A bit off-topic, but why is not The Jeff and Casey Show Season 5 on the Molly Rocket website?
🗪
2:04:19tmellemseter A bit off-topic, but why is not The Jeff and Casey Show Season 5 on the Molly Rocket website?
🗪
2:04:47Consider what may be going wrong in our shader
2:04:47Consider what may be going wrong in our shader
2:04:47Consider what may be going wrong in our shader
2:07:32daniel_collin I was told that you had some issue(s) with RenderDoc. Do you know if it was related to you having a old GPU or was it a real bug in Renderdoc?
🗪
2:07:32daniel_collin I was told that you had some issue(s) with RenderDoc. Do you know if it was related to you having a old GPU or was it a real bug in Renderdoc?
🗪
2:07:32daniel_collin I was told that you had some issue(s) with RenderDoc. Do you know if it was related to you having a old GPU or was it a real bug in Renderdoc?
🗪
2:08:52sahfortv Could you view in the debugger and see if the shader outputs sensible values?
🗪
2:08:52sahfortv Could you view in the debugger and see if the shader outputs sensible values?
🗪
2:08:52sahfortv Could you view in the debugger and see if the shader outputs sensible values?
🗪
2:09:10sausagesuperb In the future when Jon Blow's language is released for public (in case it will be before Handmade Hero completion), will you switch to use it for finishing unfinished parts of the game, or would you stay with C/C++ until the bitter end?
🗪
2:09:10sausagesuperb In the future when Jon Blow's language is released for public (in case it will be before Handmade Hero completion), will you switch to use it for finishing unfinished parts of the game, or would you stay with C/C++ until the bitter end?
🗪
2:09:10sausagesuperb In the future when Jon Blow's language is released for public (in case it will be before Handmade Hero completion), will you switch to use it for finishing unfinished parts of the game, or would you stay with C/C++ until the bitter end?
🗪
2:10:18That is it
🗩
2:10:18That is it
🗩
2:10:18That is it
🗩