fix: VFX setPositionMesh per-mesh vertex scale with cm-unit fallback (VFX setPositionMesh 点云按 mesh 顶点缩放 + cm-unit 兜底) (Master3.0) - #2308
Open
xiaosong1985 wants to merge 6 commits into
Conversation
…t fix(同步子模块 WebGPU device buffer destroy 幂等修复) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r uniform 按粒子年龄采样曲线实现 per-particle alpha 淡入) - VisualEffect: PER_PARTICLE_AGE_CURVE_UNIFORMS 集合驱动 Alpha_Multiplier,把 age 曲线拆成 times/vals 两个 vec4 uniform 传给 render shader 做分段采样;uniform 名补去全部下划线变体兜底(_evaluateShaderExpressions + 纹理 defaults 两处) - ShaderExpressionEvaluator: SampleCurve(time=ageMedian) 走曲线时间平均 _sampleCurveAverage 近似整体亮度;_sampleCurve 改 public 供 VisualEffect 调用;抽具名常量 AGE_MEDIAN_SLOT_NAME / CURVE_AVERAGE_SAMPLE_COUNT Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…loop 重新 fire,修复 spawn 脉冲只触发一次) VFXSpawnerSingleBurst.internalInit 恢复 this.sleeping=false。 之前为修 Infinite-loop 重复 fire 把重置完全禁用,导致有限循环(durationMode=Constant)的 SingleBurst 也只 fire 一次,底圈脉冲无法重复。 Infinite loop 因 loopDuration=-1 不重启、newLoop 只第一次 true,所以仍只 fire 一次,不会回归旧 bug。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e follow Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…调试 console.log:VFXRenderer 的 alpha-patch/strip 材质/strip 渲染路径日志、VFXAssetParser 的 runtime parse 与 sampleMesh 日志、VisualEffect.onStart 日志、VFXParticleSystem 的 strip geometry 创建与 outputPhase 日志,均为排查期临时输出,不影响运行逻辑)
…ing with cm-unit fallback (setPositionMesh 点云烘焙支持按 mesh 顶点缩放并对已知 cm-unit mesh 兜底,修复 Ellen.fbx 等 100x 点云火焰喷到屏幕外) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
VFX
setPositionMesh点云烘焙(VFXAssetParser.ts)支持按 mesh 顶点缩放:_resolveMeshScale(rawScale, uuid)+MESH_CMUNIT_FALLBACK兜底表bakeMeshSurfacePoints/bakeMeshVolumePoints(及相关点云数据函数)增加可选scale参数,对采样点位置乘以缩放meshScale;.lvfx没带时,对已知 cm-unit mesh(Unity fileScale 未应用、顶点 100x,如 Ellen.fbx)兜底 0.01解决的问题
cm-unit 的 mesh(如 Smoke DM 火焰发射面 Ellen.fbx)顶点是 cm 量级(米级 ×100),烘成点云后 100x 过大,粒子喷到屏幕外(看不到火焰)。之前引擎用硬编码 ×0.01 兜底,会错误缩小内置 mesh(如 Capsule swarm)。本改动改为数据驱动 + 仅对已知 cm-unit mesh 兜底。
说明
meshScale串接,不改动各分支既有的采样算法(3.4 拆分版 / Master3.0 面积加权内联版各自保持)。