Converting Specular Maps to Diffuse
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next timestamp
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu and Index Controls

a
w
s
d
h j k l


Esc Close menu / unfocus timestamp

Quotes and References Menus and Index

Enter Jump to timestamp

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:03Recap and set the stage for the day, debugging the lighting stability over time, and efficiently sampling diffuse surface reflections
🗩
0:03Recap and set the stage for the day, debugging the lighting stability over time, and efficiently sampling diffuse surface reflections
🗩
0:03Recap and set the stage for the day, debugging the lighting stability over time, and efficiently sampling diffuse surface reflections
🗩
4:29Diffuse sampling efficiency: 1) Downsampling our map
🗩
4:29Diffuse sampling efficiency: 1) Downsampling our map
🗩
4:29Diffuse sampling efficiency: 1) Downsampling our map
🗩
7:13Diffuse sampling efficiency: 2) Take multiple interior samples, e.g. 4×4
🗩
7:13Diffuse sampling efficiency: 2) Take multiple interior samples, e.g. 4×4
🗩
7:13Diffuse sampling efficiency: 2) Take multiple interior samples, e.g. 4×4
🗩
8:48Diffuse sampling efficiency: 3) Downsampling, with pre-computed diffusion
🗩
8:48Diffuse sampling efficiency: 3) Downsampling, with pre-computed diffusion
🗩
8:48Diffuse sampling efficiency: 3) Downsampling, with pre-computed diffusion
🗩
9:48Full diffuse sampling solution: Cosine-weight an 8×8 specular to 8×8 diffuse solution
🗩
9:48Full diffuse sampling solution: Cosine-weight an 8×8 specular to 8×8 diffuse solution
🗩
9:48Full diffuse sampling solution: Cosine-weight an 8×8 specular to 8×8 diffuse solution
🗩
14:30Remove OutputLightingPointsRecurse() and GetCurrentQuads(), and switch EndLightingComputation() to TEST_LIGHT_SPHERE
14:30Remove OutputLightingPointsRecurse() and GetCurrentQuads(), and switch EndLightingComputation() to TEST_LIGHT_SPHERE
14:30Remove OutputLightingPointsRecurse() and GetCurrentQuads(), and switch EndLightingComputation() to TEST_LIGHT_SPHERE
15:51Demo our specular lighting
🏃
15:51Demo our specular lighting
🏃
15:51Demo our specular lighting
🏃
16:46Set up to convert our specular maps to diffuse
📖
16:46Set up to convert our specular maps to diffuse
📖
16:46Set up to convert our specular maps to diffuse
📖
17:59Switch EndLightingComputation() to TestCastFromProbes() and TEST_LIGHT_TRANSFER
17:59Switch EndLightingComputation() to TestCastFromProbes() and TEST_LIGHT_TRANSFER
17:59Switch EndLightingComputation() to TestCastFromProbes() and TEST_LIGHT_TRANSFER
19:10See lighting weirdness
🏃
19:10See lighting weirdness
🏃
19:10See lighting weirdness
🏃
20:27Introduce TestLightSphere() to perform the TEST_LIGHT_SPHERE lighting voxel writing code from EndLightingComputation()
20:27Introduce TestLightSphere() to perform the TEST_LIGHT_SPHERE lighting voxel writing code from EndLightingComputation()
20:27Introduce TestLightSphere() to perform the TEST_LIGHT_SPHERE lighting voxel writing code from EndLightingComputation()
24:16See our light sphere test working as before
🏃
24:16See our light sphere test working as before
🏃
24:16See our light sphere test working as before
🏃
24:31Remove the TEST_LIGHT_SPHERE code from EndLightingComputation()
24:31Remove the TEST_LIGHT_SPHERE code from EndLightingComputation()
24:31Remove the TEST_LIGHT_SPHERE code from EndLightingComputation()
25:45See our light sphere test continuing to work as before
🏃
25:45See our light sphere test continuing to work as before
🏃
25:45See our light sphere test continuing to work as before
🏃
25:53Embark on our full-fat specular–diffuse conversion in EndLightingComputation()
25:53Embark on our full-fat specular–diffuse conversion in EndLightingComputation()
25:53Embark on our full-fat specular–diffuse conversion in EndLightingComputation()
27:54Calculate our operations per map: 4096
🗹
27:54Calculate our operations per map: 4096
🗹
27:54Calculate our operations per map: 4096
🗹
28:54Set up EndLightingComputation() to sum up weighted samples
28:54Set up EndLightingComputation() to sum up weighted samples
28:54Set up EndLightingComputation() to sum up weighted samples
30:20Big O notation, and separable filters
🗩
30:20Big O notation, and separable filters
🗩
30:20Big O notation, and separable filters
🗩
32:50Introduce diffuse_weight_map for lighting_solution to contain and EndLightingComputation() to use
32:50Introduce diffuse_weight_map for lighting_solution to contain and EndLightingComputation() to use
32:50Introduce diffuse_weight_map for lighting_solution to contain and EndLightingComputation() to use
36:45Introduce BuildDiffuseLightMaps() for InitLighting() to call, and DirectionFromTxTy() based on TestLightSphere()
36:45Introduce BuildDiffuseLightMaps() for InitLighting() to call, and DirectionFromTxTy() based on TestLightSphere()
36:45Introduce BuildDiffuseLightMaps() for InitLighting() to call, and DirectionFromTxTy() based on TestLightSphere()
41:52See slow, but beautiful diffuse lighting
🏃
41:52See slow, but beautiful diffuse lighting
🏃
41:52See slow, but beautiful diffuse lighting
🏃
45:21Toggle on the light map viewers in OpenGLEndFrame()
45:21Toggle on the light map viewers in OpenGLEndFrame()
45:21Toggle on the light map viewers in OpenGLEndFrame()
45:46Check out the light maps
🏃
45:46Check out the light maps
🏃
45:46Check out the light maps
🏃
46:56Set up to optimise the diffuse lighting
📖
46:56Set up to optimise the diffuse lighting
📖
46:56Set up to optimise the diffuse lighting
📖
49:05Compute 4-wide the diffuse light sampling in EndLightingComputation()
49:05Compute 4-wide the diffuse light sampling in EndLightingComputation()
49:05Compute 4-wide the diffuse light sampling in EndLightingComputation()
53:36Consider how to store our diffuse lighting data for SIMD computation
📖
53:36Consider how to store our diffuse lighting data for SIMD computation
📖
53:36Consider how to store our diffuse lighting data for SIMD computation
📖
59:57Store our diffuse lighting data RRRR GGGG BBBB and swizzle it on output, introducing Transpose()
59:57Store our diffuse lighting data RRRR GGGG BBBB and swizzle it on output, introducing Transpose()
59:57Store our diffuse lighting data RRRR GGGG BBBB and swizzle it on output, introducing Transpose()
1:03:35Swizzling RRRR GGGG BBBB to RGBR GBRG BRGB
🖌
1:03:35Swizzling RRRR GGGG BBBB to RGBR GBRG BRGB
🖌
1:03:35Swizzling RRRR GGGG BBBB to RGBR GBRG BRGB
🖌
1:09:38Consider how best to swizzle our diffuse lighting data
📖
1:09:38Consider how best to swizzle our diffuse lighting data
📖
1:09:38Consider how best to swizzle our diffuse lighting data
📖
1:11:07Load-Without-Broadcast
🖌
1:11:07Load-Without-Broadcast
🖌
1:11:07Load-Without-Broadcast
🖌
1:14:11Trying _mm_shuffle_ps() or _mm_unpacklo_ps()1 to swizzle
🖌
📖
1:14:11Trying _mm_shuffle_ps() or _mm_unpacklo_ps()1 to swizzle
🖌
📖
1:14:11Trying _mm_shuffle_ps() or _mm_unpacklo_ps()1 to swizzle
🖌
📖
1:26:00Non-interleaved unpack using _mm_unpackhi_pd()2
🖌
📖
1:26:00Non-interleaved unpack using _mm_unpackhi_pd()2
🖌
📖
1:26:00Non-interleaved unpack using _mm_unpackhi_pd()2
🖌
📖
1:30:41Masked picking from two SIMD values using _mm_blend_ps()3
🖌
📖
1:30:41Masked picking from two SIMD values using _mm_blend_ps()3
🖌
📖
1:30:41Masked picking from two SIMD values using _mm_blend_ps()3
🖌
📖
1:32:43Trying _mm_blend_ps() to swizzle
🖌
📖
1:32:43Trying _mm_blend_ps() to swizzle
🖌
📖
1:32:43Trying _mm_blend_ps() to swizzle
🖌
📖
1:35:29Trying our full RRRR GGGG BBBB to RGBR GBRG BRGB swizzle
🖌
📖
1:35:29Trying our full RRRR GGGG BBBB to RGBR GBRG BRGB swizzle
🖌
📖
1:35:29Trying our full RRRR GGGG BBBB to RGBR GBRG BRGB swizzle
🖌
📖
1:41:19All the possible unpacks
🖌
📖
1:41:19All the possible unpacks
🖌
📖
1:41:19All the possible unpacks
🖌
📖
1:46:32Constraints on Final Op
🖌
📖
1:46:32Constraints on Final Op
🖌
📖
1:46:32Constraints on Final Op
🖌
📖
1:52:46Introduce Transpose() from six Shuffle4X() operations, for RRRR GGGG BBBB to RGBR GBRG BRGB swizzle
1:52:46Introduce Transpose() from six Shuffle4X() operations, for RRRR GGGG BBBB to RGBR GBRG BRGB swizzle
1:52:46Introduce Transpose() from six Shuffle4X() operations, for RRRR GGGG BBBB to RGBR GBRG BRGB swizzle
2:00:03Define Shuffle4x() macro4
2:00:03Define Shuffle4x() macro4
2:00:03Define Shuffle4x() macro4
2:03:09Fill Transpose() with known values for testing
2:03:09Fill Transpose() with known values for testing
2:03:09Fill Transpose() with known values for testing
2:06:26Switch diffuse_weight_map and BuildDiffuseLightMaps() to be SIMD
2:06:26Switch diffuse_weight_map and BuildDiffuseLightMaps() to be SIMD
2:06:26Switch diffuse_weight_map and BuildDiffuseLightMaps() to be SIMD
2:08:42See faster diffuse lighting
🏃
2:08:42See faster diffuse lighting
🏃
2:08:42See faster diffuse lighting
🏃
2:09:16Try to step in to Transpose(), but hit a read-access violation on DestD[Tx4] in EndLightingComputation()
🏃
2:09:16Try to step in to Transpose(), but hit a read-access violation on DestD[Tx4] in EndLightingComputation()
🏃
2:09:16Try to step in to Transpose(), but hit a read-access violation on DestD[Tx4] in EndLightingComputation()
🏃
2:10:19Force DestC and DestD to be stored unaligned using _mm_storeu_ps() in EndLightingComputation()
2:10:19Force DestC and DestD to be stored unaligned using _mm_storeu_ps() in EndLightingComputation()
2:10:19Force DestC and DestD to be stored unaligned using _mm_storeu_ps() in EndLightingComputation()
2:11:56Try to step in to Transpose()
🏃
2:11:56Try to step in to Transpose()
🏃
2:11:56Try to step in to Transpose()
🏃
2:12:13Make EndLightingComputation() call Transpose()
2:12:13Make EndLightingComputation() call Transpose()
2:12:13Make EndLightingComputation() call Transpose()
2:12:28Step in to Transpose() to see what it produces
🏃
2:12:28Step in to Transpose() to see what it produces
🏃
2:12:28Step in to Transpose() to see what it produces
🏃
2:12:54Fix Transpose() to set the Order as desired
2:12:54Fix Transpose() to set the Order as desired
2:12:54Fix Transpose() to set the Order as desired
2:13:18Step in to Transpose() to see that it swizzles incorrectly
🏃
2:13:18Step in to Transpose() to see that it swizzles incorrectly
🏃
2:13:18Step in to Transpose() to see that it swizzles incorrectly
🏃
2:13:42Fix Shuffle4x() to shift by 2-bytes
2:13:42Fix Shuffle4x() to shift by 2-bytes
2:13:42Fix Shuffle4x() to shift by 2-bytes
2:14:39Step in to Transpose() to see that it swizzles more sanely, but still incorrectly
🏃
2:14:39Step in to Transpose() to see that it swizzles more sanely, but still incorrectly
🏃
2:14:39Step in to Transpose() to see that it swizzles more sanely, but still incorrectly
🏃
2:19:39Check our 6-shuffle swizzle
🖌
📖
2:19:39Check our 6-shuffle swizzle
🖌
📖
2:19:39Check our 6-shuffle swizzle
🖌
📖
2:20:13Fix Transpose() to interleave every third lane
2:20:13Fix Transpose() to interleave every third lane
2:20:13Fix Transpose() to interleave every third lane
2:21:47Step in to Transpose() to see that it swizzles 100% correctly
🏃
2:21:47Step in to Transpose() to see that it swizzles 100% correctly
🏃
2:21:47Step in to Transpose() to see that it swizzles 100% correctly
🏃
2:22:17Add a VERIFY_SHUFFLE preprocessor path in Transpose()
2:22:17Add a VERIFY_SHUFFLE preprocessor path in Transpose()
2:22:17Add a VERIFY_SHUFFLE preprocessor path in Transpose()
2:23:03Admire our almost right lighting
🏃
2:23:03Admire our almost right lighting
🏃
2:23:03Admire our almost right lighting
🏃
2:24:26Fix BuildDiffuseLightMaps() and diffuse_weight_map inspired by EndLightingComputation()
2:24:26Fix BuildDiffuseLightMaps() and diffuse_weight_map inspired by EndLightingComputation()
2:24:26Fix BuildDiffuseLightMaps() and diffuse_weight_map inspired by EndLightingComputation()
2:31:22Admire our closer to correct lighting
🏃
2:31:22Admire our closer to correct lighting
🏃
2:31:22Admire our closer to correct lighting
🏃
2:33:12Q&A
🗩
2:33:12Q&A
🗩
2:33:12Q&A
🗩
2:34:48Transposes are symmetric
🗩
2:34:48Transposes are symmetric
🗩
2:34:48Transposes are symmetric
🗩
2:35:30vaualbus Q: Why can't you do the unpack on the GPU side?
🗪
2:35:30vaualbus Q: Why can't you do the unpack on the GPU side?
🗪
2:35:30vaualbus Q: Why can't you do the unpack on the GPU side?
🗪
2:36:47xxthebigfoxx Q: Looks like in this article5 they do it in six shuffles similarly to how you do it
🗪
2:36:47xxthebigfoxx Q: Looks like in this article5 they do it in six shuffles similarly to how you do it
🗪
2:36:47xxthebigfoxx Q: Looks like in this article5 they do it in six shuffles similarly to how you do it
🗪
2:37:29squareysgames Q: Could it be feasible to pack into a different GPU-supported format, maybe even compressed?
🗪
2:37:29squareysgames Q: Could it be feasible to pack into a different GPU-supported format, maybe even compressed?
🗪
2:37:29squareysgames Q: Could it be feasible to pack into a different GPU-supported format, maybe even compressed?
🗪
2:38:28xxthebigfoxx Q: They6 have an example on 128 bits, second picture
🗪
2:38:28xxthebigfoxx Q: They6 have an example on 128 bits, second picture
🗪
2:38:28xxthebigfoxx Q: They6 have an example on 128 bits, second picture
🗪
2:38:41Consider the performance of dependent shuffles, all on port 57
📖
2:38:41Consider the performance of dependent shuffles, all on port 57
📖
2:38:41Consider the performance of dependent shuffles, all on port 57
📖
2:42:56runamar Q: Would you consider using the vector extension from clang if you would go clang only?
🗪
2:42:56runamar Q: Would you consider using the vector extension from clang if you would go clang only?
🗪
2:42:56runamar Q: Would you consider using the vector extension from clang if you would go clang only?
🗪
2:43:22vaualbus Q: Do all the work we did to generate the sphere samples and not use them anymore?
🗪
2:43:22vaualbus Q: Do all the work we did to generate the sphere samples and not use them anymore?
🗪
2:43:22vaualbus Q: Do all the work we did to generate the sphere samples and not use them anymore?
🗪
2:43:26Show the sphere samples-based lighting
🏃
2:43:26Show the sphere samples-based lighting
🏃
2:43:26Show the sphere samples-based lighting
🏃
2:45:04brian_nevec Q: 15FPS? Ship it!
🗪
2:45:04brian_nevec Q: 15FPS? Ship it!
🗪
2:45:04brian_nevec Q: 15FPS? Ship it!
🗪
2:45:37sc4llywag Q: What's next on the TODO list after lighting?
🗪
2:45:37sc4llywag Q: What's next on the TODO list after lighting?
🗪
2:45:37sc4llywag Q: What's next on the TODO list after lighting?
🗪
2:46:04xxthebigfoxx Q: Is there a reasonable performance difference between aligned and unaligned move in SSE2?
🗪
2:46:04xxthebigfoxx Q: Is there a reasonable performance difference between aligned and unaligned move in SSE2?
🗪
2:46:04xxthebigfoxx Q: Is there a reasonable performance difference between aligned and unaligned move in SSE2?
🗪
2:49:00jessem3y3r Q: How do you reason about separable filters when, say, running along the Y axis for an image kernel might incur a cache miss on each sequential access (for non-block storage)?
🗪
2:49:00jessem3y3r Q: How do you reason about separable filters when, say, running along the Y axis for an image kernel might incur a cache miss on each sequential access (for non-block storage)?
🗪
2:49:00jessem3y3r Q: How do you reason about separable filters when, say, running along the Y axis for an image kernel might incur a cache miss on each sequential access (for non-block storage)?
🗪
2:50:05xxthebigfoxx Q: But is there a reason to use MOVAPS instead of MOVUPS, then? Other than MOVAPS throws an exception if you are not aligned
🗪
2:50:05xxthebigfoxx Q: But is there a reason to use MOVAPS instead of MOVUPS, then? Other than MOVAPS throws an exception if you are not aligned
🗪
2:50:05xxthebigfoxx Q: But is there a reason to use MOVAPS instead of MOVUPS, then? Other than MOVAPS throws an exception if you are not aligned
🗪
2:51:22runamar Q: So how do we go back to 60FPS now?
🗪
2:51:22runamar Q: So how do we go back to 60FPS now?
🗪
2:51:22runamar Q: So how do we go back to 60FPS now?
🗪
2:52:52maliusarth Q: You said, after lighting you'll start with level design etc. so how far from release is Handmade Hero?
🗪
2:52:52maliusarth Q: You said, after lighting you'll start with level design etc. so how far from release is Handmade Hero?
🗪
2:52:52maliusarth Q: You said, after lighting you'll start with level design etc. so how far from release is Handmade Hero?
🗪
2:53:52Wrap it up with a glimpse into the future
🗩
2:53:52Wrap it up with a glimpse into the future
🗩
2:53:52Wrap it up with a glimpse into the future
🗩