载入中...
搜索中...
未找到
WaterStyleConfig.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Result.h"
4#include "common/Value.h"
5
6#include <cstdint>
7#include <string>
8#include <string_view>
9
10#include <glm/glm.hpp>
11
12namespace eve::graphics {
13
16 static constexpr std::string_view SchemaId = "eve.graphics.stylized-water";
17 static constexpr std::uint32_t SchemaVersion = 1;
18
19 glm::vec3 deepColor{0.02F, 0.16F, 0.24F};
20 glm::vec3 shallowColor{0.10F, 0.48F, 0.58F};
21 glm::vec3 foamColor{0.85F, 0.93F, 1.0F};
22 glm::vec3 reflectionTint{0.70F, 0.85F, 1.0F};
23
24 float waveSpeed = 1.2F;
25 float waveAmplitude = 0.35F;
26 float waveScale = 14.0F;
27 float waveSharpness = 1.0F;
28 float rippleAmplitude = 0.60F;
29 int rippleCount = 6;
30 float rippleInterval = 1.6F;
31
32 float depthDistance = 5.0F;
33 float opacity = 0.88F;
34
35 float foamWidth = 0.45F;
36 float foamSoftness = 0.08F;
37 float foamStrength = 0.85F;
38
39 float fresnelPower = 5.0F;
40 float reflectionIntensity = 0.60F;
41 float sunIntensity = 0.90F;
42 bool screenSpaceReflection = false;
43 float screenSpaceReflectionStrength = 0.85F;
44
45 float refractionStrength = 0.025F;
46
47 float causticsStrength = 0.35F;
48 float causticsScale = 3.5F;
49
51 [[nodiscard]] Result<void> validate() const;
53 [[nodiscard]] Result<Value> toValue() const;
55 [[nodiscard]] static Result<WaterStyleConfig> fromValue(const Value& value);
57 [[nodiscard]] static Result<WaterStyleConfig> fromJson(std::string_view json);
59 [[nodiscard]] Result<std::string> toJson() const;
60};
61
62} // namespace eve::graphics
double value
float rippleAmplitude
Definition CaveMesh.cpp:84
float waveAmplitude
Definition CaveMesh.cpp:96
#define EVENGINE_API_BACKENDS
Definition Export.h:108
Move-only, checked operation results for the common layer.
float opacity
Owning, renderer-independent dynamic values.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
The canonical owning dynamic value used by data-facing protocols.
Definition Value.h:31
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Versioned, backend-neutral configuration for the built-in stylized water surface.