Annotate hero/code423

Also standardise some category tags
This commit is contained in:
Matt Mascarenhas 2018-01-28 18:43:07 +00:00
parent bc0eac078c
commit e068ec23c1
3 changed files with 55 additions and 3 deletions

View File

@ -49,7 +49,7 @@
[1:57:46][:Run the game to see that we're better][:lighting :rendering]
[1:58:58][Q&A][:speech]
[2:00:03][@areriff][Q: Is there any way to put a break point outside Visual Studio?]
[2:01:22][Pull up the :profiler and note the cycle usage of ComputeLightPropagation][:run]
[2:01:22][Pull up the profiler and note the cycle usage of ComputeLightPropagation][:performance :run]
[2:02:32][@theditv][Q: What do you think about the blockchain future? I have no idea if questions outside of the game are allowed][:currency]
[2:06:30][@vtlmks][Q: Shouldn't we go back to do more stuff in assembler like on the Amiga][:asm]
[2:06:39][@areriff][Q: How do you jump to a function during debugging? Usually there's a lot of functions and not easy to find them]
@ -61,7 +61,7 @@
page="Mars Climate Orbiter"
url=https://en.wikipedia.org/wiki/Mars_Climate_Orbiter#Cause_of_failure]][:geometry :hardware :measurement]
[2:16:25][@elnar4uk][Q: What kind of :memory allocations do you use? Are there any custom stack allocations, pools etc. or are you using standard malloc / new? If custom, how do you define memory chunk size?]
[2:17:05][@gprincip][Q: Did you manually build all of the menus currently on the screen, or get it from somewhere?][:profiler :ui]
[2:17:05][@gprincip][Q: Did you manually build all of the menus currently on the screen, or get it from somewhere?][:profiling :ui]
[2:17:32][@areriff][Q: Is ComputeLightPropagation 92% seems too high at the moment?]
[2:17:46][@euler9119][Q: Hi [@cmuratori Casey], would you be able to recommend good resources to learn / practise efficient programming habits (e.g. efficient algorithms, code, etc.)?]
[2:18:23][@ingenero][Q: Can :metaprogramming do everything and solve all the world's problems?]

View File

@ -5,7 +5,7 @@
[6:30][Replace HitSurface in AccumulateSample() and RayCast() with a lighting_box][:lighting :rendering]
[16:10][:Run the game to see our slow :lighting solution, and determine to investigate the slowness][:rendering]
[18:01][Add a TIMED_FUNCTION in RayCast()][:"debug system"]
[18:22][:Run the game and consult the :profiler to see that RayCast() is our most costly function][:lighting :rendering]
[18:22][:Run the game and consult the profiler to see that RayCast() is our most costly function][:lighting :performance :rendering]
[19:48][Check the day[ref
site="Handmade Hero"
page="Annotated Episode Guide"

View File

@ -0,0 +1,52 @@
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Modifying Lighting to Use a Spatial Hierarchy" vod_platform=youtube id=XFR9WRnPgx4 annotator=Miblo]
[0:07][Recap and set the stage for the day, optimising the :lighting][:optimisation :rendering :speech]
[2:37][Consider the intractability of O(n²) algorithms][:speech]
[7:10][Consider the kinds of numbers at play in our :lighting system, and possible ways to optimise it as it is][:blackboard :optimisation :rendering]
[10:50][Standard raycasting acceleration structure, bucketing up :lighting elements][:blackboard :geometry :optimisation :rendering]
[14:38][Ordered traversal of this acceleration structure][:blackboard :geometry :lighting :optimisation :rendering]
[17:29][k-d tree][:blackboard :geometry :lighting :optimisation :rendering]
[20:42][Multiresolution tree, aggregating :lighting elements to produce a plausible, approximate solution][:blackboard :geometry :optimisation :rendering]
[25:30][Consider unifying the spatial partitioning for use by all systems][:geometry :speech]
[30:01][Create handmade_lighting.h and handmade_lighting.cpp][:lighting :rendering]
[33:39][A few words on separating code into files][:speech]
[35:24][Continue to populate handmade_lighting.h and #include our new files][:lighting :rendering]
[38:11][:Run the game to see our :lighting solution running not multiresolution, and consider how to split it into pieces][:optimisation :rendering]
[44:31][Augment lighting_box and lighting_solution to support child nodes, and propagate this to LightingTest() and RayCast()][:geometry :lighting :optimisation :rendering]
[56:27][:Run the game and consult the :lighting solution data in the profiler][:performance :rendering]
[58:57][Begin to enable RayCast() to operate on a spatial partition][:geometry :lighting :optimisation :rendering]
[1:04:00][Simplify raycast_result and reorganise RayCast() to handle this][:lighting :rendering]
[1:08:38][:Run the game to see that that didn't much affect our speed][:lighting :rendering]
[1:08:57][Introduce a new RayCast(), rename the existing one to RayCastRecurse() and continue to enable it to operate on a spatial partition, calling itself recursively][:geometry :lighting :optimisation :rendering]
[1:14:10][A few words on ray intersection of a convex vs concave solid][:geometry :speech]
[1:14:50][Finish implementing RayCastRecurse()][:geometry :lighting :optimisation :rendering]
[1:16:22][Introduce BuildSpatialPartitionForLighting()][:geometry :lighting :optimisation :rendering]
[1:22:30][:Run the game to see that we're doing okay][:geometry :lighting :optimisation :rendering]
[1:23:05][Checking against the backface, to handle the case when a ray originates inside a cube][:blackboard :geometry]
[1:25:48][:Run the game to confirm that it seems to be working okay][:geometry :lighting :optimisation :rendering]
[1:26:52][@insobot][86 minutes into the main stream. 34 until Q&A. (based on NOTE)]
[1:27:08][Consider how to build a basic spatial partition][:geometry :lighting :optimisation :rendering :speech]
[1:29:33][:Run the game to see that ComputeLightPropagation takes 148,634,510 cycles][:performance]
[1:30:04][Add BoxTable indirection to lighting_solution, and introduce GetBox()][:geometry :lighting :optimisation :rendering]
[1:32:43][Enable BuildSpatialPartitionForLighting() to loop over our BoxTable][:geometry :lighting :optimisation :rendering]
[1:33:43][:Run the game to see black][:geometry :lighting :optimisation :rendering]
[1:33:54][Fix BuildSpatialPartitionForLighting() to loop over the BoxTable after BoxCount has been incremented][:geometry :lighting :optimisation :rendering]
[1:34:21][:Run the game to see that that's fine and did not appreciably affect our :performance][:geometry :lighting :optimisation :rendering]
[1:34:44][Note that our indirection table allows a single child node to be placed in multiple places][:geometry :speech]
[1:35:39][Introduce AddOverlappingBoxes() and SplitBox()][:geometry :lighting :optimisation :rendering]
[1:43:14][:Run the game and note that we are testing against a spatial hierarchy][:geometry :lighting :optimisation :rendering]
[1:43:43][Make PlayWorld() generate 32 screens][:"procedural generation"]
[1:44:13][:Run the game to see our slowdown][:geometry :lighting :optimisation :rendering]
[1:50:06][Q&A][:speech]
[1:50:43][@praet_a51][Q: Can you try :lighting as it is in a release build?][:rendering]
[1:50:56][Try to build in release mode]
[1:51:17][:Run the game to see that the O(n²) is too slow]
[1:51:39][Make PlayWorld() produce fewer rooms][:"procedural generation"]
[1:51:51][:Run the game to see the fine framerate]
[1:52:44][@Miblo][Q: You mentioned something about the need to handle concave and convex solids differently when raycasting, due to (I believe) the possibility of entering and leaving a single face of a concave solid multiple times. Any chance you could explain a little more how this could affect us if we had concave solids?][:geometry]
[1:53:01][Optimally raycasting a split convex solid, based on its front face][:blackboard :geometry :optimisation]
[1:57:58][Raycasting a split concave solid][:blackboard :geometry :optimisation]
[2:02:35][Raycasting against back faces of concave solids may work the same][:blackboard :geometry :optimisation]
[2:06:16][@enyo_enev][Q: Why did we skip the part with placing cubes over entities such as trees and the hero. And also they should reveice light in some way right ?]
[2:06:43][@zennmystic][Q: We just noticed your ~4coder and ~Milton are colour coordinated. What are the values?][:trivia]
[2:07:45][That's it for today][:speech]
[/video]