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

57 lines
4.8 KiB
Plaintext
Raw Normal View History

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Multiple Software Render Targets" vod_platform=youtube id=NROKpZtyj_o annotator=Miblo]
[0:57][Recap and set the stage for the day]
[1:31][Debugger: Step into OpenGLRenderCommands() and inspect the Header]
[2:23][handmade_render_group.cpp: Make PushRenderElement_() correctly compute the Entry->Offset]
[3:51][Run the game and see how we're doing]
[4:45][handmade_world_mode.cpp: Make AddStandardRoom() only generate one room, run the game and again assess our situation]
[5:38][handmade_render_group.cpp: Ensure that PushRenderElement_() is correctly setting the Offset]
[6:27][Run the game and see our baseline]
[6:30][handmade_render_group.cpp: Tweak how BeginAggregateSortKey() and EndAggregateSortKey() work]
[11:04][handmade_world_mode.cpp: Revert AddPlayer() to pushing the player sprites in logical order]
[11:41][Run the game and identify that the head can still be sorted incorrectly when we have a cycle]
[14:12][handmade_world_mode.cpp: Make AddStandardRoom() generate multiple rooms]
[14:42][Run the game and find that we're now not getting those blinking tree bugs]
[16:03][Run the game and consult the profiler]
[17:20][build.bat: Switch to -O2, run the game and again consult the profiler]
[19:24][Run the game and demo the problem with alpha blending]
[20:52][handmade_entity.cpp: Make UpdateAndRenderEntities() draw the traversables in red]
[21:25][Run the game and demo the alpha blending problem]
[22:06][handmade_entity.cpp: Make UpdateAndRenderEntities() draw the traversables half as wide as normal]
[22:36][Run the game and most clearly demo the alpha blending problem]
[23:50][handmade_render.cpp: Consider introducing the notion of a coherent block for SortEntries() to use]
[25:56][Run the game and toggle between the software and hardware renderers]
[27:24][Blackboard: Multiple Render Targets]
[31:46][handmade_render.cpp: Make SoftwareRenderCommands() take a TempArena, take a renamed FinalOutputTarget and reserve a second OutputTarget]
[36:59]["Oh, we VirtualAlloc'd that. Wow, aren't we fancy!"][quote 511]
[37:14][handmade_render.cpp: Make SoftwareRenderCommands() pass to PushSize() a call to AlignNoClear(16) in order to align it to 16-byte boundaries]
[37:41][Run the game and see nothing on the screen]
[37:59][handmade_render.cpp: Make SoftwareRenderCommands() copy the pixels from the OutputTarget in the FinalOutputTarget]
[38:49][Run the game and see that we've made our renderer slower]
[39:03][Blackboard: What SoftwareRenderCommands() is now doing]
[39:37][handmade_render.cpp: Consider enabling SoftwareRenderCommands() to render to multiple render targets]
[41:41][handmade_render_group.h: Add a RenderTargetIndex to the render_entry_cliprect struct]
[43:14][handmade_render_group.cpp: Make PushClipRect() take a RenderTargetIndex in order that it can specify the RenderTarget to which it wants to render]
[44:55][handmade_debug.h: Add RenderTarget to the debug_state struct]
[45:21][handmade_render_group.cpp: Make PushClipRect() set RenderTargetIndex]
[46:11][handmade_platform.h: Add MaxRenderTargetIndex to the game_render_commands struct]
[46:34][handmade_render.cpp: Make SoftwareRenderCommands() clone the render buffers based on that RenderTargetCount]
[49:53][handmade_render.h: Change OutputTarget to be a RenderTargets array in the tile_render_work struct]
[50:21][handmade_render.cpp: Make RenderCommandsToBitmap() take a RenderTargets array]
[52:54][handmade_debug.cpp: Make DEBUGBegin set the RenderTarget to 1]
[53:33][Run the game and watch the debug information disappear into that other RenderTarget]
[54:07][Q&A][:speech]
[54:51][@popcorn][Next week?]
[56:11][@necktrox][A bit unrelated to the project, but what do you think about the Rust language?]
[56:39][@billdstrong][So when do we think we will be ready for the new graphics assets? I'm excited]
[57:26][@sn0uk][Can you explain what this game is?]
[59:16][@Miblo][Is writing to that other currently invisible render target much / any less computationally expensive than also sending it to the display?]
[1:00:50][@soysaucethekid][With multiple rendering targets, are there other effects you can do other than the alpha blending?]
[1:02:04][@necktrox][Are you going to support shaders and, if so, will you try to support multiple render targets in the shaders?]
[1:04:02][@pandnh4][Are you excited to get an AArch64 toolchain up and running to get this thing to run on a Raspberry Pi 3?]
[1:04:37][@lord_marshall_][Are you still working full time? Why only stream one hour a night?]
[1:04:50][@se24vad][How would you go about rendering huge tilemaps? Some batching techniques, or any tips?]
[1:06:05][@billdstrong][Would that be a good technique to use to create an overhead map?]
[1:07:16][@insobot][Soa and aos questions can be made with as minimal interference in timing the host operating]
[1:07:37][Close down][:speech]
[/video]