载入中...
搜索中...
未找到
PbrSurface.cpp
浏览该文件的文档.
7 DiagnosticCode::InvalidArgument, "invalid PBR surface factors or sampler", {}, {}, "graphics.material"));
29 !unit(s.vegetationColor.globalColorMaskMinimum) || !unit(s.vegetationColor.globalColorMaskMaximum) ||
30 !unit(s.vegetationColor.globalOverlayMaskMinimum) || !unit(s.vegetationColor.globalOverlayMaskMaximum) ||
32 s.vegetationColor.globalAlphaThresholdOffset < -.5f || s.vegetationColor.globalAlphaThresholdOffset > .5f ||
33 s.vegetationColor.globalColorMaskMaximum - s.vegetationColor.globalColorMaskMinimum + .0001f == 0.f ||
34 s.vegetationColor.globalOverlayMaskMaximum - s.vegetationColor.globalOverlayMaskMinimum + .0001f == 0.f ||
35 !unit(s.vegetationColor.vertexOcclusionMinimum) || !unit(s.vegetationColor.vertexOcclusionMaximum) ||
36 s.vegetationColor.vertexOcclusionMaximum - s.vegetationColor.vertexOcclusionMinimum + .0001f == 0.f)
38 if (uint32_t(s.vegetationColor.backfaceNormalMode) > uint32_t(PbrVegetationBackfaceNormalMode::Same)) return fail();
40 if ((i == 3 ? !unit(s.vegetationColor.fieldColor[i]) : !positive(s.vegetationColor.fieldColor[i])))
47 if (!unit(detail.value) || !unit(detail.normalBlendValue) || !std::isfinite(detail.normalValue) ||
48 detail.normalValue < -8 || detail.normalValue > 8 || !unit(detail.albedoValue) || !unit(detail.metallicValue) ||
54 detail.meshMaximum - detail.meshMinimum + .0001f == 0 || detail.uvMode > 2 || detail.colorMode > 1 ||
67 if (!unit(s.colorMaskMin) || !unit(s.colorMaskMax) || s.colorMaskMax - s.colorMaskMin + .0001f == 0.f ||
75 if (!unit(trans.maskMinimum) || !unit(trans.maskMaximum) || trans.maskMaximum - trans.maskMinimum + .0001f == 0.f)
77 if (!unit(trans.intensity) || !unit(trans.normalDistortion) || !unit(trans.direct) || !unit(trans.ambient) ||
78 !unit(trans.shadow) || !unit(trans.maskAmount) || !positive(trans.strength) || trans.strength > 50 ||
85 if (trans.intensity > 0 && trans.maskAmount > 0 && (!mask.texture || mask.srgbDecode)) return fail();
89 if (!normal.texture || normal.srgbDecode || s.normalScale < -8.f || s.normalScale > 8.f) return fail();
107 if (detail.value > 0 && (!detail.textures[0].texture || !detail.textures[1].texture)) return fail();
117 if (!unit(alpha.global) || !unit(alpha.variation) || !unit(alpha.glancing) || !unit(alpha.camera) ||
119 alpha.cameraFadeMin > 1000000 || !std::isfinite(alpha.cameraFadeMax) || alpha.cameraFadeMax < 0 ||
124 if (!unit(emission.minimum) || !unit(emission.maximum) || emission.maximum - emission.minimum + .0001f == 0 ||
128 if (!unit(gradient.minimum) || !unit(gradient.maximum) || gradient.maximum - gradient.minimum + .0001f == 0)
139 if (!std::isfinite(colors.fallback[i]) || (i == 3 ? !unit(colors.fallback[i]) : colors.fallback[i] < 0))
144 if (vertex.layer > 8 || uint32_t(vertex.source) > uint32_t(PbrVegetationDeformationSource::GpuFields))
152 if (!unit(vertex.globalSize) || !std::isfinite(vertex.sizeFadeStart) || vertex.sizeFadeStart < 0 ||
157 if (motion.layer > 8 || uint32_t(motion.mode) > uint32_t(PbrVegetationMotionMode::Object)) return fail();
171 for (float value : {motion.bending, motion.bendingSpeed, motion.bendingScale, motion.bendingVariation,
178 if (motion.mode == PbrVegetationMotionMode::Object && (!motion.texture || !motion.noise)) return fail();
179 if (motion.mode != PbrVegetationMotionMode::Disabled && vertex.source != PbrVegetationDeformationSource::GpuFields)
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
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
@ VegetationAG
@ TangentXYZ
@ MetallicRoughness
Result< void > validatePbrSurface(const PbrSurface &s)
Validate finite material factors and sampler enums without changing the input.
Definition PbrSurface.cpp:4
@ InvalidArgument
Owning material parameter snapshot; texture pointers remain borrowed. Base color/metallic/roughness c...
Definition PbrSurface.h:218