diff --git a/cmuratori/hero/code/code618.hmml b/cmuratori/hero/code/code618.hmml new file mode 100644 index 0000000..a678e67 --- /dev/null +++ b/cmuratori/hero/code/code618.hmml @@ -0,0 +1,68 @@ +[video output=day618 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Analyzing the Diffuse Blur" vod_platform=youtube id=vwi-Tq0c64w annotator=Miblo] +[0:02][Recap and set the stage for the day][:speech] +[0:40][Demo the :lighting with different resolution spatial and lighting grids][:run] +[2:22][Determine to optimise the :lighting pipeline, and work on quality, smoothing out the rectilinear pattern and reducing flicker][:optimisation :run] +[5:02][Determine to compile at least the :lighting in clang, to gauge the :SIMD :performance][:run] +[6:50][How the :ABI works on Microsoft Windows, in terms of register use][:simd :speech] +[10:01][On the possible work getting the code to compile with clang, including its exploitation of undefined behaviour][:language :speech] +[13:46][hhlightprof total seconds elapsed: 4.221848][:lighting :performance :run] +[13:52][Determine to optimise the diffuse blur][:lighting :optimisation :research] +[14:31][Toggle off the diffuse blur in ComputeLightPropagationWork()][:lighting] +[14:50][hhlightprof total seconds elapsed: 3.233531][:lighting :performance :run] +[15:15][Briefly describe our diffuse blur in ComputeLightPropagationWork()][:lighting :research] +[15:59]["Seperable" Filters][:blackboard :dsp :filtering] +[18:55][Example filter: Linear blend][:blackboard :dsp :filtering] +[23:53][Example filter: Bilinear blend][:blackboard :dsp :filtering] +[27:20][Example seperable filter: two-pass, one-dimensional blends][:blackboard :dsp :filtering] +[29:16][Get some tissues][:admin] +[29:20][:afk] +[30:01][Return with tissues][:admin] +[30:20][Our current cosine-weighted falloff equation][:blackboard :dsp :filtering] +[35:47][Walk through UnitVectorFromOctahedral()][:lighting :research] +[37:38][Determine to print the weight map table][:filtering :lighting :research] +[39:11][Regular tea break][:admin] +[39:20][:afk] +[40:06][Return with the realisation that we're at risk of infringing [@naysayer88 Jon Blow]'s on-stream tea-making patent][:admin] +[40:27][Make ProfileRun() print the DiffuseWeightMap to stdout][:filtering :lighting] +[46:29][hhlightprof DiffuseWeightMap: Many 0s][:filtering :lighting :run] +[46:51][Reacquaint ourselves with the use of DiffuseWeightMap in ComputeLightPropagationWork][:filtering :lighting :research] +[48:46][Make ProfileRun() print out the DiffuseWeightMap, based on BuildDiffuseLightMaps()][:filtering :lighting] +[51:56][hhlightprof DiffuseWeightMap: Sensibly populated][:filtering :lighting :run] +[52:20][Make ProfileRun() print dashes when the Entry is 0][:filtering :lighting] +[52:49][hhlightprof DiffuseWeightMap: More visible shape][:filtering :lighting :run] +[53:10][Regular tea break][:admin] +[53:14][:afk] +[54:40][Return, with the tea now steeping][:admin] +[54:45][Analyse the DiffuseWeightMap printout for reused values][:filtering :lighting :research] +[58:43][Approaches to making the cosine falloff seperable: 1) Produce a somewhat similar, but regular pattern; 2) Classify values by their position][:filtering :lighting :research] +[59:32][There's the tea][:admin] +[59:37][:afk] +[1:00:17][Return and pour the tea][:admin] +[1:00:50][Try making ProfileRun() print out the DiffuseWeightMap 16×16, to see the shape when it wraps][:filtering :lighting] +[1:02:03][hhlightprof DiffuseWeightMap: 16×16 shapes, and identical rows between maps][:filtering :lighting :run] +[1:05:17][Consider changing the cosine falloff function to a basic blur][:filtering :lighting :research] +[1:06:28][Accidentally add a threshold of 0.01f to BuildDiffuseLightMaps()][:filtering :lighting] +[1:07:20][hhlightprof DiffuseWeightMap: Without threshold][:filtering :lighting :run] +[1:07:38][Add a threshold to the DiffuseWeightMap printout][:filtering :lighting] +[1:08:13][hhlightprof DiffuseWeightMap: Still without threshold][:filtering :lighting :run] +[1:08:24][Eyeball ProfileRun() for threshold bugs][:filtering :lighting :research] +[1:09:52][Step in to ProfileRun() and inspect W][:filtering :lighting :run] +[1:10:35][Fix the DiffuseWeightMap printout threshold in ProfileRun()][:filtering :lighting] +[1:11:25][hhlightprof DiffuseWeightMap: With threshold, blank columns][:filtering :lighting :run] +[1:13:45][Try various thresholds for the DiffuseWeightMap printout][:filtering :lighting :programming :run] +[1:14:54][Make ProfileRun() print out the DiffuseWeightMap 8×8][:filtering :lighting] +[1:15:05][hhlightprof DiffuseWeightMap: 8×8 shapes, with threshold][:filtering :lighting :run] +[1:15:47][Make ProfileRun() print out the X, Y and Z directions of a DiffuseWeightMap Element][:filtering :lighting] +[1:18:15][hhlightprof DiffuseWeightMap: Element directions][:filtering :lighting :run] +[1:18:42][Make ProfileRun() add a dash to its 0 printout][:filtering :lighting] +[1:18:56][hhlightprof DiffuseWeightMap: Element directions, completely symmetric][:filtering :lighting :run] +[1:22:35][Our cosine falloff equation, and its reusable terms][:blackboard :filtering :lighting] +[1:31:53][Rephrasing the DiffuseWeightMap generation in a seperable way][:blackboard :filtering :lighting] +[1:40:28][Determine to ruminate on the DiffuseWeightMap][:filtering :lighting :research] +[1:40:55][Q&A][:speech] +[1:41:35][@mindmark42][Q: Couldn't at least the tetrahedron unit vector function use a lookup table and lerp?][:lighting] +[1:42:38][@mindmark42][Q: Speed up that function, if it gets called a lot][:lighting :performance] +[1:43:47][Toggle on the diffuse blur in ComputeLightPropagationWork()][:lighting] +[1:43:52][Our desire to do the cosine falloff seperable, if we can][:lighting :filtering :research] +[1:45:21][Wrap it up][:speech] +[/video]