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

69 lines
5.4 KiB
Plaintext
Raw Normal View History

[video output=day598 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Exploring Voxel Partitions for Raycasting" vod_platform=youtube id=gHAH9h_WVyM annotator=Miblo]
2020-05-05 15:52:51 +00:00
[0:00]["If anything, we should be looking for technologies that allow us to reduce latency"][:speech]
[0:09][Welcome to the stream with a plug of the Meow the Infinite printed comic Kickstarter[ref
site=Kickstarter
page="Meow the Infinite: Book One"
url=https://www.kickstarter.com/projects/annarettberg/meow-the-infinite-book-one]][:speech]
[0:48][Set up to talk about spatial partitioning for :lighting][:run]
[1:53][A few words on our "Binary AAB Tree", with Axis-aligned split planes][:"data structure" :lighting :speech]
[2:28][Old k-d hhlightprof total seconds elapsed: 6.279085][:"data structure" :lighting :run]
[2:57][Toggle off LIGHTING_USE_OLD_KD][:"data structure" :lighting]
[3:03][:Run the new k-d hhlightprof without completing][:"data structure" :lighting :run]
[4:15][Toggle on LIGHTING_USE_OLD_KD][:"data structure" :lighting]
[4:24][:Run the old k-d hhlightprof and consult the :profiling statistics][:"data structure" :lighting]
[5:57][Make ProfileRun() print the average Partitions and Leaves per Ray][:"data structure" :lighting]
[8:26][Old k-d hhlightprof Partitions per Ray: 5; Leaves per Ray: 24][:"data structure" :lighting :run]
[9:29][Consider the notion of a Voxel Containment Field for raycasting][:"data structure" :lighting :speech]
[11:48][@bearexplicit][Leaves and Planes switched, @handmade_hero]
[11:53][Fix the average Partitions and Leaves per Ray printing in ProfileRun()][:"data structure" :lighting]
[12:00][Old k-d hhlightprof Partitions per Ray: 24; Leaves per Ray: 5][:"data structure" :lighting :run]
[12:58][Grid Raycasting][:blackboard :"data structure" :lighting]
[14:00][Current "Binary AAB Tree" Raycasting][:blackboard :"data structure" :lighting]
[15:29][Possible new Grid Raycasting][:blackboard :"data structure" :lighting]
[17:52][Storing grid square occupants as indices vs copies][:blackboard :"data structure" :lighting]
[19:57][Determine to measure the voxel occupancy of our current geometry elements (occluders, light sources)][:blackboard :"data structure" :lighting]
[23:10][Introduce GridRayCast() using RayCast() as the starting point][:"data structure" :lighting]
[23:56][Change RayCast() to increment TotalCastsInitiated by 4][:lighting]
[25:07][Continue to implement GridRayCast()][:"data structure" :lighting]
[42:46][Set up to make BuildSpatialPartitionForLighting() swizzle the lighting boxes into a 4-wide :SIMD format][:"data structure" :lighting]
[46:11][Continue to implement GridRayCast()][:"data structure" :lighting]
[49:41][Consider the instructional implications of each ray having their answer spread across multiple values[ref
site=Intel
page="Intel Intrinsics Guide"
url=https://software.intel.com/sites/landingpage/IntrinsicsGuide/]][:"data structure" :lighting :research]
[56:15][Sketch out our tRay selection in GridRayCast()][:"data structure" :lighting]
[1:01:00][Consult the old ray hit extraction code in RayCast()][:"data structure" :lighting :research]
[1:02:33][Enable GridRayCast() to directly extract the ray hit][:"data structure" :lighting]
[1:16:30][Consider our grid raycasting to be worth doing, only questioning the tRay selection, especially its horizontal comparing][:"data structure" :lighting :speech]
[1:17:56][_mm_shuffle_epi8[ref
site=Intel
page="Intel Intrinsics Guide"
url=https://software.intel.com/sites/landingpage/IntrinsicsGuide/] in SSSE3[ref
site=Wikipedia
page="SSSE3"
url=https://en.wikipedia.org/wiki/SSSE3] and its availability according to the Steam Hardware & Software Survey[ref
site=Valve
page="Steam Hardware & Software Survey"
url=https://store.steampowered.com/hwsurvey]][:research :simd]
[1:22:19][Enable GridRayCast() to select the tRay using _mm_shuffle_epi8, and to extract the ray hit in :SIMD][:"data structure" :lighting]
[1:27:35][Clean up the ray hit extraction in GridRayCast(), and set up RayCast() to compare our old and new ray casting schemes][:"data structure" :lighting]
[1:30:48][Reflect on our new grid raycasting scheme][:"data structure" :lighting :speech]
[1:35:00][@mystran][:Lighting is really really simple… until you want to make it run in real-time]
[1:35:37][Toggle off GridRayCast() and sketch out the grid build in BuildSpatialPartitionForLighting()][:"data structure" :lighting]
[1:46:06][Q&A][:speech]
[1:46:47][@sagian2005][Q: Couldn't you use a couple of "_mm_hsub" to do your horizontal compare?][:simd]
[1:47:13][_mm_minpos_epu16 in SSE4.1[ref
site=Intel
page="Intel Intrinsics Guide"
url=https://software.intel.com/sites/landingpage/IntrinsicsGuide/]][:research :simd]
[1:48:43][Begin to sketch out the tRay selection using _mm_minpos_epu16 from SSE4.1[ref
site=Intel
page="Intel Intrinsics Guide"
url=https://software.intel.com/sites/landingpage/IntrinsicsGuide/]][:"data structure" :lighting :simd]
[1:52:30][@ikojan][Q: When it comes to game dev / engine dev what do you believe is the hardest aspect to implement? Lighting, editors, etc?]
[1:54:07][@ayskrym900][Q: How can you switch that fast between navigating into code and typing? The arrow keys are pretty far from the home row]
[1:54:50][@tek256][@naysayer88 the never ending raid chain]
[1:55:10][@nivimani][[@naysayer88 Jon] has lunch]
[1:55:42][End it here][:speech]
[/video]