Testing Better Entropy

?

?# Keyboard Navigation

## Global Keys

[, < / ], > Jump to previous / next episode

W, K, P / S, J, N Jump to previous / next marker

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 Movement

## Quotes and References Menus

Enter Jump to timecode

## 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)

W, K, P / S, J, N Jump to previous / next marker

t / T Toggle theatre / SUPERtheatre mode

V Revert filter to original state Y Select link (requires manual Ctrl-c)

a

w

s

s

d

h
j
k
l

←

↑

↓

↓

→

X, ShiftSpace Toggle category and focus previous

v Invert topics / media as per focus

⏫

Previous: 'Switching to Cosine-weighted Poisson Sampling'

⏫

0:01Recap and set the stage for the day

🗩

0:01Recap and set the stage for the day

🗩

0:01Recap and set the stage for the day

🗩

0:49Hemisphere Integration

🖌

0:49Hemisphere Integration

🖌

0:49Hemisphere Integration

🖌

12:38Our light reception function

🖌

12:38Our light reception function

🖌

12:38Our light reception function

🖌

17:09Weighted sampling, as a way to optimise out the multiplication of a weighting coefficient

🖌

17:09Weighted sampling, as a way to optimise out the multiplication of a weighting coefficient

🖌

17:09Weighted sampling, as a way to optimise out the multiplication of a weighting coefficient

🖌

29:18Writing the bias into the sampling equation

🖌

29:18Writing the bias into the sampling equation

🖌

29:18Writing the bias into the sampling equation

🖌

33:10Review GenerateLightingPattern() from last stream

📖

33:10Review GenerateLightingPattern() from last stream

📖

33:10Review GenerateLightingPattern() from last stream

📖

33:59Make GenerateLightingPattern() take a much greater number of samples, to try and see if it converges

33:59Make GenerateLightingPattern() take a much greater number of samples, to try and see if it converges

34:50Run the game to see that it takes too long to compute

🏃

34:50Run the game to see that it takes too long to compute

🏃

34:50Run the game to see that it takes too long to compute

🏃

35:56Make GenerateLightingPattern() take not quite that many samples

35:56Make GenerateLightingPattern() take not quite that many samples

35:56Make GenerateLightingPattern() take not quite that many samples

36:10Step in to GenerateLightingPattern() and inspect the test averages

🏃

36:10Step in to GenerateLightingPattern() and inspect the test averages

🏃

36:10Step in to GenerateLightingPattern() and inspect the test averages

🏃

36:49Make GenerateLightingPattern() perform fewer tests and take more samples

36:49Make GenerateLightingPattern() perform fewer tests and take more samples

36:49Make GenerateLightingPattern() perform fewer tests and take more samples

37:12Step in to GenerateLightingPattern() and inspect the test averages

🏃

37:12Step in to GenerateLightingPattern() and inspect the test averages

🏃

37:12Step in to GenerateLightingPattern() and inspect the test averages

🏃

37:23Further increase the sample count and lower the test count in GenerateLightingPattern()

37:23Further increase the sample count and lower the test count in GenerateLightingPattern()

37:23Further increase the sample count and lower the test count in GenerateLightingPattern()

37:48Step in to GenerateLightingPattern() and inspect the test averages

🏃

37:48Step in to GenerateLightingPattern() and inspect the test averages

🏃

37:48Step in to GenerateLightingPattern() and inspect the test averages

🏃

38:00Increase the test count in GenerateLightingPattern()

38:00Increase the test count in GenerateLightingPattern()

38:00Increase the test count in GenerateLightingPattern()

38:16Step in to GenerateLightingPattern() and inspect the test averages, to find that we are starting to converge

🏃

38:16Step in to GenerateLightingPattern() and inspect the test averages, to find that we are starting to converge

🏃

🏃

38:49Consider replacing xorshift with PCG, specifically its notion of k-Dimensional Equidistribution^{1}

📖

38:49Consider replacing xorshift with PCG, specifically its notion of k-Dimensional Equidistribution^{1}

📖

📖

44:46Determine to plot our random sampling points

🗩

44:46Determine to plot our random sampling points

🗩

44:46Determine to plot our random sampling points

🗩

46:20Run the game to see our sample points

🏃

46:20Run the game to see our sample points

🏃

46:20Run the game to see our sample points

🏃

46:37Enable LightingTest() to draw a random set of sampling points

46:37Enable LightingTest() to draw a random set of sampling points

46:37Enable LightingTest() to draw a random set of sampling points

49:41Run the game to see our random sample points

🏃

49:41Run the game to see our random sample points

🏃

49:41Run the game to see our random sample points

🏃

50:33Research sphere point picking^{2}

📖

50:33Research sphere point picking^{2}

📖

50:33Research sphere point picking^{2}

📖

53:10Implement Marsaglia's method for uniform point picking on a sphere^{3}^{,4}

53:10Implement Marsaglia's method for uniform point picking on a sphere^{3}^{,4}

53:10Implement Marsaglia's method for uniform point picking on a sphere^{3}^{,4}

56:38Run the game to check out Marsaglia's sampling

🏃

56:38Run the game to check out Marsaglia's sampling

🏃

56:38Run the game to check out Marsaglia's sampling

🏃

57:12Toggle between Marsaglia's method and our full random sampling in LightingTest()

