Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Stopford <philstopford>2020-03-12 05:35:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-12 07:48:20 +0300
commit6ce709dceb8db65ec6baae21100a7ce93829b1f6 (patch)
tree15ffc300239a2344ebd445d4316d55a51a3a350c /source/blender/makesdna
parent1aebcdbb3a75b8c59ea211bb1ea6cc8573b0ea0f (diff)
Ocean: add new spectra modes to the ocean modifier
This extends the ocean modifier to add new spectra (Pierson-Moskowitz, Jonswap, TMA). These models are very different to the Phillips spectrum. They are intended for more established, large area, oceans and/or shallow water situations.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 042cf7e874f..13c5a0913c6 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -1255,6 +1255,19 @@ typedef struct OceanModifierData {
float foam_coverage;
float time;
+ char _pad1[4];
+
+ /* Spectrum being used. */
+ int spectrum;
+
+ /* Common JONSWAP parameters. */
+ /**
+ * This is the distance from a lee shore, called the fetch, or the distance
+ * over which the wind blows with constant velocity.
+ */
+ float fetch_jonswap;
+ float sharpen_peak_jonswap;
+
int bakestart;
int bakeend;
@@ -1287,6 +1300,13 @@ enum {
};
enum {
+ MOD_OCEAN_SPECTRUM_PHILLIPS = 0,
+ MOD_OCEAN_SPECTRUM_PIERSON_MOSKOWITZ = 1,
+ MOD_OCEAN_SPECTRUM_JONSWAP = 2,
+ MOD_OCEAN_SPECTRUM_TEXEL_MARSEN_ARSLOE = 3,
+};
+
+enum {
MOD_OCEAN_GENERATE_FOAM = (1 << 0),
MOD_OCEAN_GENERATE_NORMALS = (1 << 1),
};