Index hero/code617

This commit is contained in:
Matt Mascarenhas 2020-07-13 22:19:25 +01:00
parent f676c915c0
commit 7e1c11e134
1 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,83 @@
[video output=day617 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Half-resolution Spatial Grid" vod_platform=youtube id=1TGecaeol7g annotator=Miblo]
[0:00][Recap and set the stage for the day][:speech]
[0:27][Briefly show the current :lighting][:run]
[0:37][Describe the new inline :lighting grid traversal][:research]
[2:45][Table-driven Raycast][:blackboard :lighting]
[5:21][Correspondence Between the :Lighting and Spatial Grids][:blackboard]
[8:28][Storage costs and compressibility of grid correspondence][:blackboard :compression :lighting]
[11:53][High-resolution :lighting grid marching, before stepping down to the low-resolution spatial grid][:blackboard]
[15:08][Prepare to define a lower resolution spatial occupancy grid][:lighting :research]
[15:57][Toggle off the inline :lighting grid traversal in GridRayCast()]
[16:18][hhlightprof total seconds elapsed: 4.453437][:lighting :performance :run]
[17:50][Consider how to reduce the spatial grid resolution][:lighting :research]
[19:28][Halve the SpatialGrid resolution in ProfileRun(), updating ComputeLightPropagation() to account for this][:lighting]
[26:14][hhlightprof BoxCount\[0\]: 1400][:lighting :performance :run]
[26:41][Fix the SpatialGrid apron size in ProfileRun()][:lighting]
[27:21][hhlightprof BoxCount\[0\]: 1400][:lighting :performance :run]
[27:37][Build in -Od]
[28:00][Step through ProfileRun() and inspect the SpatialGrid][:lighting :run]
[29:12][Make ProfileRun() position the SpatialGrid using SetMinCorner()][:lighting]
[31:20][hhlightprof BoxCount\[0\]: 1400][:lighting :performance :run]
[31:37][Step through ProfileRun() and inspect the SpatialGrid][:lighting :run]
[31:46][Make ProfileRun() account for the lower resolution when setting SpatialMinCorner][:lighting]
[33:41][hhlightprof box distribution: More desirable][:lighting :performance :run]
[35:00][@cachurai][Statistically speaking, how much of Twitch chat do you think understands the principles the streamer is transmitting?]
[35:27][Assess our box distribution][:lighting :performance :run]
[36:38][Build in -O2]
[37:01][hhlightprof total seconds elapsed: 4.673890][:lighting :performance :run]
[38:14][Toggle off the SpatialGrid downscaling in ProfileRun()][:lighting]
[38:37][Introduce voxel_sparse_index and SparseIndexFrom()][:"data structure" :lighting]
[45:49][Revert voxel_sparse_index and SparseIndexFrom()][:"data structure" :lighting]
[45:56][Why safely build the additional tables][:lighting :research]
[46:44][Expand the LightSamplingWalkTable in lighting_solution and introduce GetOctantFor() to correctly index into it][:"data structure" :lighting]
[56:09][Decrease MaxCostPerRay from 16 to 8 in UpdateLighting() and ProfileRun()][:lighting]
[58:06][Make ComputeWalkTable() build all eight octants of the LightSamplingWalkTable][:lighting]
[1:02:45][On indexing mismatch bugs][:speech]
[1:04:36][Toggle on the grid positioning code in ProfileRun()][:lighting]
[1:05:15][Crash hhlightprof][:lighting :run]
[1:05:34][Change LightSamplingWalkTable to be an array of 8 in lighting_solution][:"data structure" :lighting]
[1:05:46][:Run hhlightprof successfully][:lighting]
[1:06:01][Build in -O2]
[1:06:16][hhlightprof total seconds elapsed: 4.226165][:lighting :performance :run]
[1:06:40][Our world is unlit][:lighting :run]
[1:07:12][Remove stale code from the :lighting system]
[1:10:25][Build in -Od]
[1:11:00][Step in to GridRayCast() and inspect the LightSamplingWalkTable and indices][:lighting :run]
[1:14:54][Remove further stale code from GridRayCast()][:lighting]
[1:16:31][Step through GridRayCast() watching the Node indices][:lighting :run]
[1:17:22][Make UpdateLighting() halve the SpatialGrid resolution and reposition it][:lighting]
[1:19:55][Our world is lit][:lighting :run]
[1:20:06][Build in -O2]
[1:20:14][Admire our :lighting][:run]
[1:20:42][hhlightprof total seconds elapsed: 4.256591][:lighting :performance :run]
[1:21:54][Note down our hhlightprof :lighting timing]
[1:22:38][Toggle off FullCast() in ComputeLightPropagationWork()][:lighting]
[1:23:23][hhlightprof total seconds elapsed: 1.028882][:lighting :performance :run]
[1:24:39][Gauge our :lighting :performance improvement][:admin]
[1:25:11][Toggle off GridBuildSpatialPartition() in InternalLightingCore()][:lighting]
[1:25:35][Crash hhlightprof][:lighting :run]
[1:25:48][Toggle off the SpatialGrid accessing in FullCast()][:lighting]
[1:26:06][Crash hhlightprof][:lighting :run]
[1:26:14][Revert our SpatialGrid toggles, and instead toggle off the main loops in GridBuildSpatialPartition() itself][:lighting]
[1:27:02][hhlightprof total seconds elapsed: 1.035324][:lighting :performance :run]
[1:27:16][Revert our GridBuildSpatialPartition() toggless][:lighting]
[1:27:37][hhlightprof total seconds elapsed: 4.230452][:lighting :performance :run]
[1:27:48][Q&A][:speech]
[1:28:34][@insobot][Q: Takeover the world, yet anything thing?]
[1:28:57][@frostyninja][Q: Missed a fair few weeks. Can you run through how the :lighting looks now?]
[1:31:05][@mougatron][Q: Do you plan to implement any de-noising on the light?][:lighting]
[1:31:27][@nickito97][Q: Is neon any better?][:isa]
[1:32:04][@miltondts][Q: Given that AVX2 is seven years old, would it help to use it instead of SSE?[ref
site=Valve
page="Steam Hardware & Software Survey"
url=https://store.steampowered.com/hwsurvey]][:isa]
[1:33:26][@mougatron][Q: Skylake-X also supports AVX-512][:isa]
[1:34:12][@mougatron][Q: Skylake-X is not server. But it is true that nobody has them[ref
site=WikiChip
page="Skylake X - Cores - Intel"
url=https://en.wikichip.org/wiki/intel/cores/skylake_x]]
[1:35:33][@billdstrong][Q: Couldn't we do two paths, one with and one without AVX2?]
[1:36:35][@maliusarth][Why is AVX-512 so uncommon?][:isa]
[1:37:39][@koschei_][There are a few laptops out with Ice Lake that has AVX-512][:isa]
[1:38:01][Wrap it up][:speech]
[/video]