载入中...
搜索中...
未找到
TerrainEffect.h
浏览该文件的文档.
1#pragma once
2#include "common/Result.h"
3
4namespace eve::procgen {
5class Heightmap;
18[[nodiscard]] EVENGINE_API_DOMAINS Result<int> applyTerrainContrast(Heightmap& target, const Heightmap& mask,
19 float strength, float featureSize);
20
23 float radius = 10, verticality = 0, strength = 1;
24};
25
33 float mixStrength = 0.5F, exponent = 16, strength = 1;
34 float minimum = 0, maximum = 0.5F;
35 int passes = 18;
36};
37
40 float count = 100, bevel = 0, strength = 1;
41};
42
57
72
84
96
103 float minimum = 0, maximum = 1, midpoint = 0.5F, strength = 0.5F;
104 float clipMinimum = 0, clipMaximum = 0.5F;
105};
106
121 const Heightmap& curve, float minimum,
122 float maximum);
123
138 const Heightmap& global,
140} // namespace eve::procgen
LogicalId target
int mask
#define EVENGINE_API_DOMAINS
Definition Export.h:110
float maximum[3]
float minimum[3]
std::string local
Move-only, checked operation results for the common layer.
float power
Definition RockMesh.cpp:23
Heightmap curve
TerrainThermalSettings settings
Heightmap global
Move-only operation result carrying either a value or Status.
Definition Result.h:155
In-memory terrain heightmap: a dense float grid (row-major, index = y * width + x) materialized from ...
Definition Heightmap.h:21
Result< int > applyTerrainTerrace(Heightmap &target, const Heightmap &mask, const TerrainTerraceSettings &settings)
Terrace scalar heights using nearest-even rounding and the shader's one-sided bevel.
Result< int > applyTerrainContrast(Heightmap &target, const Heightmap &mask, float strength, float featureSize)
Apply the nine-tap Pcg contrast equation to native scalar heights.
Result< int > applyTerrainHeightMix(Heightmap &target, const Heightmap &local, const Heightmap &global, const TerrainHeightMixSettings &settings)
Mix centered local brush heights into terrain, then globally mask and clip.
Result< int > applyTerrainSmooth(Heightmap &target, const Heightmap &mask, const TerrainSmoothSettings &settings)
Apply Pcg's horizontal then vertical seven-pair weighted smooth passes.
Result< int > applyTerrainPower(Heightmap &target, const Heightmap &mask, float power)
Apply the Pcg PowerOf control: lerp(height,pow(height,4-power),mask).
Result< int > applyTerrainRidges(Heightmap &target, const Heightmap &mask, const TerrainRidgeSettings &settings)
Apply ordered horizontal/vertical ridge powers, neighbor mixing and per-pass clipping.
Result< int > applyTerrainHeightCurve(Heightmap &target, const Heightmap &mask, const Heightmap &curve, float minimum, float maximum)
Apply the height-transform shader's smoothstep and one-row height curve.
Mix-height scalar controls; delta scale is maximum-minimum, independent of clipping bounds....
Ridge controls in caller height units, with explicit clipping bounds. Defaults match the Pcg packed s...
Two-pass smoothing controls; radius in texels, verticality in [-1,1], strength in [0,...
Terrace frequency in inverse height units, interior bevel in [0,1], strength in [0,...