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

77 lines
5.6 KiB
Plaintext

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Creating Lighting Textures" vod_platform=youtube id=5XwOoh-k4AI annotator=Miblo]
[0:03][Recap and set the stage for the day with a few words on renderer programming]
[2:58][Light probing]
[4:01][Try to run the game, but be told that our Visual Studio Community 2013 license "has gone stale"]
[7:42][Consider our options]
[9:54][Check for a build of Milton for Linux[ref
site="Milton"
url="https://milton.handmade.network/"]]
[12:05][Consider taking a poll]
[13:41][Try putting in our credentials]
[17:43][Run the game and note the problem imposed by the 2.5D world with respect to lighting]
[20:43][Consider making a voxelisation pass in order to give us some usable geometry]
[23:10][Blackboard: Looking up our lighting from a texture]
[26:53][Blackboard: Extending this texture sampling into three dimensions]
[31:17][Blackboard: Spherical harmonics and Fourier transform]
[38:04][Blackboard: Lighting Equation]
[39:34][handmade_opengl.cpp: Make CompilePeelComposite() not use the specular but only the diffuse coefficient, and run the game to see what that looks like]
[40:51][Blackboard: Specular and Diffuse]
[44:01][Blackboard: Reflections]
[49:48][Blackboard: Texture encoding for the lighting]
[56:32][handmade_opengl.h: Add lighting data to the open_gl struct]
[58:26][handmade_platform.h: Enable DefaultRenderCommands() to set lighting settings]
[59:12][handmade_opengl.cpp: Enable OpenGLChangeToSettings() to create a lighting framebuffer]
[1:02:40][Consider the need for a different type of storage from the depth peels]
[1:04:41][handmade_platform.h: Add lighting data to the game_render_settings struct]
[1:05:14][handmade_opengl.cpp: Start to enable OpenGLChangeToSettings() to create a light texture]
[1:06:19][handmade_platform.h: Specify that the lighting data in game_render_settings is a power of 2]
[1:06:56][handmade_opengl.cpp: Finish enabling OpenGLChangeToSettings() to fully create a light texture]
[1:08:48][Blackboard: Consider storing three directional and one intensity value]
[1:13:06][hanmdade_opengl.cpp: Enable CreateFramebuffer() to handle floating point textures]
[1:14:55][Run the game with a floating point depth buffer]
[1:16:09][handmade_opengl.cpp: Try using GL_DEPTH_COMPONENT24 and run the game to see how that is]
[1:18:04][handmade_opengl.cpp: Set up CompilePeelComposite() to handle our new lighting texture encoding]
[1:23:44][Run the game to see the exact same thing]
[1:24:21][handmade_opengl.cpp: Make CompilePeelComposite() produce coloured light]
[1:24:45][Run the game to see that coloured light]
[1:26:07][Q&A][:speech]
[1:26:44][@insobot][12 minutes into the main stream. 108 until Q&A. (based on NOTE)]
[1:27:38][@Miblo][On a scale of 0-15, how disappointed are you that Visual Studio continued working as normal today?]
[1:28:50][@desuused][Don't you find this lighting way too advanced for a 2.5D game?]
[1:29:59][@uplinkcoder][Can I stream C => D conversion of Handmade Hero, without infringing on the copyright?]
[1:31:07][@sharlock93][How excited are you for Per's project?]
[1:32:09][@sharlock93][No, he is making an entire computer from scratch using FPGAs and hardware]
[1:32:31][Mention riskyfive's FPGA-based project]
[1:32:46][@rupan3][Will Jon ever do handamde compiler?]
[1:33:41][@Miblo][It's actually miotatsu who's doing RISCY BUSINESS]
[1:35:39][@cubercaleb][Short of the fact that most gamers use Windows, is there any reason to do most of the development on Windows?]
[1:38:16][@ray_caster][Do you have any anecdotes of horrible debugging (CPU) experiences using Linux debuggers?]
[1:40:16][@dmitsuki][Have you considered vscode over Visual Studio? Still Microsoft, but much more lightweight, and you get the visual studio debugger]
[1:40:33][@ray_caster][Have you tried visual debugging using QT Creator? Does not seem to have the issues you describe, at least not for moderately large projects]
[1:41:02][@dmitsuki][On windows. on Linux you don't get the vc++ debugger]
[1:41:25][Try Visual Studio Code[ref
site="Visual Studio Code"
url="https://code.visualstudiocode.com"]]
[1:46:54][@cynokron][Reload]
[1:47:08][Reload Visual Studio Code]
[1:50:46][@ionutcava][Open Folder -> select source folder]
[1:51:04][Have doubts about Visual Studio Code]
[1:52:45][@desuused][I think in this particular case you're being dumb because you complain about a program you don't have experience in]
[1:53:57][@desuused][Open folder code, add configuration for C++, add breakpoint wherever you want, start debugging]
[1:55:51][@dmitsuki][Yeah, you can add more include directories]
[1:56:20][Gauge the single-stepping speed of Visual Studio Code]
[2:00:47][@dandymcgee][Help -> Toggle Developer Tools]
[2:01:54][@dmitsuki][You can view the disassembly]
[2:02:05][@dmitsuki][But I think you have to debug with -exec disassembly]
[2:03:03][@dmitsuki][If I recall correctly, it's in args]
[2:03:46][@dandymcgee]["You can view disassembly in vscode using the -exec disassembly command in the debug console. Registers can be viewed the same way (-exec info registers)"]
[2:05:09][@elim92][Just disassembly is the command]
[2:06:09][@desuused][You could try using command palette to look for disassembly (press Ctrl-Shift-P)]
[2:08:35][@wgg25][What's the reason behind checking out this atrocity of a program?]
[2:09:17][Plug Lysa and RemedyBD]
[2:10:58][@fr0styninja][How do you feel after today's stream. We nearly switched to Linux and now you're looking for answers regarding a web editor on stackoverflow]
[2:11:16][@ray_caster][Are you still tempted at moving the project to Linux?]
[2:12:20][@AsafGartner][Don't forget to delete the .vscode folder that it created]
[2:13:08][Wrap it up][:speech]
[/video]