cinera_handmade.network/cmuratori/hero/code/code407.hmml

56 lines
4.7 KiB
Plaintext
Raw Normal View History

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Starting to Debug Volume Textures" vod_platform=youtube id=Lub0CXC_eWk annotator=Miblo]
[0:08][Recap our woes from yesterday regarding Windows and graphics drivers]
[6:24][Run the game to see where we left off]
[8:25][Continue to investigate why our lighting solution is not producing the expected colours]
[15:57][Step in to OutputLightingTextures() and inspect the lighting positions and elements]
[20:07][Step in to PushLighting() and inspect the destination lighting entries]
[28:41][handmade_render_group.cpp: Enable OutputTextureDebug() to average and visualise each voxel's colour values at its centre]
[36:36][Run the game to see nothing in our lighting debug visualisation]
[39:18][handmade_render_group.cpp: Make OutputTextureDebug() correctly compute the CellDim]
[40:03][Run the game to see our lighting debug visualisation]
[41:13][handmade_opengl.cpp: Make CompileZBiasProgram() use the lighting colour passed to it]
[41:28][Run the game to see our coloured debug visualisation, and determine that we seem to be setting up the texture data correctly]
[44:14][handmade_opengl.cpp: Make OpenGLChangeToSetting() store the lighting lookup in a GL_R16 texture]
[46:33][Step in to OpenGLRenderCommands() and inspect the voxel lookup parameters]
[49:32][Capture a frame and inspect the graphical data to determine that we are sending down our values properly]
[55:57][handmade_opengl.cpp: Investigate how we are looking up into our texture]
[1:00:31][handmade_opengl.cpp: Initialise LookupSampler as a usampler3D and try to store the LightingLookup as a GL_R16UI]
[1:05:58][Investigate why we can't store the LightingLookup as a GL_R16UI[ref
site="docs.GL"
page="glTexImage3D"
url="http://docs.gl/gl3/glTexImage3D"]]
[1:14:14][handmade_opengl.cpp: Store the LightingLookup as a GL_R32F]
[1:16:16][Capture a frame with a view to stepping through the shader[ref
site="NVIDIA GameWorks Documentation"
page="OpenGL Shader Debugging"
url="http://docs.nvidia.com/gameworks/index.html#developertools/desktop/nsight/shader_debugger_ogl.htm%23kanchor91"]]
[1:24:15][handmade_opengl.cpp: Toggle off the setting of VoxI and the simulation bounds debug visualisation]
[1:30:46][handmade_opengl.cpp: Try to set UseLightC manually]
[1:33:30][Capture a frame and inspect the values in the lookup sampler]
[1:35:21][handmade_platform.h: Try to force our voxel's LookupAt data to be floating point]
[1:41:22][win32_handmade.cpp: Make the game launch windowed by default]
[1:41:55][Capture a frame and inspect our voxel populated with values]
[1:46:47][handmade_opengl.cpp: Try to enable CompileZBiasProgram() to read the stored values out of the texture]
[1:48:03][Run the game and see that we still get nothing]
[1:48:40][handmade_opengl.cpp: Make CompileZBiasProgram() colour the voxels by their UV position]
[1:50:11][Run the game to see that the voxel positions are incorrect]
[1:51:48][handmade_opengl.cpp: Try to make CompileZBiasProgram() draw the voxels as red if we are outside the voxel]
[1:55:03][Run the game to confirm that we have a voxel alignment problem]
[1:58:41][Q&A][:speech]
[1:59:21][@insofaras][Try using GL_RED_INTEGER instead of GL_RED]
[1:59:52][handmade_opengl.cpp: Make OpenGLRenderCommands() use GL_RED_INTEGER for the LookupTexture]
[2:01:27][Run the game to see that our texture lookup is now correct]
[2:02:02][handmade_opengl.cpp: Switch the lookup texture back to using the regular integer]
[2:05:00][Run the game now storing the texture in integers]
[2:05:31][@k2t0f12d][Needs more 0x738]
[2:05:54][@jlwiza1][I was wondering if you checked out GPUOpen]
[2:06:06][@senjai][How much prep do you do before every episode?]
[2:07:04][@ttbjm][I'm curious if fixing the WM message bug also fixed the crash in RenderDoc]
[2:07:25][@jameswidman][re shader debugging: "\[1\] Shader debugging is supported on Kepler family GPUs for Direct3D 11 and OpenGL \[4.2 to 4.5\]. Direct3D 12 & Vulkan APIs and Maxwell & Pascal family GPUs will be supported in upcoming releases." -- source: https://developer.nvidia.com/nsight-visual-studio-edition-requirements]
[2:07:45][@bleedingegg][In my experience it's very good for developing GLSL to keep shaders in files, and have the software automatically reload them if they're changed. You can change them on the fly to try out different things. You also get syntax highlighting, and you can use #line to offset the line number for better error messages]
[2:08:35][@abarishu][Off topic, so it's ok to ignore if you're in a hurry. Do you have any experience with rendering "impossible" spaces? Like in Antichamber or the secret levels of Duke Nukem 3D?]
[2:09:39][Inspect our integer image]
[2:10:26][Try to debug in RenderDoc with 0x738 fixed]
[2:12:15][Close it down][:speech]
[/video]