57:12Toggle between Marsaglia's method and our full random sampling in LightingTest()

57:12Toggle between Marsaglia's method and our full random sampling in LightingTest()

58:04Run the game to check out the two sampling patterns

🏃

58:04Run the game to check out the two sampling patterns

🏃

58:04Run the game to check out the two sampling patterns

🏃

58:47Modify Marsaglia's method in LightingTest() to sample only the upper hemisphere

58:47Modify Marsaglia's method in LightingTest() to sample only the upper hemisphere

58:47Modify Marsaglia's method in LightingTest() to sample only the upper hemisphere

59:52Run the game to check out the two hemisphere sampling patterns

🏃

59:52Run the game to check out the two hemisphere sampling patterns

🏃

59:52Run the game to check out the two hemisphere sampling patterns

🏃

1:00:52Introduce random_series_pcg and versions of RandomNextU32(), RandomUnilateral() and RandomBilateral() that take this struct^{5}

1:00:52Introduce random_series_pcg and versions of RandomNextU32(), RandomUnilateral() and RandomBilateral() that take this struct^{5}

1:10:40Praise the compiler for figuring out that we'd never pass the check in Marsaglia's sampling routine, thus raising the "unreachable code" warning

1:10:40Praise the compiler for figuring out that we'd never pass the check in Marsaglia's sampling routine, thus raising the "unreachable code" warning

1:11:25Determine to enable the random_series_pcg version of RandomNextU32() to perform xorshift^{6}^{,7}

📖

1:11:25Determine to enable the random_series_pcg version of RandomNextU32() to perform xorshift^{6}^{,7}

📖

📖

1:19:36Try to check out the example PCG code, but encounter a hang in File Explorer when clicking "New"

💢

1:19:36Try to check out the example PCG code, but encounter a hang in File Explorer when clicking "New"

💢

💢

1:22:46Read through pcg_basic.c in conjunction with Melissa E. O'Neill's PCG paper^{8} and Pierre L'Ecuyer's 'Tables of linear congruential generators'^{9} with a view to understanding why the example code uses rng->inc or'd with 1 in the LCG update step

📖

1:22:46Read through pcg_basic.c in conjunction with Melissa E. O'Neill's PCG paper^{8} and Pierre L'Ecuyer's 'Tables of linear congruential generators'^{9} with a view to understanding why the example code uses rng->inc or'd with 1 in the LCG update step

📖

📖

1:30:08Consult Wikipedia's article 'Linear congruential generator'^{10} to discover that O'Neill must be using Knuth's LCG style

📖

1:30:08Consult Wikipedia's article 'Linear congruential generator'^{10} to discover that O'Neill must be using Knuth's LCG style

📖

📖

1:32:28Enable the random_series_pcg version of RandomNextU32() to perform the LCG update step, augmenting random_series_pcg to contain a Selector

1:32:28Enable the random_series_pcg version of RandomNextU32() to perform the LCG update step, augmenting random_series_pcg to contain a Selector

1:35:02Introduce RandomSeedPCG() for LightingTest() to use

1:35:02Introduce RandomSeedPCG() for LightingTest() to use

1:35:02Introduce RandomSeedPCG() for LightingTest() to use

1:37:01Run the game to see if we get any better random results

🏃

1:37:01Run the game to see if we get any better random results

🏃

1:37:01Run the game to see if we get any better random results

🏃

1:38:05Fix RandomNextU32() to correctly cast the entire PreRotate computation

1:38:05Fix RandomNextU32() to correctly cast the entire PreRotate computation

1:38:05Fix RandomNextU32() to correctly cast the entire PreRotate computation

1:38:31Run the game to compare the PCG and Xorshift random sampling patterns

🏃

1:38:31Run the game to compare the PCG and Xorshift random sampling patterns

🏃

1:38:31Run the game to compare the PCG and Xorshift random sampling patterns

🏃

1:39:23Make LightingTest() use a different random series for each axis

1:39:23Make LightingTest() use a different random series for each axis

1:39:23Make LightingTest() use a different random series for each axis

1:41:22Run the game to determine that the non-PCG random sampling looks fine

🏃

1:41:22Run the game to determine that the non-PCG random sampling looks fine

🏃

1:41:22Run the game to determine that the non-PCG random sampling looks fine

🏃

1:42:21Q&A

🗩

1:42:21Q&A

🗩

1:42:21Q&A

🗩

1:43:36Fix RandomSeedPCG() to correctly shift the Selector

1:43:36Fix RandomSeedPCG() to correctly shift the Selector

1:43:36Fix RandomSeedPCG() to correctly shift the Selector

1:43:56Run the game to see no significant difference

🏃

1:43:56Run the game to see no significant difference

🏃

1:43:56Run the game to see no significant difference

🏃

1:52:15Generating blue noise cos(𝜃) distributed sampling points on a disc, for projection up to its hemisphere

🖌

1:52:15Generating blue noise cos(𝜃) distributed sampling points on a disc, for projection up to its hemisphere

🖌

🖌

1:57:37Show the lighting in the game

🏃

1:57:37Show the lighting in the game

🏃

1:57:37Show the lighting in the game

🏃

2:00:21We are out of questions

🗩

2:00:21We are out of questions

🗩

2:00:21We are out of questions

🗩

⏬

Next: 'Introduction to Function Approximation with Andrew Bromage'

⏬