Introduction to Vertex and Fragment Shaders ⚠ Click here to regain focus ⚠
?
?

Keyboard Navigation

Global Keys

W, A, P / S, D, 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

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:01Recap and set the stage for the day
0:01Recap and set the stage for the day
0:01Recap and set the stage for the day
2:21Blackboard: Shaders1,2,3
2:21Blackboard: Shaders1,2,3
2:21Blackboard: Shaders1,2,3
3:22Blackboard: How hardware does pixel processing vs how we did it in software with SIMD
3:22Blackboard: How hardware does pixel processing vs how we did it in software with SIMD
3:22Blackboard: How hardware does pixel processing vs how we did it in software with SIMD
7:38Blackboard: Processing a 4x4 square of 16 pixels at a time, also called "warp"
7:38Blackboard: Processing a 4x4 square of 16 pixels at a time, also called "warp"
7:38Blackboard: Processing a 4x4 square of 16 pixels at a time, also called "warp"
10:56Blackboard: Writing a pixel shader, with the understanding that everything operates on many pixels at once
10:56Blackboard: Writing a pixel shader, with the understanding that everything operates on many pixels at once
10:56Blackboard: Writing a pixel shader, with the understanding that everything operates on many pixels at once
15:55Blackboard: Leveraging the capabilities of the hardware
15:55Blackboard: Leveraging the capabilities of the hardware
15:55Blackboard: Leveraging the capabilities of the hardware
19:49Blackboard: An example illustrating the need to understand the ramifications of operating wide
19:49Blackboard: An example illustrating the need to understand the ramifications of operating wide
19:49Blackboard: An example illustrating the need to understand the ramifications of operating wide
24:50"You're going down"α
24:50"You're going down"α
24:50"You're going down"α
27:27Blackboard: "Fragment" shader
27:27Blackboard: "Fragment" shader
27:27Blackboard: "Fragment" shader
30:15Blackboard: "Vertex" shader
30:15Blackboard: "Vertex" shader
30:15Blackboard: "Vertex" shader
33:36handmade_opengl.cpp: Make OpenGLCreateProgram() check GL_LINK_STATUS and GL_COMPILE_STATUS rather than GL_VALIDATE_STATUS4
33:36handmade_opengl.cpp: Make OpenGLCreateProgram() check GL_LINK_STATUS and GL_COMPILE_STATUS rather than GL_VALIDATE_STATUS4
33:36handmade_opengl.cpp: Make OpenGLCreateProgram() check GL_LINK_STATUS and GL_COMPILE_STATUS rather than GL_VALIDATE_STATUS4
35:48Run the game and successfully receive compile errors
35:48Run the game and successfully receive compile errors
35:48Run the game and successfully receive compile errors
36:08Note that Martins pointed out that multiline strings are supported in Visual Studio 20135
36:08Note that Martins pointed out that multiline strings are supported in Visual Studio 20135
36:08Note that Martins pointed out that multiline strings are supported in Visual Studio 20135
39:37handmade_opengl.cpp: Introduce VertexCode and FragmentCode here docs in OpenGLInit()
39:37handmade_opengl.cpp: Introduce VertexCode and FragmentCode here docs in OpenGLInit()
39:37handmade_opengl.cpp: Introduce VertexCode and FragmentCode here docs in OpenGLInit()
41:09Research the Core Language (GLSL) versioning6
41:09Research the Core Language (GLSL) versioning6
41:09Research the Core Language (GLSL) versioning6
44:06handmade_opengl.cpp: Set #version 130 in HeaderCode and run the game
44:06handmade_opengl.cpp: Set #version 130 in HeaderCode and run the game
44:06handmade_opengl.cpp: Set #version 130 in HeaderCode and run the game
44:33The OpenGL Shading Language 1.50 Quick Reference Card7
44:33The OpenGL Shading Language 1.50 Quick Reference Card7
44:33The OpenGL Shading Language 1.50 Quick Reference Card7
50:49handmade_opengl.cpp: Sketch out a shader in VertexCode
50:49handmade_opengl.cpp: Sketch out a shader in VertexCode
50:49handmade_opengl.cpp: Sketch out a shader in VertexCode
53:20The Built-in Inputs, Outputs and Constants
53:20The Built-in Inputs, Outputs and Constants
53:20The Built-in Inputs, Outputs and Constants
56:22handmade_opengl.cpp: Enable the VertexCode to take the Transform, using a uniform
56:22handmade_opengl.cpp: Enable the VertexCode to take the Transform, using a uniform
56:22handmade_opengl.cpp: Enable the VertexCode to take the Transform, using a uniform
57:39handmade_opengl.cpp: Start to enable OpenGLRenderCommands() to pass Transform to the shader
57:39handmade_opengl.cpp: Start to enable OpenGLRenderCommands() to pass Transform to the shader
57:39handmade_opengl.cpp: Start to enable OpenGLRenderCommands() to pass Transform to the shader
59:52Blackboard: How the shader compiler references a uniform
59:52Blackboard: How the shader compiler references a uniform
59:52Blackboard: How the shader compiler references a uniform
1:02:47handmade_opengl.h: Add GLSLTransformID to open_gl
1:02:47handmade_opengl.h: Add GLSLTransformID to open_gl
1:02:47handmade_opengl.h: Add GLSLTransformID to open_gl
1:03:39handmade_opengl.cpp: Start to sketch out a shader in FragmentCode in conjunction with the OpenGL Shading Language 1.50 Quick Reference Card
1:03:39handmade_opengl.cpp: Start to sketch out a shader in FragmentCode in conjunction with the OpenGL Shading Language 1.50 Quick Reference Card
1:03:39handmade_opengl.cpp: Start to sketch out a shader in FragmentCode in conjunction with the OpenGL Shading Language 1.50 Quick Reference Card
1:06:26Note that there is no colour value in the fragment language's gl_FragDepth
1:06:26Note that there is no colour value in the fragment language's gl_FragDepth
1:06:26Note that there is no colour value in the fragment language's gl_FragDepth
1:08:57handmade_opengl.cpp: Continue sketching out the FragmentCode
1:08:57handmade_opengl.cpp: Continue sketching out the FragmentCode
1:08:57handmade_opengl.cpp: Continue sketching out the FragmentCode
1:10:03handmade_opengl.cpp: Enable OpenGLRenderCommands() to setup a uniform matrix using glUniformMatrix4()
1:10:03handmade_opengl.cpp: Enable OpenGLRenderCommands() to setup a uniform matrix using glUniformMatrix4()
1:10:03handmade_opengl.cpp: Enable OpenGLRenderCommands() to setup a uniform matrix using glUniformMatrix4()
1:13:31handmade_opengl.cpp: Make OpenGLRenderCommands() call glUseProgram() in order to actually run the shader
1:13:31handmade_opengl.cpp: Make OpenGLRenderCommands() call glUseProgram() in order to actually run the shader
1:13:31handmade_opengl.cpp: Make OpenGLRenderCommands() call glUseProgram() in order to actually run the shader
1:14:59win32_handmade.cpp: Pull glGetUniformLocation(), glUniform4fv() and glUniformMatrix4fv() from glcorearb.h
1:14:59win32_handmade.cpp: Pull glGetUniformLocation(), glUniform4fv() and glUniformMatrix4fv() from glcorearb.h
1:14:59win32_handmade.cpp: Pull glGetUniformLocation(), glUniform4fv() and glUniformMatrix4fv() from glcorearb.h
1:19:02handmade_opengl.cpp: Correctly declare main() in the shader code and run
1:19:02handmade_opengl.cpp: Correctly declare main() in the shader code and run
1:19:02handmade_opengl.cpp: Correctly declare main() in the shader code and run
1:21:19Read about glGetProgram()8
1:21:19Read about glGetProgram()8
1:21:19Read about glGetProgram()8
1:21:42handmade_opengl.cpp: Make OpenGLCreateProgram() only check GL_LINK_STATUS and run the game to see that it works
1:21:42handmade_opengl.cpp: Make OpenGLCreateProgram() only check GL_LINK_STATUS and run the game to see that it works
1:21:42handmade_opengl.cpp: Make OpenGLCreateProgram() only check GL_LINK_STATUS and run the game to see that it works
1:22:28handmade_opengl.cpp: Make VertexCode set the InputVertex.w to 1.0 and run the game to see that the vertex shader is running
1:22:28handmade_opengl.cpp: Make VertexCode set the InputVertex.w to 1.0 and run the game to see that the vertex shader is running
1:22:28handmade_opengl.cpp: Make VertexCode set the InputVertex.w to 1.0 and run the game to see that the vertex shader is running
1:23:32handmade_opengl.cpp: Enable VertexCode to perform a ZTransform
1:23:32handmade_opengl.cpp: Enable VertexCode to perform a ZTransform
1:23:32handmade_opengl.cpp: Enable VertexCode to perform a ZTransform
1:25:51Run the game to see that we're getting the biasing we want
1:25:51Run the game to see that we're getting the biasing we want
1:25:51Run the game to see that we're getting the biasing we want
1:26:32handmade_opengl.cpp: Rewrite the VertexCode more instructively
1:26:32handmade_opengl.cpp: Rewrite the VertexCode more instructively
1:26:32handmade_opengl.cpp: Rewrite the VertexCode more instructively
1:28:41Run the game and reiterate what the VertexCode is doing, with a few words on its efficiency
1:28:41Run the game and reiterate what the VertexCode is doing, with a few words on its efficiency
1:28:41Run the game and reiterate what the VertexCode is doing, with a few words on its efficiency
1:30:17handmade_opengl.cpp: Determine to enable FragmentCode to operate on textures
1:30:17handmade_opengl.cpp: Determine to enable FragmentCode to operate on textures
1:30:17handmade_opengl.cpp: Determine to enable FragmentCode to operate on textures
1:33:45Blackboard: Variables in the fragment shader: "flat", "noperspective" and "smooth"
1:33:45Blackboard: Variables in the fragment shader: "flat", "noperspective" and "smooth"
1:33:45Blackboard: Variables in the fragment shader: "flat", "noperspective" and "smooth"
1:37:56handmade_opengl.cpp: Enable the FragmentCode to sample from textures, using a uniform
1:37:56handmade_opengl.cpp: Enable the FragmentCode to sample from textures, using a uniform
1:37:56handmade_opengl.cpp: Enable the FragmentCode to sample from textures, using a uniform
1:41:39Run the game and unexpectedly receive no error
1:41:39Run the game and unexpectedly receive no error
1:41:39Run the game and unexpectedly receive no error
1:41:50handmade_opengl.cpp: Enable VertexCode to pass FragUV and FragColor out to the FragmentCode
1:41:50handmade_opengl.cpp: Enable VertexCode to pass FragUV and FragColor out to the FragmentCode
1:41:50handmade_opengl.cpp: Enable VertexCode to pass FragUV and FragColor out to the FragmentCode
1:45:03Run the game
1:45:03Run the game
1:45:03Run the game
1:45:08handmade_opengl.cpp: Make VertexCode correctly set FragUV using gl_TexCoord[0].xy
1:45:08handmade_opengl.cpp: Make VertexCode correctly set FragUV using gl_TexCoord[0].xy
1:45:08handmade_opengl.cpp: Make VertexCode correctly set FragUV using gl_TexCoord[0].xy
1:47:51Run the game in the belief that we're passing down everything we need
1:47:51Run the game in the belief that we're passing down everything we need
1:47:51Run the game in the belief that we're passing down everything we need
1:48:51handmade_opengl.cpp: Make OpenGLRenderCommands() set a TextureSamplerID to pass to the FragmentCode shader
1:48:51handmade_opengl.cpp: Make OpenGLRenderCommands() set a TextureSamplerID to pass to the FragmentCode shader
1:48:51handmade_opengl.cpp: Make OpenGLRenderCommands() set a TextureSamplerID to pass to the FragmentCode shader
1:52:53Research glUniform9
1:52:53Research glUniform9
1:52:53Research glUniform9
1:54:14win32_handmade.cpp: Pull glUniformli() from glcorearb.h
1:54:14win32_handmade.cpp: Pull glUniformli() from glcorearb.h
1:54:14win32_handmade.cpp: Pull glUniformli() from glcorearb.h
1:56:17Q&A
1:56:17Q&A
1:56:17Q&A
1:56:58Fuss with OBS
1:56:58Fuss with OBS
1:56:58Fuss with OBS
1:59:45rbdjellyfish Check your global settings
🗪
1:59:45rbdjellyfish Check your global settings
🗪
1:59:45rbdjellyfish Check your global settings
🗪
2:01:170xdeadbeefh Maybe just have one scene? So it can't switch
🗪
2:01:170xdeadbeefh Maybe just have one scene? So it can't switch
🗪
2:01:170xdeadbeefh Maybe just have one scene? So it can't switch
🗪
2:02:08rooctag Now that we've gone OpenGL, do you still think the RaspberryPi option is still on the list?
🗪
2:02:08rooctag Now that we've gone OpenGL, do you still think the RaspberryPi option is still on the list?
🗪
2:02:08rooctag Now that we've gone OpenGL, do you still think the RaspberryPi option is still on the list?
🗪
2:02:59macielda Would you show us the code for what you have done in the last 2-4 minutes?
🗪
2:02:59macielda Would you show us the code for what you have done in the last 2-4 minutes?
🗪
2:02:59macielda Would you show us the code for what you have done in the last 2-4 minutes?
🗪
2:03:16handmade_opengl.cpp: Recap the FragmentCode here doc, and setting the TextureSamplerID
2:03:16handmade_opengl.cpp: Recap the FragmentCode here doc, and setting the TextureSamplerID
2:03:16handmade_opengl.cpp: Recap the FragmentCode here doc, and setting the TextureSamplerID
2:06:22wgg25 gl_TexCoord is an output from the vertex shader, which is why everything is black, you should use gl_MultiTexCoord0 (no brackets)
🗪
2:06:22wgg25 gl_TexCoord is an output from the vertex shader, which is why everything is black, you should use gl_MultiTexCoord0 (no brackets)
🗪
2:06:22wgg25 gl_TexCoord is an output from the vertex shader, which is why everything is black, you should use gl_MultiTexCoord0 (no brackets)
🗪
2:06:40handmade_opengl.cpp: Make the VertexCode use gl_MultiTexCoord0 to specify the FragUV, and run the game to see that it works
2:06:40handmade_opengl.cpp: Make the VertexCode use gl_MultiTexCoord0 to specify the FragUV, and run the game to see that it works
2:06:40handmade_opengl.cpp: Make the VertexCode use gl_MultiTexCoord0 to specify the FragUV, and run the game to see that it works
2:07:09handmade_opengl.cpp: Remove the setting of TexSample.a to 1.0 from the FragmentCode, and run the game to see what we expect to get
2:07:09handmade_opengl.cpp: Remove the setting of TexSample.a to 1.0 from the FragmentCode, and run the game to see what we expect to get
2:07:09handmade_opengl.cpp: Remove the setting of TexSample.a to 1.0 from the FragmentCode, and run the game to see what we expect to get
2:09:12miblo Are you receiving the Qs from HMN IRC/#hero? Your usual invocation of !qa didn't appear there today
🗪
2:09:12miblo Are you receiving the Qs from HMN IRC/#hero? Your usual invocation of !qa didn't appear there today
🗪
2:09:12miblo Are you receiving the Qs from HMN IRC/#hero? Your usual invocation of !qa didn't appear there today
🗪
2:09:41rooctag You mentioned the new assets will not be rectangular like the current assets. Do we need to update the asset pipeline for this?
🗪
2:09:41rooctag You mentioned the new assets will not be rectangular like the current assets. Do we need to update the asset pipeline for this?
🗪
2:09:41rooctag You mentioned the new assets will not be rectangular like the current assets. Do we need to update the asset pipeline for this?
🗪
2:11:02abarishu Are we completely dropping support for the software renderer now?
🗪
2:11:02abarishu Are we completely dropping support for the software renderer now?
🗪
2:11:02abarishu Are we completely dropping support for the software renderer now?
🗪
2:11:36rooctag I mean the hero head vs body vs cape are all the same shape
🗪
2:11:36rooctag I mean the hero head vs body vs cape are all the same shape
🗪
2:11:36rooctag I mean the hero head vs body vs cape are all the same shape
🗪
2:11:59macielda Can you explain with a little bit more detail about how the Z-bias thing works? I'm not sure I understand it
🗪
2:11:59macielda Can you explain with a little bit more detail about how the Z-bias thing works? I'm not sure I understand it
🗪
2:11:59macielda Can you explain with a little bit more detail about how the Z-bias thing works? I'm not sure I understand it
🗪
2:12:12Blackboard: How the Z-bias prevents sprites from intersecting
2:12:12Blackboard: How the Z-bias prevents sprites from intersecting
2:12:12Blackboard: How the Z-bias prevents sprites from intersecting
2:18:01abarishu So we are going to implement some form of Z-buffer in software?
🗪
2:18:01abarishu So we are going to implement some form of Z-buffer in software?
🗪
2:18:01abarishu So we are going to implement some form of Z-buffer in software?
🗪
2:18:19macielda The key part for me was that the Z is only used for the ZBuffer and the W does the perspective divide, thanks
🗪
2:18:19macielda The key part for me was that the Z is only used for the ZBuffer and the W does the perspective divide, thanks
🗪
2:18:19macielda The key part for me was that the Z is only used for the ZBuffer and the W does the perspective divide, thanks
🗪
2:19:20Go ahead and close it down with the determination to upgrade the graphics card
2:19:20Go ahead and close it down with the determination to upgrade the graphics card
2:19:20Go ahead and close it down with the determination to upgrade the graphics card