载入中...
搜索中...
未找到
EvpackVegetationScene.cpp
浏览该文件的文档.
18const Value& member(const Value::Object& object, std::string_view name) { return object.at(std::string(name)); }
22 return std::all_of(fields.begin(), fields.end(), [&](auto name) { return object.contains(std::string(name)); });
59 return std::isfinite(value.x) && std::isfinite(value.y) && std::isfinite(value.z) && std::isfinite(value.w);
94 if (!element.seasonal) return glm::vec4(element.value[0], element.value[1], element.value[2], element.value[3]);
104float propertyScalar(const VegetationSceneElement& element, std::string_view name, float fallback) {
110glm::vec4 propertyVector(const VegetationSceneElement& element, std::string_view name, glm::vec4 fallback) {
119 const AssetRef& asset, const asset::EvpackCapabilities& capabilities, std::uint64_t maximumDecodedBytes) const {
120 auto payload = reader_.read(asset, "eve.vegetation-scene/1", capabilities, maximumDecodedBytes);
127 DiagnosticCode::Conflict, "duplicate scene definition", {}, {}, "asset.graphics.vegetation-scene"));
132 DiagnosticCode::NotFound, "scene definition is missing", {}, {}, "asset.graphics.vegetation-scene"));
138 if (!root || !exact(*root, {"schema", "schemaVersion", "sourceGuid", "control", "details", "motion", "volume", "elements"}) ||
139 !member(*root, "schema").isString() || member(*root, "schema").asString() != "eve.vegetation-scene" ||
147 return Result<LoadedVegetationScene>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument,
156 !exact(*control, {"values", "globalColor", "overlayColor", "overlayAlbedoGuid", "overlayNormalGuid",
158 !exact(*details, {"layers", "global", "colorMask", "overlayMask", "alphaThreshold", "perspective",
166 LoadedVegetationScene result{asset, std::move(sourceGuid), payload.value().variant, {}, {}, {}, {}, {}};
171 if (!values(member(*control, "values"), controls) || !values(member(*control, "globalColor"), result.control.globalColor) ||
173 !values(member(*motion, "values"), motions) || !values(member(*motion, "direction"), direction) ||
184 c.globalWetness = controls[3]; c.globalEmissive = controls[4]; c.globalSubsurface = controls[5];
185 c.globalSize = controls[6]; c.overlaySmoothness = controls[7]; c.overlayNormalScale = controls[8];
186 c.overlaySubsurface = controls[9]; c.overlayScale = controls[10]; c.wetnessContrast = controls[11];
187 c.wetnessNormalScale = controls[12]; c.noiseTiling = controls[13]; c.proximityFade = controls[14];
190 m.windPower = motions[0]; m.noiseTiling = motions[1]; m.bending = motions[2]; m.branch = motions[3];
191 m.flutter = motions[4]; m.speed = motions[5]; m.animatedTime = motions[6] >= .5f; m.fadeDistance = motions[7];
194 return Result<LoadedVegetationScene>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument,
198 result.volume.visibility = std::uint32_t(volumes[1]); result.volume.sorting = std::uint32_t(volumes[2]);
206 if (!whole(channel[0]) || !whole(channel[1]) || !whole(channel[2]) || channel[1] < 0 || channel[2] < 0)
208 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation volume channel integers are invalid", {},
213 if (c.season < 0 || c.season > 4 || !unit(c.globalAlpha) || !unit(c.globalOverlay) || !unit(c.globalWetness) ||
215 !unit(c.overlaySmoothness) || !unit(c.overlayNormalScale) || !unit(c.overlaySubsurface) || c.overlayScale <= 0 ||
216 !unit(c.wetnessContrast) || !unit(c.wetnessNormalScale) || c.noiseTiling <= 0 || !nonnegative(c.proximityFade) ||
219 !std::all_of(c.overlayColor.begin(), c.overlayColor.begin() + 3, nonnegative) || !unit(m.windPower) ||
223 (result.volume.visibility != 0 && result.volume.visibility != 10 && result.volume.visibility != 20) ||
226 !std::all_of(result.volume.channels.begin(), result.volume.channels.end(), [](const auto& channel) {
228 channel.width >= 32 && channel.height >= 32 && channel.width <= 16384 && channel.height <= 16384;
230 return Result<LoadedVegetationScene>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument,
234 Value detailDocument = Value::object({{"schema", "eve.graphics.vegetation-details"}, {"version", 1},
237 {"alphaThreshold", member(*details, "alphaThreshold")}, {"perspective", member(*details, "perspective")},
238 {"motionHighlight", member(*details, "motionHighlight")}, {"bending", member(*details, "bending")},
239 {"flutter", member(*details, "flutter")}, {"interactionAmplitude", member(*details, "interactionAmplitude")}});
246 return Result<LoadedVegetationScene>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument,
252 "extras-overlay", "extras-wetness", "motion-advanced", "motion-interaction", "motion-wind-power",
253 "vertex-conform-model", "vertex-conform-simple", "vertex-conform-terrain", "vertex-height-offset",
257 if (!element || !exact(*element, {"sourceFileId", "shaderGuid", "kind", "channel", "properties", "enabled", "visibility", "position",
279 if (!sourceFileId.isInt64() || sourceFileId.asInt() == 0 || !kind.isString() || !kinds.contains(kind.asString()) ||
281 !seasonal.isBool() || !blendRgb.isInt64() || !blendAlpha.isInt64() || !directionMode.isInt64() || !invertDirection.isBool() ||
282 !volumeFade.isBool() || !motionMode.isInt64() || !validGuid(shaderGuid, decodedElement.shaderGuid) ||
294 Diagnostic::error(DiagnosticCode::ParseError, "vegetation scene element values are malformed", {}, {},
299 Diagnostic::error(DiagnosticCode::ParseError, "vegetation scene element texture asset is invalid", {},
304 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene element property count is invalid",
311 if (!property || !exact(*property, {"name", "type", "textureGuid", "textureAsset", "vector", "value"}) ||
321 Diagnostic::error(DiagnosticCode::ParseError, "vegetation scene element property is malformed", {},
328 DiagnosticCode::ParseError, "vegetation scene element property texture asset is invalid", {}, {},
342 const auto rawChannel = channel.asInt(), rawVisibility = visibility.asInt(), rawLayers = layers.asInt();
345 if (rawChannel < 0 || rawChannel > 3 || rawVisibility < -1 || rawVisibility > 20 || rawLayers < 1 ||
346 rawLayers > 0x1ff || rawBlendRgb < 0 || rawBlendRgb > 2 || rawBlendAlpha < 0 || rawBlendAlpha > 1 ||
350 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene element integers are out of range",
354 decodedElement.visibility = std::int32_t(rawVisibility); decodedElement.layers = std::uint16_t(rawLayers);
355 decodedElement.seasonal = seasonal.asBool(); decodedElement.blendRgb = std::int32_t(rawBlendRgb);
358 decodedElement.invertDirection = invertDirection.asBool(); decodedElement.volumeFade = volumeFade.asBool();
360 const float rotationLength = std::sqrt(std::inner_product(decodedElement.rotation.begin(), decodedElement.rotation.end(),
363 decodedElement.kind.starts_with("extras-") ? 1u : decodedElement.kind.starts_with("motion-") ? 2u : 3u;
365 (decodedElement.visibility != -1 && decodedElement.visibility != 0 && decodedElement.visibility != 10 &&
366 decodedElement.visibility != 20) || decodedElement.layers == 0 || (decodedElement.layers & ~0x1ffu) ||
369 std::any_of(decodedElement.scale.begin(), decodedElement.scale.end(), [](float value) { return value <= 0; }) ||
370 decodedElement.remap[0] > decodedElement.remap[1] || decodedElement.remap[2] > decodedElement.remap[3] ||
385Result<VegetationSceneProjection> projectVegetationScene(const graphics::PbrSurface& baseSurface,
390 VegetationSceneProjection result{std::move(detailed.value().surface), std::move(detailed.value().motion),
453 if (!admitted) return Result<std::map<std::string, graphics::VegetationMask>>::failure(admitted.status());
455 if (property.type != 0 || (property.name != "_MainTex" && property.name != "_NoiseTex")) continue;
457 if (!admitted) return Result<std::map<std::string, graphics::VegetationMask>>::failure(admitted.status());
465 DiagnosticCode::InvalidArgument, "vegetation element masks exceed aggregate decoded budget", {}, {},
468 if (!image) return Result<std::map<std::string, graphics::VegetationMask>>::failure(image.status());
474 if (!decoded) return Result<std::map<std::string, graphics::VegetationMask>>::failure(decoded.status());
481 DiagnosticCode::InvalidArgument, "vegetation element masks exceed aggregate decoded budget", {}, {},
507 !finite(input.vertexColor) || !std::isfinite(input.worldPosition.x) || !std::isfinite(input.worldPosition.y) ||
508 !std::isfinite(input.worldPosition.z) || !std::isfinite(input.worldNormal.x) || !std::isfinite(input.worldNormal.y) ||
509 !std::isfinite(input.worldNormal.z) || !finite(input.velocityDirection) || !finite(input.noiseSample) ||
512 input.season > 4.f || !unit(element.intensity) || element.blendRgb < 0 || element.blendRgb > 2 ||
515 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation element pixel inputs are invalid", {}, {},
527 const float remappedAlpha = remap(input.mainSample.a, element.remap[2], element.remap[3], .0001f);
529 const float radial = std::clamp(std::clamp(1.f - glm::length(centered), 0.f, 1.f), .0001f, .9999f);
532 const float alpha = element.intensity * remappedAlpha * input.elementParams.a * input.vertexColor.a * falloff * volume;
535 const float alphaBlend = element.blendAlpha == 0 ? glm::mix(1.f, scalar, alpha) : scalar * alpha;
544 output.value = {selected.r * remappedRgb.r, selected.g * remappedRgb.g, selected.b * remappedRgb.b,
591 Diagnostic::error(DiagnosticCode::InvalidArgument, "TVE advanced motion direction mode is invalid",
625 output.value = {0.f, 0.f, input.worldPosition.y + propertyScalar(element, "_HeightOffsetValue", 0.f),
634 output.value = {0.f, 0.f, input.terrainHeight + propertyScalar(element, "_HeightOffsetValue", 0.f),
649 const glm::vec3 normal = glm::length(input.worldNormal) > 0.f ? glm::normalize(input.worldNormal)
658 Diagnostic::error(DiagnosticCode::Unsupported, "TVE Element pixel shader is not implemented", element.kind,
663 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation element pixel evaluation overflowed", {}, {},
672 case VegetationScenePixelBlend::Alpha: return src * source.value.a + dst * (1.f - source.value.a);
688 const LoadedVegetationScene& scene, const std::map<std::string, graphics::VegetationMask>& masks,
689 graphics::VegetationChannel channel, const graphics::VegetationChannelAtlas& base, std::uint8_t layer,
694 pixelCount64 > 4 * 1024 * 1024 || !std::isfinite(base.center.x) || !std::isfinite(base.center.y) ||
695 !std::isfinite(base.center.z) || !std::isfinite(base.extent.x) || !std::isfinite(base.extent.y) ||
696 !std::isfinite(base.extent.z) || base.extent.x <= 0.f || base.extent.y <= 0.f || base.extent.z <= 0.f ||
699 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene channel geometry or layer is invalid",
707 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene channel input sizes are inconsistent",
715 if (!element.enabled || element.channel != channelIndex || !(element.layers & (1u << layer))) continue;
731 const glm::vec3 delta = world - glm::vec3(element.position[0], element.position[1], element.position[2]);
738 const bool flipped = element.kind == "motion-interaction" || element.kind == "motion-advanced" ||
742 input.mainSample = mask ? sampleMask(*mask, flipped ? glm::vec2(1.f) - uv : uv) : glm::vec4(1.f);
776 const LoadedVegetationScene& scene, const std::map<std::string, graphics::VegetationMask>& masks,
788 auto baked = bakeVegetationSceneChannel(scene, masks, static_cast<graphics::VegetationChannel>(index),
799 if (tveAtlas.width == 0 || tveAtlas.height == 0 || tveAtlas.width > 2048 || tveAtlas.height > 2048 ||
800 pixelCount64 > 4 * 1024 * 1024 || !std::isfinite(tveAtlas.center.x) || !std::isfinite(tveAtlas.center.y) ||
802 !std::isfinite(tveAtlas.extent.y) || !std::isfinite(tveAtlas.extent.z) || tveAtlas.extent.x <= 0.f ||
805 Diagnostic::error(DiagnosticCode::InvalidArgument, "TVE vegetation channel geometry is invalid", {}, {},
809 std::any_of(tveAtlas.pixels.begin(), tveAtlas.pixels.end(), [](glm::vec4 value) { return !finite(value); }))
811 Diagnostic::error(DiagnosticCode::InvalidArgument, "TVE vegetation channel pixels are invalid", {}, {},
824 Diagnostic::error(DiagnosticCode::Failed, "native vegetation channel allocation failed", {}, {},
837 graphics::VegetationChannelAtlas source{tveAtlas.width, tveAtlas.height, tveAtlas.center, tveAtlas.extent,
839 auto converted = convertVegetationSceneChannelToNative(static_cast<graphics::VegetationChannel>(index), source);
849 const std::map<std::string, graphics::VegetationMask>& masks, const VegetationSceneGpuBuild& build) {
852 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene GPU revision must be nonzero", {}, {},
855 if (!projected) return Result<std::unique_ptr<VegetationSceneGpuRuntime>>::failure(projected.status());
868 if (!native) return Result<std::unique_ptr<VegetationSceneGpuRuntime>>::failure(native.status());
873 auto runtime = std::unique_ptr<VegetationSceneGpuRuntime>(new VegetationSceneGpuRuntime(factory));
876 auto uploaded = graphics::uploadVegetationGpuFieldSet(factory, nativeChannels[0], nativeChannels[1],
879 if (!uploaded) return Result<std::unique_ptr<VegetationSceneGpuRuntime>>::failure(uploaded.status());
901 Diagnostic::error(DiagnosticCode::Failed, "vegetation scene GPU binding rollback failed", {}, {},
908 Diagnostic::error(DiagnosticCode::Failed, "vegetation scene GPU runtime allocation failed", {}, {},
916 const std::map<std::string, graphics::VegetationMask>& masks, const VegetationSceneGpuBuild& build) {
919 Diagnostic::error(DiagnosticCode::Conflict, "released vegetation scene runtime cannot be replaced", {}, {},
923 Diagnostic::error(DiagnosticCode::Conflict, "vegetation scene GPU revision changed before replacement", {},
927 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene replacement revision must increase",
937 Diagnostic::error(DiagnosticCode::Failed, "vegetation scene replacement retirement allocation failed", {},
953 return Result<VegetationSceneGpuPublication>::success({sourceRevision_, retiredFields_.size()});
Backend-neutral canonical EVIMG decoding.
Runtime decoding and projection of TVE scene-manager state.
JSON-free versioned runtime metadata codec.
static Result< AssetRef > parse(std::string_view text)
Parse an asset://<canonical UUID> reference.
Definition ResourceRef.cpp:20
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
bool isSuccess() const noexcept
Whether the operation completed without a failure outcome.
Definition Status.h:101
Immutable reader retaining an admitted pack by shared ownership.
Definition EvpackResourceReader.h:29
Result< RuntimeAssetPayload > read(const AssetRef &asset, std::string_view expectedType, const EvpackCapabilities &capabilities, std::uint64_t maximumDecodedBytes) const
Resolve, type-check, variant-select and decode a canonical runtime asset.
Definition EvpackResourceReader.cpp:10
Result< LoadedVegetationScene > load(const AssetRef &asset, const asset::EvpackCapabilities &capabilities, std::uint64_t maximumDecodedBytes=1024 *1024) const
Decode and validate one complete scene state without mutating runtime objects.
Definition EvpackVegetationScene.cpp:118
Owning GPU publication of one immutable TVE manager scene. The resource factory, mask map and scene a...
Definition EvpackVegetationScene.h:250
const graphics::VegetationMotion & motion() const noexcept
Borrow the projected CPU motion snapshot; valid for this runtime's lifetime.
Definition EvpackVegetationScene.h:276
static Result< std::unique_ptr< VegetationSceneGpuRuntime > > create(graphics::IResourceFactory &factory, const graphics::PbrSurface &baseSurface, const graphics::VegetationMotion &baseMotion, const LoadedVegetationScene &scene, const std::map< std::string, graphics::VegetationMask > &masks, const VegetationSceneGpuBuild &build)
Bake, convert, upload and bind all field layers as one atomic candidate.
Definition EvpackVegetationScene.cpp:846
Result< VegetationSceneGpuPublication > replace(std::uint64_t expectedRevision, const graphics::PbrSurface &baseSurface, const graphics::VegetationMotion &baseMotion, const LoadedVegetationScene &scene, const std::map< std::string, graphics::VegetationMask > &masks, const VegetationSceneGpuBuild &build)
Atomically replace this runtime after validating its observed revision. A complete candidate is built...
Definition EvpackVegetationScene.cpp:913
Result< void > release()
Invalidate material borrows and release all fields; failed entries remain owned for retry.
Definition EvpackVegetationScene.cpp:962
Texture / mesh / shader / canvas creation and release.
Definition IResourceFactory.h:38
Definition CookedMaterial.cpp:5
Result< graphics::VegetationChannelAtlas > convertVegetationSceneChannelToNative(graphics::VegetationChannel channel, const graphics::VegetationChannelAtlas &tveAtlas)
Convert one fully composed TVE channel atlas to EVEngine conventions.
Definition EvpackVegetationScene.cpp:796
Result< graphics::VegetationChannelAtlas > bakeVegetationSceneChannel(const LoadedVegetationScene &scene, const std::map< std::string, graphics::VegetationMask > &masks, graphics::VegetationChannel channel, const graphics::VegetationChannelAtlas &base, std::uint8_t layer, std::span< const glm::vec3 > worldNormals, std::span< const float > terrainHeights, std::span< const glm::vec4 > noiseSamples)
Bake one TVE manager channel at its own resolution and world mapping.
Definition EvpackVegetationScene.cpp:687
Result< VegetationSceneElementPixel > evaluateVegetationSceneElementPixel(const VegetationSceneElement &element, const VegetationSceneElementPixelInput &input)
Evaluate one TVE Element fragment using caller-supplied texture, instance and particle inputs.
Definition EvpackVegetationScene.cpp:504
Result< VegetationSceneProjection > projectVegetationScene(const graphics::PbrSurface &baseSurface, const graphics::VegetationMotion &baseMotion, const LoadedVegetationScene &scene)
Project validated TVE manager controls onto one material/motion snapshot.
Definition EvpackVegetationScene.cpp:385
Result< graphics::VegetationAtlas > convertVegetationSceneAtlasToNative(const graphics::VegetationAtlas &tveAtlas)
Convert a fully composed TVE render-target atlas to EVEngine field channel conventions.
Definition EvpackVegetationScene.cpp:829
VegetationScenePixelBlend
Detached TVE render-target source value and independent hardware blend policy.
Definition EvpackVegetationScene.h:91
Result< graphics::VegetationAtlas > bakeVegetationSceneElements(const LoadedVegetationScene &scene, const std::map< std::string, graphics::VegetationMask > &masks, const graphics::VegetationAtlas &base, std::array< std::uint8_t, 4 > layers, std::span< const glm::vec3 > worldNormals, std::span< const float > terrainHeights, std::span< const glm::vec4 > noiseSamples)
Rasterize the ordered TVE Element list over an owning four-channel atlas candidate.
Definition EvpackVegetationScene.cpp:775
Result< std::map< std::string, graphics::VegetationMask > > loadVegetationSceneElementMasks(const asset::EvpackResourceReader &reader, const LoadedVegetationScene &scene, const asset::EvpackCapabilities &capabilities, std::uint64_t maximumDecodedBytes)
Decode every runtime texture used by admitted TVE Element shaders into owning linear masks.
Definition EvpackVegetationScene.cpp:433
glm::vec4 composeVegetationSceneElementPixel(glm::vec4 destination, const VegetationSceneElementPixel &source) noexcept
Apply one evaluated source pixel to a destination with TVE's separate blend factors and ColorMask.
Definition EvpackVegetationScene.cpp:668
Result< Value > decodeRuntimeDefinition(std::span< const std::uint8_t > bytes, const RuntimeDefinitionLimits &limits)
Decode a bounded EVDEF\0\1 metadata tree without a JSON parser.
Definition RuntimeDefinition.cpp:246
Result< DecodedEvpackImage > decodeEvpackImage(const EvpackResourceReader &reader, const AssetRef &image, const EvpackCapabilities &capabilities, const EvpackImageDecodeLimits &limits)
Decode and validate canonical eve.image/3 data with eve.image/2 compatibility.
Definition EvpackImageDecoder.cpp:14
@ Definition
constexpr float epsilon
Definition ClimbingRuntimeInternal.h:13
std::variant< std::monostate, std::int64_t, double, std::string, bool > Value
Definition Database.h:26
Result< VegetationDetailSettings > restoreVegetationDetails(const Value &document)
Decode one exact Global Details document transactionally.
Definition VegetationDetails.cpp:128
Result< void > releaseVegetationGpuFieldSet(IResourceFactory &factory, VegetationGpuFieldSet &set)
Release every texture still present in a detached field set. Successful entries are nulled....
Definition VegetationFieldGpu.cpp:134
VegetationChannel
Independent vegetation field channels; values use linear color and world units.
Definition VegetationField.h:16
Result< VegetationGpuFieldSet > uploadVegetationGpuFieldSet(IResourceFactory &factory, const VegetationField &field, glm::vec3 center, glm::vec3 extent, uint32_t width, uint32_t height, bool snapToTexel)
Bake and upload all four nine-layer projections as one publication. Earlier uploads are released if a...
Definition VegetationFieldGpu.cpp:150
Result< void > validatePbrSurface(const PbrSurface &s)
Validate finite material factors and sampler enums without changing the input.
Definition PbrSurface.cpp:4
Result< void > bindVegetationGpuFields(PbrSurface &surface, const VegetationField &field, const VegetationExtrasGpuAtlas &extras, const VegetationColorsGpuAtlas &colors, const VegetationMotionGpuAtlas &motion, const VegetationVertexGpuAtlas &vertex, const VegetationGpuRuntime &runtime)
Atomically bind four coherent GPU projections to an owning PBR parameter snapshot.
Definition VegetationFieldGpu.cpp:385
Result< VegetationDetailRuntime > configureVegetationDetails(const PbrSurface &baseSurface, const VegetationMotion &baseMotion, const VegetationDetailSettings &s)
Validate and project TVE Global Details into native PBR and motion snapshots.
Definition VegetationDetails.cpp:35
@ InvalidArgument
@ NotFound
@ Unsupported
@ Failed
@ ParseError
@ Conflict
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92
Bounds applied before allocating decoded image bytes.
Definition EvpackImageDecoder.h:11
std::uint32_t maximumDimension
Definition EvpackImageDecoder.h:12
One decoded runtime chunk with its admitted semantic metadata.
Definition EvpackResourceReader.h:13
Structural and allocation limits for untrusted EVDEF metadata.
Definition RuntimeDefinition.h:17
std::uint64_t maximumBytes
Definition RuntimeDefinition.h:18
Fully validated, detached scene-manager candidate with no archive or GPU borrows.
Definition EvpackVegetationScene.h:103
Explicit per-draw inputs consumed by one TVE Element fragment evaluation.
Definition EvpackVegetationScene.h:76
glm::vec2 localUv
Definition EvpackVegetationScene.h:77
Detached TVE render-target source value and independent hardware blend policy.
Definition EvpackVegetationScene.h:94
std::int32_t blendRgb
Definition EvpackVegetationScene.h:97
One normalized Unity TVEElement definition awaiting texture realization.
Definition EvpackVegetationScene.h:52
One normalized Unity TVEElement definition awaiting texture realization.
Definition EvpackVegetationScene.h:60
std::int32_t visibility
Definition EvpackVegetationScene.h:66
std::int32_t directionMode
Definition EvpackVegetationScene.h:66
std::string textureAsset
Definition EvpackVegetationScene.h:62
std::string shaderGuid
Definition EvpackVegetationScene.h:62
std::string kind
Definition EvpackVegetationScene.h:62
std::uint32_t channel
Definition EvpackVegetationScene.h:64
std::array< float, 4 > rotation
Definition EvpackVegetationScene.h:70
std::array< float, 4 > value
Definition EvpackVegetationScene.h:70
bool enabled
Definition EvpackVegetationScene.h:65
std::int32_t blendAlpha
Definition EvpackVegetationScene.h:66
std::vector< VegetationSceneElementProperty > properties
Definition EvpackVegetationScene.h:63
std::array< float, 6 > remap
Definition EvpackVegetationScene.h:72
std::int32_t motionMode
Definition EvpackVegetationScene.h:66
std::uint16_t layers
Definition EvpackVegetationScene.h:67
std::int32_t blendRgb
Definition EvpackVegetationScene.h:66
std::array< float, 3 > scale
Definition EvpackVegetationScene.h:69
std::string textureGuid
Definition EvpackVegetationScene.h:62
bool invertDirection
Definition EvpackVegetationScene.h:65
std::int64_t sourceFileId
Definition EvpackVegetationScene.h:61
std::array< float, 3 > position
Definition EvpackVegetationScene.h:69
bool seasonal
Definition EvpackVegetationScene.h:65
float intensity
Definition EvpackVegetationScene.h:68
std::array< std::array< float, 4 >, 4 > seasons
Definition EvpackVegetationScene.h:71
bool volumeFade
Definition EvpackVegetationScene.h:65
float motionPower
Definition EvpackVegetationScene.h:68
Explicit detached inputs for publishing all nine TVE scene-manager field layers.
Definition EvpackVegetationScene.h:233
std::array< VegetationSceneChannelGpuBuild, 4 > channels
Definition EvpackVegetationScene.h:234
graphics::VegetationGpuRuntime runtime
Definition EvpackVegetationScene.h:235
std::uint64_t sourceRevision
Definition EvpackVegetationScene.h:236
Detached PBR and CPU-motion snapshot ready for atomic material publication.
Definition EvpackVegetationScene.h:115
graphics::PbrSurface surface
Definition EvpackVegetationScene.h:116
Owning material parameter snapshot; texture pointers remain borrowed. Base color/metallic/roughness c...
Definition PbrSurface.h:218
PbrVegetationMotion vegetationMotion
Definition PbrSurface.h:259
PbrVegetationExtras vegetationExtras
Definition PbrSurface.h:256
PbrVegetationVertex vegetationVertex
Definition PbrSurface.h:258
PbrVegetationColors vegetationColors
Definition PbrSurface.h:257
Four owning arrays in row-major X/Z order at texel centers.
Definition VegetationField.h:66
std::array< std::vector< glm::vec4 >, 4 > channels
Definition VegetationField.h:69
One owning vegetation channel in row-major X/Z order at texel centers. Channel atlases may use indepe...
Definition VegetationField.h:75
std::vector< glm::vec4 > pixels
Definition VegetationField.h:78
Runtime-owned global inputs shared by one coherent vegetation field binding. Time is explicit for det...
Definition VegetationFieldGpu.h:48
float globalBranch
Definition VegetationFieldGpu.h:54
float globalBending
Definition VegetationFieldGpu.h:54
float motionFadeDistance
Definition VegetationFieldGpu.h:55
std::array< float, 3 > worldOrigin
Definition VegetationFieldGpu.h:52
float cameraFadeMax
Definition VegetationFieldGpu.h:56
std::array< float, 2 > motionDirection
Definition VegetationFieldGpu.h:51
float fadeNoiseTiling
Definition VegetationFieldGpu.h:56
float globalFlutter
Definition VegetationFieldGpu.h:54
float cameraFadeMin
Definition VegetationFieldGpu.h:56
Owning linear RGBA mask, sampled bilinearly with clamped addressing.
Definition VegetationField.h:23
Source-equivalent plant motion parameters with explicit time and texture inputs. All data is owned....
Definition VegetationMotion.h:38