Skip to content

Commit e04a30a

Browse files
committed
fixup as seen in guerrilla slides
1 parent 76b8c68 commit e04a30a

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/lib.rs

+14-5
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,20 @@ impl TileableCloudNoise {
9494
// However, it is not clear the text and the image are matching: images does not seem to match what the result from the description in text would give.
9595
// Also there are a lot of fudge factor in the code, e.g. * 0.2, so it is really up to you to fine the formula you like.
9696

97-
// mapping perlin noise in between worley as minimum and 1.0 as maximum (as described in text of p.101 of GPU Pro 7)
98-
let perlin_worley = Self::remap(perlin_noise, 0.0, 1.0, worley_fbm, 1.0);
99-
100-
// Matches better what figure 4.7 (not the following up text description p.101). Maps worley between newMin as 0 and perlin as maximum.
101-
// let perlin_worley = Self::remap(worleyFBM, 0.0, 1.0, 0.0, perlinNoise);
97+
// Comment from SebH original code:
98+
// "mapping perlin noise in between worley as minimum and 1.0 as maximum (as described in text of p.101 of GPU Pro 7)"
99+
// let perlin_worley = Self::remap(perlin_noise, 0.0, 1.0, worley_fbm, 1.0);
100+
101+
// Emilio:
102+
// From Page 101 of GPU Pro 7:
103+
// "We do this by remapping the Perlin noise using the Worley noise FBM as the minimum value from the original range."
104+
// let perlin_worley = Self::remap(perlin_noise, worley_fbm, 1.0, 0.0, 1.0);
105+
// But this creates quite broken textures...
106+
107+
// In "Authoring Realtime Volumetric Cloudscapes with the Decima Engine", one of the slides shows:
108+
let perlin_worley =
109+
Self::remap(perlin_noise, 1.0 - worley_fbm, 1.0, 0.0, 1.0);
110+
// ☝️ this is giving the most promising results so far, so we're enabling this by default
102111

103112
let cell_count = 4f32;
104113
// let worley_noise_0 =

0 commit comments

Comments
 (0)