载入中...
搜索中...
未找到
VegetationRender.cpp
浏览该文件的文档.
13 return Diagnostic::error(DiagnosticCode::InvalidArgument, "invalid vegetation render data", {}, {},
18 return std::isfinite(value.x) && std::isfinite(value.y) && std::isfinite(value.z) && std::isfinite(value.w);
25 if (vertices.empty() || vertices.size() > 4 * 1024 * 1024 || texcoords.size() != vertices.size() * 2 ||
41 if (!graphics.updateMeshVertices(&mesh, data.positions.data(), data.normals.data(), texcoords.data(),
44 DiagnosticCode::Unsupported, "backend rejected vegetation mesh update", {}, {}, "graphics.vegetation"));
59 !unit(surface.overlaySmoothness) || !unit(surface.wetnessCoverage) || !unit(surface.wetnessContrast) ||
63 !unit(surface.wetnessNormalScale) || !unit(surface.overlaySubsurface) || !unit(surface.alphaCutoff) ||
64 !unit(surface.colorsCoverage) || !std::isfinite(surface.colorsIntensity) || surface.colorsIntensity < 0 ||
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
bool ok() const noexcept
Whether this result represents a non-failure outcome.
Definition Result.h:514
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Definition Graphics.h:134
virtual bool updateMeshVertices(Mesh *mesh, const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount)=0
In-place update of a mesh's vertex/index data (CPU -> host-visible VBO). Only call when content chang...
Packages shading method + surface parameters into one attachable asset.
Definition Material.h:38
Backend-independent, owning vegetation influence field. Single writer; concurrent const evaluation is...
Definition VegetationField.h:86
Status invalid(const char *message)
Definition OceanBindingInternal.h:21
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Result< void > applyVegetationSurface(Material &material, const VegetationSample &sample, const VegetationSurface &surface)
Apply an independently sampled field to a masked double-sided PBR material. Render-thread only,...
Definition VegetationRender.cpp:56
Result< VegetationGeometry > deformVegetation(const VegetationField &field, std::span< const VegetationVertex > vertices, const VegetationMotion &motion)
Evaluate plant bending, squash, rolling, flutter, interaction and perspective. Worker-safe with immut...
Definition VegetationMotion.cpp:185
Result< void > updateVegetationMesh(Graphics &graphics, Mesh &mesh, const VegetationField &field, std::span< const VegetationVertex > vertices, const VegetationMotion &motion, std::span< const float > texcoords, std::span< const uint32_t > indices)
Deform rest geometry then update an existing mesh through the active Graphics backend....
Definition VegetationRender.cpp:22
@ InvalidArgument
@ Unsupported
Source-equivalent plant motion parameters with explicit time and texture inputs. All data is owned....
Definition VegetationMotion.h:38
Owning sampled field channels; no lifetime dependency on the field.
Definition VegetationField.h:61
Owning surface inputs, supplied afresh to avoid accumulating tint/wetness across frames....
Definition VegetationRender.h:24
float overlaySmoothness
Definition VegetationRender.h:27
bool invertVertexOcclusionColors
Definition VegetationRender.h:34
float wetnessContrast
Definition VegetationRender.h:28
float overlayProjection
Definition VegetationRender.h:29
float overlayNormalScale
Definition VegetationRender.h:30
float colorsVariation
Definition VegetationRender.h:32
float vertexOcclusionMaximum
Definition VegetationRender.h:33
float wetnessCoverage
Definition VegetationRender.h:28
std::array< float, 3 > vertexOcclusionColor
Definition VegetationRender.h:26
float vertexOcclusionAlpha
Definition VegetationRender.h:29
float wetnessNormalScale
Definition VegetationRender.h:30
float vertexOcclusionMinimum
Definition VegetationRender.h:33
float overlayVariation
Definition VegetationRender.h:28
bool invertVertexOcclusion
Definition VegetationRender.h:34
PbrVegetationBackfaceNormalMode backfaceNormalMode
Definition VegetationRender.h:35
std::array< float, 3 > emission
Definition VegetationRender.h:26
float colorsCoverage
Definition VegetationRender.h:32
float overlaySubsurface
Definition VegetationRender.h:31
float overlayCoverage
Definition VegetationRender.h:28
std::array< float, 3 > overlayColor
Definition VegetationRender.h:26
std::array< float, 4 > albedo
Definition VegetationRender.h:25
float colorsIntensity
Definition VegetationRender.h:32