Depth Peel Compositing
?
?

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:03Recap and set the stage for the day
0:03Recap and set the stage for the day
0:03Recap and set the stage for the day
2:50Run the game to take a look at the situation as it stands
2:50Run the game to take a look at the situation as it stands
2:50Run the game to take a look at the situation as it stands
5:51handmade_opengl.cpp: Establish that we can set the viewport correctly
5:51handmade_opengl.cpp: Establish that we can set the viewport correctly
5:51handmade_opengl.cpp: Establish that we can set the viewport correctly
10:28handmade_opengl.cpp: Simplify the shader down so that it just draws red
10:28handmade_opengl.cpp: Simplify the shader down so that it just draws red
10:28handmade_opengl.cpp: Simplify the shader down so that it just draws red
14:11Step through OpenGLRenderCommands() to verify the vertex data
14:11Step through OpenGLRenderCommands() to verify the vertex data
14:11Step through OpenGLRenderCommands() to verify the vertex data
18:03handmade_opengl.cpp: Correctly set the vertices' W coordinates
18:03handmade_opengl.cpp: Correctly set the vertices' W coordinates
18:03handmade_opengl.cpp: Correctly set the vertices' W coordinates
19:38Run the game to see red where we expect
19:38Run the game to see red where we expect
19:38Run the game to see red where we expect
20:41handmade_opengl.cpp: Remove our debug test code
20:41handmade_opengl.cpp: Remove our debug test code
20:41handmade_opengl.cpp: Remove our debug test code
22:12Run the game to see that our composite is working
22:12Run the game to see that our composite is working
22:12Run the game to see that our composite is working
22:28"Cheers"α
22:28"Cheers"α
22:28"Cheers"α
22:41handmade_opengl.cpp: Verify that we can read from our framebuffers and run the game to see that the Peel0 value is wrong
22:41handmade_opengl.cpp: Verify that we can read from our framebuffers and run the game to see that the Peel0 value is wrong
22:41handmade_opengl.cpp: Verify that we can read from our framebuffers and run the game to see that the Peel0 value is wrong
23:46handmade_opengl.cpp: Investigate what is wrong, noting that AMD wasn't letting us use multisampling sRGB
23:46handmade_opengl.cpp: Investigate what is wrong, noting that AMD wasn't letting us use multisampling sRGB
23:46handmade_opengl.cpp: Investigate what is wrong, noting that AMD wasn't letting us use multisampling sRGB
26:14handmade_opengl.cpp: Make the shader perform the blend without sRGB, and run the game to see that it looks close to correct
26:14handmade_opengl.cpp: Make the shader perform the blend without sRGB, and run the game to see that it looks close to correct
26:14handmade_opengl.cpp: Make the shader perform the blend without sRGB, and run the game to see that it looks close to correct
29:20handmade_opengl.cpp: Enable OpenGLInit() to use sRGB without multisampling, and run the game to see that the halo has gone, but the trees have fringing
29:20handmade_opengl.cpp: Enable OpenGLInit() to use sRGB without multisampling, and run the game to see that the halo has gone, but the trees have fringing
29:20handmade_opengl.cpp: Enable OpenGLInit() to use sRGB without multisampling, and run the game to see that the halo has gone, but the trees have fringing
32:29handmade_opengl.cpp: Make OpenGLRenderCommands() only clear the top layer, and run the game to see that the fringing has gone
32:29handmade_opengl.cpp: Make OpenGLRenderCommands() only clear the top layer, and run the game to see that the fringing has gone
32:29handmade_opengl.cpp: Make OpenGLRenderCommands() only clear the top layer, and run the game to see that the fringing has gone
33:34Consider how best to handle multiple overlapping alpha'd elements
33:34Consider how best to handle multiple overlapping alpha'd elements
33:34Consider how best to handle multiple overlapping alpha'd elements
35:22Blackboard: Alpha + Z Buffer
35:22Blackboard: Alpha + Z Buffer
35:22Blackboard: Alpha + Z Buffer
36:49Blackboard: The standard way of handling transparency in multiple passes
36:49Blackboard: The standard way of handling transparency in multiple passes
36:49Blackboard: The standard way of handling transparency in multiple passes
38:35Blackboard: A smarter way of handling transparency
38:35Blackboard: A smarter way of handling transparency
38:35Blackboard: A smarter way of handling transparency
43:13Blackboard: Single Framebuffer, Multiple Depth Peels
43:13Blackboard: Single Framebuffer, Multiple Depth Peels
43:13Blackboard: Single Framebuffer, Multiple Depth Peels
47:45handmade_opengl.cpp: Make OpenGLRenderCommands() always draw to the same colour buffer and blend multiple depth peels into it
47:45handmade_opengl.cpp: Make OpenGLRenderCommands() always draw to the same colour buffer and blend multiple depth peels into it
47:45handmade_opengl.cpp: Make OpenGLRenderCommands() always draw to the same colour buffer and blend multiple depth peels into it
52:34Run the game to see Z fighting
52:34Run the game to see Z fighting
52:34Run the game to see Z fighting
54:24handmade_opengl.cpp: Investigate the Z fighting
54:24handmade_opengl.cpp: Investigate the Z fighting
54:24handmade_opengl.cpp: Investigate the Z fighting
56:55Realise that we do need two colour buffers for sorting, and back out our single-buffer code
56:55Realise that we do need two colour buffers for sorting, and back out our single-buffer code
56:55Realise that we do need two colour buffers for sorting, and back out our single-buffer code
59:12handmade_opengl.cpp: Make OpenGLRenderCommands() write into multiple depth buffers, and the shader sample from multiple peels
59:12handmade_opengl.cpp: Make OpenGLRenderCommands() write into multiple depth buffers, and the shader sample from multiple peels
59:12handmade_opengl.cpp: Make OpenGLRenderCommands() write into multiple depth buffers, and the shader sample from multiple peels
1:05:55handmade_opengl.h: Split opengl_program out into new zbias_program and peel_composite_program structs
1:05:55handmade_opengl.h: Split opengl_program out into new zbias_program and peel_composite_program structs
1:05:55handmade_opengl.h: Split opengl_program out into new zbias_program and peel_composite_program structs
1:09:37handmade_opengl.cpp: Introduce versions of UseProgramBegin() that take these new structs
1:09:37handmade_opengl.cpp: Introduce versions of UseProgramBegin() that take these new structs
1:09:37handmade_opengl.cpp: Introduce versions of UseProgramBegin() that take these new structs
1:13:39Run the game and look at the different peels
1:13:39Run the game and look at the different peels
1:13:39Run the game and look at the different peels
1:14:31handmade_opengl.cpp: Enable OpenGLRenderCommands() to draw to all the peels
1:14:31handmade_opengl.cpp: Enable OpenGLRenderCommands() to draw to all the peels
1:14:31handmade_opengl.cpp: Enable OpenGLRenderCommands() to draw to all the peels
1:16:48Run the game and investigate the failing compositing
1:16:48Run the game and investigate the failing compositing
1:16:48Run the game and investigate the failing compositing
1:19:16handmade_opengl.cpp: Make CompilePeelComposite() copy the peels across, run the game and only see the profiler
1:19:16handmade_opengl.cpp: Make CompilePeelComposite() copy the peels across, run the game and only see the profiler
1:19:16handmade_opengl.cpp: Make CompilePeelComposite() copy the peels across, run the game and only see the profiler
1:23:45handmade_opengl.cpp: Gather up the first texture into all the peels
1:23:45handmade_opengl.cpp: Gather up the first texture into all the peels
1:23:45handmade_opengl.cpp: Gather up the first texture into all the peels
1:24:38"You can't just start talking about variables that don't exist yet"β
1:24:38"You can't just start talking about variables that don't exist yet"β
1:24:38"You can't just start talking about variables that don't exist yet"β
1:24:43handmade_opengl.cpp: Investigate the incorrect blitting
1:24:43handmade_opengl.cpp: Investigate the incorrect blitting
1:24:43handmade_opengl.cpp: Investigate the incorrect blitting
1:26:47handmade_opengl.cpp: Make OpenGLRenderCommands() correctly set the ActiveTexture, and run the game
1:26:47handmade_opengl.cpp: Make OpenGLRenderCommands() correctly set the ActiveTexture, and run the game
1:26:47handmade_opengl.cpp: Make OpenGLRenderCommands() correctly set the ActiveTexture, and run the game
1:27:54handmade_opengl.cpp: Enable everything until we're back at the composite path, and run the game
1:27:54handmade_opengl.cpp: Enable everything until we're back at the composite path, and run the game
1:27:54handmade_opengl.cpp: Enable everything until we're back at the composite path, and run the game
1:29:21handmade_opengl.cpp: Investigate how we are doing the peel composite
1:29:21handmade_opengl.cpp: Investigate how we are doing the peel composite
1:29:21handmade_opengl.cpp: Investigate how we are doing the peel composite
1:32:20Run the game and note that the depth peel doesn't handle identical Z values
1:32:20Run the game and note that the depth peel doesn't handle identical Z values
1:32:20Run the game and note that the depth peel doesn't handle identical Z values
1:33:44handmade_particles.cpp: Make SpawnFire() randomise the P.z
1:33:44handmade_particles.cpp: Make SpawnFire() randomise the P.z
1:33:44handmade_particles.cpp: Make SpawnFire() randomise the P.z
1:37:01Run the game and consider making a more controlled test case
1:37:01Run the game and consider making a more controlled test case
1:37:01Run the game and consider making a more controlled test case
1:37:44handmade_particles.cpp: Make SpawnFire() throw the particles upwards in Z
1:37:44handmade_particles.cpp: Make SpawnFire() throw the particles upwards in Z
1:37:44handmade_particles.cpp: Make SpawnFire() throw the particles upwards in Z
1:39:10Run the game to admire the particles
1:39:10Run the game to admire the particles
1:39:10Run the game to admire the particles
1:39:22handmade_particles.cpp: Make SpawnFire() give the particles more poof, and run the game to admire themγ
1:39:22handmade_particles.cpp: Make SpawnFire() give the particles more poof, and run the game to admire themγ
1:39:22handmade_particles.cpp: Make SpawnFire() give the particles more poof, and run the game to admire themγ
1:42:17handmade_opengl.cpp: Determine that we only have two peels and investigate why
1:42:17handmade_opengl.cpp: Determine that we only have two peels and investigate why
1:42:17handmade_opengl.cpp: Determine that we only have two peels and investigate why
1:46:16Step into CompilePeelComposite() and inspect the PeelSampler values and GlobalFrameBufferTextures
1:46:16Step into CompilePeelComposite() and inspect the PeelSampler values and GlobalFrameBufferTextures
1:46:16Step into CompilePeelComposite() and inspect the PeelSampler values and GlobalFrameBufferTextures
1:51:31handmade_opengl.cpp: Make OpenGLRenderCommands() not mipmap the textures when binding
1:51:31handmade_opengl.cpp: Make OpenGLRenderCommands() not mipmap the textures when binding
1:51:31handmade_opengl.cpp: Make OpenGLRenderCommands() not mipmap the textures when binding
1:53:07Run the game to see that that fixed it
1:53:07Run the game to see that that fixed it
1:53:07Run the game to see that that fixed it
1:53:53handmade_opengl.cpp: Reenable everything and perform the full blend
1:53:53handmade_opengl.cpp: Reenable everything and perform the full blend
1:53:53handmade_opengl.cpp: Reenable everything and perform the full blend
1:54:32Run the game to see that it looks quite nice
1:54:32Run the game to see that it looks quite nice
1:54:32Run the game to see that it looks quite nice
1:55:52handmade_opengl.cpp: Work towards enabling CompileZBiasProgram() to alpha fade the clip plane
1:55:52handmade_opengl.cpp: Work towards enabling CompileZBiasProgram() to alpha fade the clip plane
1:55:52handmade_opengl.cpp: Work towards enabling CompileZBiasProgram() to alpha fade the clip plane
2:02:08Run the game to see the awesome depth peel at half alpha
2:02:08Run the game to see the awesome depth peel at half alpha
2:02:08Run the game to see the awesome depth peel at half alpha
2:02:50handmade_opengl.cpp: Complete implementing the near clip plane fading
2:02:50handmade_opengl.cpp: Complete implementing the near clip plane fading
2:02:50handmade_opengl.cpp: Complete implementing the near clip plane fading
2:08:37Run the game to admire the near clip plane fading
2:08:37Run the game to admire the near clip plane fading
2:08:37Run the game to admire the near clip plane fading
2:09:52Q&A
🗩
2:09:52Q&A
🗩
2:09:52Q&A
🗩
2:10:11Note that it doesn't seem to line up with the near clip plane
2:10:11Note that it doesn't seem to line up with the near clip plane
2:10:11Note that it doesn't seem to line up with the near clip plane
2:10:45handmade_world_mode.cpp: Increase the NearClipPlane and run the game to see it
2:10:45handmade_world_mode.cpp: Increase the NearClipPlane and run the game to see it
2:10:45handmade_world_mode.cpp: Increase the NearClipPlane and run the game to see it
2:12:50Miblo Could you try disabling the randomisation of the ground tile Z? I'm interested to see if that'll adversely affect the sexiness of the depth peel
🗪
2:12:50Miblo Could you try disabling the randomisation of the ground tile Z? I'm interested to see if that'll adversely affect the sexiness of the depth peel
🗪
2:12:50Miblo Could you try disabling the randomisation of the ground tile Z? I'm interested to see if that'll adversely affect the sexiness of the depth peel
🗪
2:13:26handmade_world_mode.cpp: Temporarily disable the randomisation and run the game to see that
2:13:26handmade_world_mode.cpp: Temporarily disable the randomisation and run the game to see that
2:13:26handmade_world_mode.cpp: Temporarily disable the randomisation and run the game to see that
2:14:28thesizik Debug menu's broken now
🗪
2:14:28thesizik Debug menu's broken now
🗪
2:14:28thesizik Debug menu's broken now
🗪
2:14:55handmade_render_group.cpp: Make SetCameraTransform() correctly set the clip alpha distances for the debug menu, and run the game
2:14:55handmade_render_group.cpp: Make SetCameraTransform() correctly set the clip alpha distances for the debug menu, and run the game
2:14:55handmade_render_group.cpp: Make SetCameraTransform() correctly set the clip alpha distances for the debug menu, and run the game
2:16:30pragmascrypt For depth peeling: would it be possible to discard all pixels in the 2nd layer that have an alpha value of 255 in the front layer because they are not interesting for the composition anyway?
🗪
2:16:30pragmascrypt For depth peeling: would it be possible to discard all pixels in the 2nd layer that have an alpha value of 255 in the front layer because they are not interesting for the composition anyway?
🗪
2:16:30pragmascrypt For depth peeling: would it be possible to discard all pixels in the 2nd layer that have an alpha value of 255 in the front layer because they are not interesting for the composition anyway?
🗪
2:19:20alexkelbo I'm behind on day 130, just finished the SIMD / thread introduction. What feature of the game eventually forced you to use the GPU? (Totally love the software rendering)
🗪
2:19:20alexkelbo I'm behind on day 130, just finished the SIMD / thread introduction. What feature of the game eventually forced you to use the GPU? (Totally love the software rendering)
🗪
2:19:20alexkelbo I'm behind on day 130, just finished the SIMD / thread introduction. What feature of the game eventually forced you to use the GPU? (Totally love the software rendering)
🗪
2:21:12alexkelbo Is the game going to be more 3D-ish gameplay-wise than originally planned?
🗪
2:21:12alexkelbo Is the game going to be more 3D-ish gameplay-wise than originally planned?
🗪
2:21:12alexkelbo Is the game going to be more 3D-ish gameplay-wise than originally planned?
🗪
2:22:32napoleon89 So is the depth peeling being used for order-independent transparency with the sprites?
🗪
2:22:32napoleon89 So is the depth peeling being used for order-independent transparency with the sprites?
🗪
2:22:32napoleon89 So is the depth peeling being used for order-independent transparency with the sprites?
🗪
2:23:44zzyzzyxx Can you go into more detail on what fixed layers 2 / 3 from being all black? It wasn't an old card only being able to read two textures, but I missed the actual resolution
🗪
2:23:44zzyzzyxx Can you go into more detail on what fixed layers 2 / 3 from being all black? It wasn't an old card only being able to read two textures, but I missed the actual resolution
🗪
2:23:44zzyzzyxx Can you go into more detail on what fixed layers 2 / 3 from being all black? It wasn't an old card only being able to read two textures, but I missed the actual resolution
🗪
2:24:04OpenGL assumes that textures are mipmapped
2:24:04OpenGL assumes that textures are mipmapped
2:24:04OpenGL assumes that textures are mipmapped
2:26:52k2t0f12d Do you actually have to have wireframe models to be considered 2.5D, or would this count as well?
🗪
2:26:52k2t0f12d Do you actually have to have wireframe models to be considered 2.5D, or would this count as well?
🗪
2:26:52k2t0f12d Do you actually have to have wireframe models to be considered 2.5D, or would this count as well?
🗪
2:28:28k2t0f12d You could define your own render definition for HMD
🗪
2:28:28k2t0f12d You could define your own render definition for HMD
🗪
2:28:28k2t0f12d You could define your own render definition for HMD
🗪
2:29:47alexkelbo Is the floor below us being drawn completely and the one we are on on top of it, or is the one below clipped so only the pixels we see through the holes are drawn?
🗪
2:29:47alexkelbo Is the floor below us being drawn completely and the one we are on on top of it, or is the one below clipped so only the pixels we see through the holes are drawn?
🗪
2:29:47alexkelbo Is the floor below us being drawn completely and the one we are on on top of it, or is the one below clipped so only the pixels we see through the holes are drawn?
🗪
2:31:33Wrap it up with a glimpse into the future of new art integration
🗩
2:31:33Wrap it up with a glimpse into the future of new art integration
🗩
2:31:33Wrap it up with a glimpse into the future of new art integration
🗩