载入中...
搜索中...
未找到
SurfaceFluidRenderData.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
6
7#include <glm/glm.hpp>
8
9#include <cstdint>
10#include <vector>
11
12namespace eve::fluids {
13
16 float dryRoughness = 0.48f;
17 float wetRoughness = 0.08f;
18 float drySpecular = 0.35f;
19 float wetSpecular = 0.92f;
20 float wetDarkening = 0.12f;
21 float normalStrength = 0.18f;
22};
23
26 float wetness = 0.f;
27 float roughness = 0.48f;
28 float specular = 0.35f;
29 float darkening = 0.f;
30 float normalStrength = 0.f;
31};
32
35 uint64_t id = 0;
36 glm::vec3 position{0.f};
37 glm::vec3 normal{0.f, 1.f, 0.f};
38 glm::vec3 majorAxis{1.f, 0.f, 0.f};
39 glm::vec3 minorAxis{0.f, 0.f, 1.f};
40 glm::vec3 velocity{0.f};
41 float capHeight = 0.f;
42 float wetness = 0.f;
43};
44
52
61public:
63 void update(const FluidSurfaceBinding& binding, const SurfaceDropletSimulation& simulation,
64 const SurfaceWetnessField* wetness = nullptr,
66
68 static WetSurfaceMaterialSample evaluateMaterial(float wetness,
70
73 const std::vector<SurfaceDropletRenderInstance>& droplets() const { return droplets_; }
74
75private:
76 std::vector<SurfaceDropletRenderInstance> droplets_;
77};
78
79} // namespace eve::fluids
float wetness
#define EVENGINE_API_DOMAINS
Definition Export.h:110
eve::action::ActionVfxBinding binding
Dynamic triangle surface used to bind films and droplets to deforming meshes.
CPU reference solver for droplets moving over static, rigid or deforming surfaces.
Builds renderer-independent droplet instances and wet PBR parameters.
const std::vector< SurfaceDropletRenderInstance > & droplets() const
Droplets.
Lightweight material-space wet-film field stored at mesh vertices.
std::vector< ParamSpec > params
GLSL compute kernels for the GPU surface-flow solver.
Definition FluidTarget.h:12
World-space oriented cap instance consumed by droplet instancing shaders.
Tuning for converting simulated droplets into render instances.
Material mapping from simulated wetness to a PBR surface response.
Evaluated material values suitable for a wet-surface shader.