载入中...
搜索中...
未找到
CaveRoughness.cpp
浏览该文件的文档.
37 const float x10 = lerp(cornerNoise(x0, y0 + 1, z0, seed), cornerNoise(x0 + 1, y0 + 1, z0, seed), tx);
38 const float x01 = lerp(cornerNoise(x0, y0, z0 + 1, seed), cornerNoise(x0 + 1, y0, z0 + 1, seed), tx);
39 const float x11 = lerp(cornerNoise(x0, y0 + 1, z0 + 1, seed), cornerNoise(x0 + 1, y0 + 1, z0 + 1, seed), tx);
48 const float macro = valueNoise(input.x * 3.7f, input.y * 2.1f, input.z * 3.7f, input.seed ^ 0x21f0aaadu);
49 const float meso = valueNoise(input.x * 8.3f, input.y * 4.8f, input.z * 8.3f, input.seed ^ 0x91e10da5u);
50 const float fine = valueNoise(input.x * 16.7f, input.y * 9.5f, input.z * 16.7f, input.seed ^ 0xd1b54a35u);
51 const float relief = std::clamp((macro * 0.72f + meso * 0.24f + fine * 0.08f) / 1.04f, -1.f, 1.f);
constexpr HexVec3 lerp(HexVec3 a, HexVec3 b, float t) noexcept
Linear interpolation between two positions.
Definition HexMetrics.h:51
Definition EvpackPointGraphLoader.h:12
CaveRoughnessSample sampleCaveWallRoughness(const CaveRoughnessInput &input)
Sample a three-band, spatially correlated cave-wall relief field.
Definition CaveRoughness.cpp:45
Inputs for deterministic, band-limited cave-wall roughness.
Definition CaveRoughness.h:10
Multi-scale wall relief and its separated spatial-frequency bands.
Definition CaveRoughness.h:18