[39:37][Consider BuildDiffuseLightMaps() to be handling bounce direction correctly][:lighting :research]
[40:23][See if CompileZBiasProgram() samples light based on its direction][:lighting :research :sampling]
[43:00][Diffuse :sampling of cosine-weighted directional light][:blackboard :lighting]
[48:56][Make SumLight() in CompileZBiasProgram() just use the surface normal as the reflection vector when :sampling Lambertian (ideally diffuse) surfaces][:lighting]
[1:14:55][Try making CompileZBiasProgram() reduce the VoxUVW by half, in line with ComputeVoxelIrradianceAt()][:lighting]
[1:15:07][See the light disappear completely][:lighting :run]
[1:15:11][Revert VoxUVW and try making CompileZBiasProgram() reduce the VoxR by half][:lighting]
[1:15:44][See that the light is now centred properly, and the moonlight cannot reach downstairs][:lighting :run]
[1:17:06][Continue to scrutinise ComputeVoxelIrradianceAt()][:lighting :research]
[1:18:20][Try making ComputeVoxelIrradianceAt() reduce the real result by ×0.01f][:lighting]
[1:18:36][Watch the light emerge again with style (exploding to bright)][:lighting :run]
[1:18:42][Try making ComputeVoxelIrradianceAt() further reduce the real result from ×0.01f to ×0.001f][:lighting]
[1:18:55][See the light hover without exploding][:lighting :run]
[1:19:02][Try making ComputeVoxelIrradianceAt() increase the real result from ×0.001f to ×0.002f][:lighting]
[1:19:09][Watch the light slowly explode][:lighting :run]
[1:19:49][Try making ComputeVoxelIrradianceAt() decrease the real result from ×0.002f to ×0.0015f][:lighting]
[1:20:02][Watch the light slowly explode][:lighting :run]
[1:20:24][Try making ComputeVoxelIrradianceAt() decrease the real result from ×0.0015f to ×0.00125f][:lighting]
[1:20:32][Watch the light explode a little][:lighting :run]
[1:20:47][Conceptualising photons per second][:lighting :research]
[1:22:27][Assert in FullCast() that Emission is <= 1.0f][:lighting]
[1:22:46][Happily fail to hit that Emission <= 1.0f assertion in FullCast()][:lighting :run]
[1:22:58][Remove that Emission <= 1.0f assertion in FullCast(), and instead assert that the SampleRefColor values are all <= 1.0f][:lighting]
[1:24:47][Happily fail to hit those SampleRefColor <= 1.0f assertions in FullCast()][:lighting :run]
[1:24:48][Remove those SampleRefColor <= 1.0f assertions in FullCast()][:lighting]
[1:25:49][Try blanking out the Emission of hit rays in FullCast()][:lighting]
[1:26:04][See our moonlit world][:lighting :run]
[1:26:20][Prevent ComputeVoxelIrradianceAt() from modifying its result][:lighting]
[1:26:27][Watch the light explode, even with such dim moonlight][:lighting :run]
[1:27:58][Assert in ComputeVoxelIrradianceAt() that the Result values are <= 0.5f][:lighting]
[1:28:24][Happily hit our Result <= 0.5f assertions in ComputeVoxelIrradianceAt()][:lighting :run]
[1:28:48][:Run to ComputeVoxelIrradianceAt() and inspect its values, to find that the UVW is garbage][:lighting]
[1:33:29][Separate out the UVW computation in ComputeVoxelIrradianceAt(), and remove VoxCellDim from the BCoord computation][:lighting]
[1:35:03][Step in to ComputeVoxelIrradianceAt() and inspect its values, to find a more expected UVW][:lighting :run]
[1:36:11][Check the moonlit world in release mode][:lighting :run]
[1:36:48][Prevent FullCast() from blanking out the Emission][:lighting]
[1:36:59][See a more sanely and stably lit world][:lighting :run]
[1:38:01][Hit a read access violation in ComputeVoxelIrradianceAt()][:lighting :run]
[1:39:09][Make a note in ComputeVoxelIrradianceAt() to fix the :sampling error][:lighting]
[1:39:16][Q&A][:speech]
[1:39:55][@uplinkcoder][Q: The :UI is drawn at Z levels less than -999 so to disable the :lighting just compare the Z to -999. Can you quickly re-enable it?]
[1:40:24][Make CompileZBiasProgram() only light surfaces that are above Z -999][:lighting :ui]
[1:41:09][Check out our unlit :UI][:lighting :run]
[1:41:57][Make FullCast() be a TIMED_FUNCTION][:"debug system"]
[1:44:32][Try preventing ComputeVoxelIrradianceAt() from blending the whole :lighting hierarchy]
[1:44:57][FullCast() still uses 73% of our CPU cycles][:lighting :performance :run]
[1:45:19][Make ComputeVoxelIrradianceAt() be a TIMED_FUNCTION][:"debug system" :lighting]
[1:45:54][Hit a write access violation][:"debug system" :lighting :run]
[1:46:06][Prevent ComputeVoxelIrradianceAt() from being a TIMED_FUNCTION][:"debug system" :lighting]
[1:46:30][Try preventing FullCast() from calling ComputeVoxelIrradianceAt()][:lighting]
[1:47:21][FullCast() uses 67% of our CPU cycles][:performance :run]
[1:48:05][Toggle on the ComputeVoxelIrradianceAt() call in FullCast()][:lighting]
[1:48:09][FullCast() uses 73% of our CPU cycles][:performance :run]
[1:48:17][Remove that ComputeVoxelIrradianceAt() toggle in FullCast(), and consider the ray cast to be our most expensive consumer][:lighting :performance]
[1:49:10][@x1bzzr][Q: I think you mentioned before that you don't like regular expressions. Can you elaborate on why?]
[1:50:34][@xxthebigfoxx][Q: If we have a probe near a wall and that probe is updated with the color sampled at the wall, the next frame the wall might be brighter due to the new probe color. Couldn't this spiral up to a very bright probe? How does the system prevent this?][:lighting]
[1:52:44][Try reducing our RayBundleCount to 1 in FullCast()][:lighting]
[1:53:24][FullCast() uses 14% of our CPU cycles][:performance :run]
[1:54:05][Try reducing our RayBundleCount from 1 to 4 in FullCast()][:lighting]
[1:54:18][Our :lighting runs not too poorly][:performance :run]
[1:54:46][Let FullCast() use our full RayBundleCount, and try biasing towards the light source][:lighting]
[1:55:02][Hit a read access violation in ComputeVoxelIrradianceAt()][:lighting :run]
[1:55:10][Our Ty and Tx values in ComputeVoxelIrradianceAt() have apparently wrapped, but why?][:lighting :run]
[1:55:58][Try making GetOctahedralOffset() blank out the Dir][:lighting]
[1:56:26][Step in to GetOctahedralOffset() and inspect its values][:lighting :run]
[1:57:22][Introduce ApproxNOUp() for FullCast() to call, and avoid a divide-by-zero in OctahedralFromUnitVector()][:lighting]
[2:00:17][Hit a read access violation in ComputeVoxelIrradianceAt(), and see that its SampleN is zero][:lighting :run]
[2:02:01][Scrutinise RayCast() for HitNormal errors][:lighting :research]
[2:04:50][Try to make RayCast() never produce a zero HitNormal, by always enabling one of the directional masks][:lighting]
[2:06:56][:Run without hitting that read access violation in ComputeVoxelIrradianceAt()][:lighting]
[2:06:58][Make a note in RayCast() to "Verify that this produces correctly only-one-1 normals for all equivalences"][:lighting]
[2:08:05][Prevent FullCast() from biasing towards the light source][:lighting]
[2:08:20][See minimal difference with light source-biasing][:lighting :run]
[2:08:37][Toggle off the light source-biasing in FullCast()][:lighting]
[2:09:16][Admire our :lighting][:run]
[2:09:38][@x1bzzr][Q: How would you share :memory across functions in a shared :library? I know the user could allocate memory and pass that to the library, but I was wondering how to have the library allocate memory for internal use without the library user having to know anything about it, but that the dll would keep a reference to across library calls. I tried using a global that gets initialized in the dll main with VirtualAlloc, but later when I call a function the library exports the global is zero]