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

72 lines
5.9 KiB
Plaintext

[video output=day603 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Grid Raycaster Table Generation" vod_platform=youtube id=24VtonJ4Xj0 annotator=Miblo]
[0:03][Welcome to the stream][:speech]
[1:42][Set up to implement ComputeWalkTable()][:lighting :research]
[3:33][Implement ComputeWalkTable()][:lighting]
[7:24][Consider how to encode the dGrid in walk_table_entry, computing it at runtime][:lighting :research]
[9:10][Augment the lighting_solution with a walk_table_entry][:"data structure" :lighting]
[10:13][Make ComputeWalkTable() write to our dynamic lighting_solution][:lighting]
[16:22][Make InitLighting() call ComputeWalkTable(), removing light_sampling_sphere_2][:"data structure" :lighting]
[21:21][Desire a big, easy-to-clean glass bottle][:speech]
[22:11][Augment lighting_solution with a memory_arena TableMemory and TableVoxelDim for BeginLightingComputation() to use][:lighting :memory]
[29:29][Estimate the :memory requirements (393,216 rays' worth) and cycles available (509) for the ray casting][:admin :lighting :performance]
[31:53][Define our LIGHT_SAMPLING values for FullCast() to use, and include handmade_simd.h and handmade_sampling_spheres.inl in handmade_lighting.cpp][:lighting]
[42:18][Consider the pipeline to be running properly][:lighting :speech]
[42:43][Break][:admin]
[42:52][:afk]
[45:13][Return][:admin]
[45:27][@math_daemon_][Plot twist: [@cmuratori Casey] accidentally hit the switch and is still coding / talking]
[45:50][@somebody_took_my_name][Can I get a recap of the first hour?]
[45:54][Make OutputSphereINL() write out the new light_sample_direction struct and LIGHT_SAMPLING defines][:"data structure" :"file io" :lighting]
[48:42][Reacquaint ourselves with GenerateOctahedralLightingPattern()][:lighting :research]
[50:52][Make GenerateOctahedralLightingPattern() return the OutputDirections to be passed to OutputSphereINL()][:lighting]
[54:57][Invoke hhsphere][:admin :lighting]
[55:18][Respecify hhsphere to take as arguments <octahedron count> and <rays per octahedron>][:lighting]
[1:00:40][Invoke hhsphere][:admin :lighting]
[1:00:51][Respecify hhsphere to take as an argument <octahedron dim>][:lighting]
[1:02:14][Invoke hhsphere][:admin :lighting]
[1:03:02][@trolledwoods][[@naysayer88 Jonathan Blow] would like to know your address]
[1:03:36][@somebody_took_my_name][Always send [@naysayer88 him] your address]
[1:03:39][Send our address to [@naysayer88 Jon]][:admin]
[1:05:34][@philoez98][They're trolling]
[1:05:49][Inspect temp.inl][:admin :lighting]
[1:06:17][Make OutputSphereINL() write out the RawDirections][:"file io" :lighting]
[1:07:49][@pragmascrypt][Everyone is fired]
[1:08:14][Invoke hhsphere][:admin :lighting]
[1:08:43][Inspect temp.inl and copy it into place][:admin :lighting]
[1:09:41][Fix compile errors][:lighting]
[1:09:55][Fix OutputSphereINL() to insert the semicolon][:"file io" :lighting]
[1:10:01][Make ProfileRun() initialise the TableMemory][:lighting :memory]
[1:12:57][:Run hhlighprof and hit a read access violation in BuildSpatialPartitionForLighting()][:lighting]
[1:13:53][Make BuildSpatialPartitionForLighting() allocate :memory for the SpatialGridNodes][:lighting]
[1:15:07][:Run hhlighprof and hit a read access violation in ComputeVoxelIrradianceAt()][:lighting]
[1:16:14][On indexing into similar but not identical overlapping sets of data][:language :speech]
[1:19:46][Fix ComputeLightPropagationWork() to index in to the aproned voxel][:lighting]
[1:22:41][:Run hhlighprof and hit the same read access violation in ComputeVoxelIrradianceAt()][:lighting]
[1:24:44][Fix ComputeWalkTable() to set the tTerminate to a valid value][:lighting]
[1:25:52][:Run hhlighprof and hit the same read access violation in ComputeVoxelIrradianceAt()][:lighting]
[1:28:18][Make GridRayCast() initialise the ProbeSamplePSingle to the incoming RayOriginSingle][:lighting]
[1:28:36][:Run hhlighprof and hit the same read access violation in ComputeVoxelIrradianceAt()][:lighting]
[1:30:41][Consider the rounding subtraction in ComputeVoxelIrradianceAt()][:lighting :run]
[1:32:06][Prevent ComputeVoxelIrradianceAt() from rounding down when setting the FCoord][:lighting]
[1:32:27][:Run hhlighprof and hit the same read access violation in ComputeVoxelIrradianceAt()][:lighting]
[1:33:19][Make GridRayCast() initialise the ProbeSampleNSingle to the incoming RayDSingle][:lighting]
[1:33:49][:Run hhlightprof successfully][:lighting]
[1:34:11][hhlightprof total seconds elapsed: 5.363018][:lighting :run]
[1:35:46][Q&A][:speech]
[1:36:14][@insobot][Q: Cathedral or bust?]
[1:37:29][@somebody_took_my_name][Q: Can we try the game in the current state?]
[1:37:55][:Run the game to see a black screen][:lighting]
[1:38:25][@billdstrong][Q: Since this new pass is to speed up :performance, where do you foresee getting speedups after this pass?][:lighting]
[1:39:30][@mindmark42][Q: Given two points, do you think there might be a way to calculate the number voxel cells a Bresenham-like line algorithm will touch? Without walking?]
[1:39:58][@uplinkcoder][Q: Can you run hhlightprof?]
[1:41:40][@erik_ava][Q: Has it ever happened that you put so much work in an idea and it turned out not working out?]
[1:43:33][@billdstrong][Q: Could we generate all these tests we do for the :lighting at box creation?]
[1:43:56][@mattiamanzati][Q: Since hhlightprof just runs RayCast(), maybe we put more work into building the occluder leaves than before?]
[1:47:08][@sagian2005][Q: Glass milk bottles]
[1:47:53][@thetamiel][Q: You've mentioned before at RAD you made a tool for detecting indexing errors. How would a tool like that work?]
[1:50:33][@xsinxdx][@sagian2005 How old are you?]
[1:51:39][@billdstrong][Q: Could we look for only the farthest box a Ray would hit, and eliminate testing all the boxes in between?][:lighting]
[1:52:24][@infinum][Q: How has that 30 Million Lines Problem been going on? Have some hardware vendors contacted you about it or maybe said something?]
[1:53:48][Wrap it up][:speech]
[/video]