载入中...
搜索中...
未找到
EvpackVegetationScene.cpp
浏览该文件的文档.
19const Value& member(const Value::Object& object, std::string_view name) { return object.at(std::string(name)); }
23 return std::all_of(fields.begin(), fields.end(), [&](auto name) { return object.contains(std::string(name)); });
57 return std::isfinite(value.x) && std::isfinite(value.y) && std::isfinite(value.z) && std::isfinite(value.w);
92 if (!element.seasonal) return glm::vec4(element.value[0], element.value[1], element.value[2], element.value[3]);
102float propertyScalar(const VegetationSceneElement& element, std::string_view name, float fallback) {
108glm::vec4 propertyVector(const VegetationSceneElement& element, std::string_view name, glm::vec4 fallback) {
117 const AssetRef& asset, const asset::EvpackCapabilities& capabilities, std::uint64_t maximumDecodedBytes) const {
118 auto payload = reader_.read(asset, "eve.vegetation-scene/1", capabilities, maximumDecodedBytes);
125 DiagnosticCode::Conflict, "duplicate scene definition", {}, {}, "asset.graphics.vegetation-scene"));
130 DiagnosticCode::NotFound, "scene definition is missing", {}, {}, "asset.graphics.vegetation-scene"));
136 if (!root || !exact(*root, {"schema", "schemaVersion", "sourceGuid", "control", "details", "motion", "volume", "elements"}) ||
137 !member(*root, "schema").isString() || member(*root, "schema").asString() != "eve.vegetation-scene" ||
145 return Result<LoadedVegetationScene>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument,
154 !exact(*control, {"values", "globalColor", "overlayColor", "overlayAlbedoGuid", "overlayNormalGuid",
156 !exact(*details, {"layers", "global", "colorMask", "overlayMask", "alphaThreshold", "perspective",
164 LoadedVegetationScene result{asset, std::move(sourceGuid), payload.value().variant, {}, {}, {}, {}, {}};
169 if (!values(member(*control, "values"), controls) || !values(member(*control, "globalColor"), result.control.globalColor) ||
171 !values(member(*motion, "values"), motions) || !values(member(*motion, "direction"), direction) ||
182 c.globalWetness = controls[3]; c.globalEmissive = controls[4]; c.globalSubsurface = controls[5];
183 c.globalSize = controls[6]; c.overlaySmoothness = controls[7]; c.overlayNormalScale = controls[8];
184 c.overlaySubsurface = controls[9]; c.overlayScale = controls[10]; c.wetnessContrast = controls[11];
185 c.wetnessNormalScale = controls[12]; c.noiseTiling = controls[13]; c.proximityFade = controls[14];
188 m.windPower = motions[0]; m.noiseTiling = motions[1]; m.bending = motions[2]; m.branch = motions[3];
189 m.flutter = motions[4]; m.speed = motions[5]; m.animatedTime = motions[6] >= .5f; m.fadeDistance = motions[7];
192 return Result<LoadedVegetationScene>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument,
196 result.volume.visibility = std::uint32_t(volumes[1]); result.volume.sorting = std::uint32_t(volumes[2]);
204 if (!whole(channel[0]) || !whole(channel[1]) || !whole(channel[2]) || channel[1] < 0 || channel[2] < 0)
206 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation volume channel integers are invalid", {},
211 if (c.season < 0 || c.season > 4 || !unit(c.globalAlpha) || !unit(c.globalOverlay) || !unit(c.globalWetness) ||
213 !unit(c.overlaySmoothness) || !unit(c.overlayNormalScale) || !unit(c.overlaySubsurface) || c.overlayScale <= 0 ||
214 !unit(c.wetnessContrast) || !unit(c.wetnessNormalScale) || c.noiseTiling <= 0 || !nonnegative(c.proximityFade) ||
217 !std::all_of(c.overlayColor.begin(), c.overlayColor.begin() + 3, nonnegative) || !unit(m.windPower) ||
221 (result.volume.visibility != 0 && result.volume.visibility != 10 && result.volume.visibility != 20) ||
224 !std::all_of(result.volume.channels.begin(), result.volume.channels.end(), [](const auto& channel) {
226 channel.width >= 32 && channel.height >= 32 && channel.width <= 16384 && channel.height <= 16384;
228 return Result<LoadedVegetationScene>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument,
232 Value detailDocument = Value::object({{"schema", "eve.graphics.vegetation-details"}, {"version", 1},
235 {"alphaThreshold", member(*details, "alphaThreshold")}, {"perspective", member(*details, "perspective")},
236 {"motionHighlight", member(*details, "motionHighlight")}, {"bending", member(*details, "bending")},
237 {"flutter", member(*details, "flutter")}, {"interactionAmplitude", member(*details, "interactionAmplitude")}});
244 return Result<LoadedVegetationScene>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument,
250 "extras-overlay", "extras-wetness", "motion-advanced", "motion-interaction", "motion-wind-power",
251 "vertex-conform-model", "vertex-conform-simple", "vertex-conform-terrain", "vertex-height-offset",
255 if (!element || !exact(*element, {"sourceFileId", "shaderGuid", "kind", "channel", "properties", "enabled", "visibility", "position",
277 if (!sourceFileId.isInt64() || sourceFileId.asInt() == 0 || !kind.isString() || !kinds.contains(kind.asString()) ||
279 !seasonal.isBool() || !blendRgb.isInt64() || !blendAlpha.isInt64() || !directionMode.isInt64() || !invertDirection.isBool() ||
280 !volumeFade.isBool() || !motionMode.isInt64() || !validGuid(shaderGuid, decodedElement.shaderGuid) ||
292 Diagnostic::error(DiagnosticCode::ParseError, "vegetation scene element values are malformed", {}, {},
297 Diagnostic::error(DiagnosticCode::ParseError, "vegetation scene element texture asset is invalid", {},
302 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene element property count is invalid",
309 if (!property || !exact(*property, {"name", "type", "textureGuid", "textureAsset", "vector", "value"}) ||
319 Diagnostic::error(DiagnosticCode::ParseError, "vegetation scene element property is malformed", {},
326 DiagnosticCode::ParseError, "vegetation scene element property texture asset is invalid", {}, {},
340 const auto rawChannel = channel.asInt(), rawVisibility = visibility.asInt(), rawLayers = layers.asInt();
343 if (rawChannel < 0 || rawChannel > 3 || rawVisibility < -1 || rawVisibility > 20 || rawLayers < 1 ||
344 rawLayers > 0x1ff || rawBlendRgb < 0 || rawBlendRgb > 2 || rawBlendAlpha < 0 || rawBlendAlpha > 1 ||
348 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene element integers are out of range",
352 decodedElement.visibility = std::int32_t(rawVisibility); decodedElement.layers = std::uint16_t(rawLayers);
353 decodedElement.seasonal = seasonal.asBool(); decodedElement.blendRgb = std::int32_t(rawBlendRgb);
356 decodedElement.invertDirection = invertDirection.asBool(); decodedElement.volumeFade = volumeFade.asBool();
358 const float rotationLength = std::sqrt(std::inner_product(decodedElement.rotation.begin(), decodedElement.rotation.end(),
361 decodedElement.kind.starts_with("extras-") ? 1u : decodedElement.kind.starts_with("motion-") ? 2u : 3u;
363 (decodedElement.visibility != -1 && decodedElement.visibility != 0 && decodedElement.visibility != 10 &&
364 decodedElement.visibility != 20) || decodedElement.layers == 0 || (decodedElement.layers & ~0x1ffu) ||
367 std::any_of(decodedElement.scale.begin(), decodedElement.scale.end(), [](float value) { return value <= 0; }) ||
368 decodedElement.remap[0] > decodedElement.remap[1] || decodedElement.remap[2] > decodedElement.remap[3] ||
383Result<VegetationSceneProjection> projectVegetationScene(const graphics::PbrSurface& baseSurface,
388 VegetationSceneProjection result{std::move(detailed.value().surface), std::move(detailed.value().motion),
451 if (!admitted) return Result<std::map<std::string, graphics::VegetationMask>>::failure(admitted.status());
453 if (property.type != 0 || (property.name != "_MainTex" && property.name != "_NoiseTex")) continue;
455 if (!admitted) return Result<std::map<std::string, graphics::VegetationMask>>::failure(admitted.status());
463 DiagnosticCode::InvalidArgument, "vegetation element masks exceed aggregate decoded budget", {}, {},
466 if (!image) return Result<std::map<std::string, graphics::VegetationMask>>::failure(image.status());
472 if (!decoded) return Result<std::map<std::string, graphics::VegetationMask>>::failure(decoded.status());
479 DiagnosticCode::InvalidArgument, "vegetation element masks exceed aggregate decoded budget", {}, {},
505 !finite(input.vertexColor) || !std::isfinite(input.worldPosition.x) || !std::isfinite(input.worldPosition.y) ||
506 !std::isfinite(input.worldPosition.z) || !std::isfinite(input.worldNormal.x) || !std::isfinite(input.worldNormal.y) ||
507 !std::isfinite(input.worldNormal.z) || !finite(input.velocityDirection) || !finite(input.noiseSample) ||
510 input.season > 4.f || !unit(element.intensity) || element.blendRgb < 0 || element.blendRgb > 2 ||
513 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation element pixel inputs are invalid", {}, {},
525 const float remappedAlpha = remap(input.mainSample.a, element.remap[2], element.remap[3], .0001f);
527 const float radial = std::clamp(std::clamp(1.f - glm::length(centered), 0.f, 1.f), .0001f, .9999f);
530 const float alpha = element.intensity * remappedAlpha * input.elementParams.a * input.vertexColor.a * falloff * volume;
533 const float alphaBlend = element.blendAlpha == 0 ? glm::mix(1.f, scalar, alpha) : scalar * alpha;
542 output.value = {selected.r * remappedRgb.r, selected.g * remappedRgb.g, selected.b * remappedRgb.b,
589 Diagnostic::error(DiagnosticCode::InvalidArgument, "TVE advanced motion direction mode is invalid",
623 output.value = {0.f, 0.f, input.worldPosition.y + propertyScalar(element, "_HeightOffsetValue", 0.f),
632 output.value = {0.f, 0.f, input.terrainHeight + propertyScalar(element, "_HeightOffsetValue", 0.f),
647 const glm::vec3 normal = glm::length(input.worldNormal) > 0.f ? glm::normalize(input.worldNormal)
656 Diagnostic::error(DiagnosticCode::Unsupported, "TVE Element pixel shader is not implemented", element.kind,
661 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation element pixel evaluation overflowed", {}, {},
670 case VegetationScenePixelBlend::Alpha: return src * source.value.a + dst * (1.f - source.value.a);
686 const LoadedVegetationScene& scene, const std::map<std::string, graphics::VegetationMask>& masks,
687 graphics::VegetationChannel channel, const graphics::VegetationChannelAtlas& base, std::uint8_t layer,
692 pixelCount64 > 4 * 1024 * 1024 || !std::isfinite(base.center.x) || !std::isfinite(base.center.y) ||
693 !std::isfinite(base.center.z) || !std::isfinite(base.extent.x) || !std::isfinite(base.extent.y) ||
694 !std::isfinite(base.extent.z) || base.extent.x <= 0.f || base.extent.y <= 0.f || base.extent.z <= 0.f ||
697 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene channel geometry or layer is invalid",
705 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene channel input sizes are inconsistent",
713 if (!element.enabled || element.channel != channelIndex || !(element.layers & (1u << layer))) continue;
729 const glm::vec3 delta = world - glm::vec3(element.position[0], element.position[1], element.position[2]);
736 const bool flipped = element.kind == "motion-interaction" || element.kind == "motion-advanced" ||
740 input.mainSample = mask ? sampleMask(*mask, flipped ? glm::vec2(1.f) - uv : uv) : glm::vec4(1.f);
774 const LoadedVegetationScene& scene, const std::map<std::string, graphics::VegetationMask>& masks,
786 auto baked = bakeVegetationSceneChannel(scene, masks, static_cast<graphics::VegetationChannel>(index),
797 if (tveAtlas.width == 0 || tveAtlas.height == 0 || tveAtlas.width > 2048 || tveAtlas.height > 2048 ||
798 pixelCount64 > 4 * 1024 * 1024 || !std::isfinite(tveAtlas.center.x) || !std::isfinite(tveAtlas.center.y) ||
800 !std::isfinite(tveAtlas.extent.y) || !std::isfinite(tveAtlas.extent.z) || tveAtlas.extent.x <= 0.f ||
803 Diagnostic::error(DiagnosticCode::InvalidArgument, "TVE vegetation channel geometry is invalid", {}, {},
807 std::any_of(tveAtlas.pixels.begin(), tveAtlas.pixels.end(), [](glm::vec4 value) { return !finite(value); }))
809 Diagnostic::error(DiagnosticCode::InvalidArgument, "TVE vegetation channel pixels are invalid", {}, {},
822 Diagnostic::error(DiagnosticCode::Failed, "native vegetation channel allocation failed", {}, {},
835 graphics::VegetationChannelAtlas source{tveAtlas.width, tveAtlas.height, tveAtlas.center, tveAtlas.extent,
837 auto converted = convertVegetationSceneChannelToNative(static_cast<graphics::VegetationChannel>(index), source);
847 const std::map<std::string, graphics::VegetationMask>& masks, const VegetationSceneGpuBuild& build) {
850 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene GPU revision must be nonzero", {}, {},
853 if (!projected) return Result<std::unique_ptr<VegetationSceneGpuRuntime>>::failure(projected.status());
866 if (!native) return Result<std::unique_ptr<VegetationSceneGpuRuntime>>::failure(native.status());
871 auto runtime = std::unique_ptr<VegetationSceneGpuRuntime>(new VegetationSceneGpuRuntime(factory));
874 auto uploaded = graphics::uploadVegetationGpuFieldSet(factory, nativeChannels[0], nativeChannels[1],
877 if (!uploaded) return Result<std::unique_ptr<VegetationSceneGpuRuntime>>::failure(uploaded.status());
899 Diagnostic::error(DiagnosticCode::Failed, "vegetation scene GPU binding rollback failed", {}, {},
906 Diagnostic::error(DiagnosticCode::Failed, "vegetation scene GPU runtime allocation failed", {}, {},
914 const std::map<std::string, graphics::VegetationMask>& masks, const VegetationSceneGpuBuild& build) {
917 Diagnostic::error(DiagnosticCode::Conflict, "released vegetation scene runtime cannot be replaced", {}, {},
921 Diagnostic::error(DiagnosticCode::Conflict, "vegetation scene GPU revision changed before replacement", {},
925 Diagnostic::error(DiagnosticCode::InvalidArgument, "vegetation scene replacement revision must increase",
935 Diagnostic::error(DiagnosticCode::Failed, "vegetation scene replacement retirement allocation failed", {},
951 return Result<VegetationSceneGpuPublication>::success({sourceRevision_, retiredFields_.size()});
std::vector< std::unique_ptr< ScriptClimbingEventSink > > retired
Definition ClimbingServices.cpp:188
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={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
bool isSuccess() const noexcept
Whether the operation completed without a failure outcome.
Definition Status.h:105
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 EvpackRegistry.cpp:257
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:116
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:844
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:911
Result< void > release()
Invalidate material borrows and release all fields; failed entries remain owned for retry.
Definition EvpackVegetationScene.cpp:960
Texture / mesh / shader / canvas creation and release.
Definition IResourceFactory.h:39
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:794
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:685
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:502
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:383
Result< graphics::VegetationAtlas > convertVegetationSceneAtlasToNative(const graphics::VegetationAtlas &tveAtlas)
Convert a fully composed TVE render-target atlas to EVEngine field channel conventions.
Definition EvpackVegetationScene.cpp:827
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:773
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:431
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:666
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:27
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:136
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:152
Result< void > validatePbrSurface(const PbrSurface &s)
Validate finite material factors and sampler enums without changing the input.
Definition PbrGpuUniform.cpp:124
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:387
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
SocketDirection rotate(SocketDirection direction, int degrees)
Definition HouseGenerationAlgorithms.cpp:119
@ InvalidArgument
@ NotFound
@ Unsupported
@ Failed
@ ParseError
@ Conflict
Result< float > readFiniteFloatValue(const Value &value)
Convert an Integer or Double to a finite Float after validating its source range.
Definition Value.cpp:81
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
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:240
PbrVegetationMotion vegetationMotion
Definition PbrSurface.h:281
PbrVegetationExtras vegetationExtras
Definition PbrSurface.h:278
PbrVegetationVertex vegetationVertex
Definition PbrSurface.h:280
PbrVegetationColors vegetationColors
Definition PbrSurface.h:279
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
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