Skip to content

feat: VFX transformPosition block for skinned-mesh particle follow (Master3.0) - #2297

Open
xiaosong1985 wants to merge 4 commits into
layabox:Master3.0from
xiaosong1985:feat/vfx-transformposition-master3.0
Open

feat: VFX transformPosition block for skinned-mesh particle follow (Master3.0)#2297
xiaosong1985 wants to merge 4 commits into
layabox:Master3.0from
xiaosong1985:feat/vfx-transformposition-master3.0

Conversation

@xiaosong1985

Copy link
Copy Markdown
Contributor

VFX transformPosition block runtime support — enables the Unity SkinnedMeshTransform/VFXTransform mechanism (Energy DM bolts/sparks/surge particles follow character via a registered bone/node world matrix).

  • VisualEffect.ts: _transformSources registry + setTransformSource/clearTransformSource; _updateTransformSources() binds each registered node worldMatrix to u_VfxProp_VfxTransform_<name> uniform per frame. Texture-binding loop now skips transformSource entries (they are Mat4 uniforms, not textures — registering them as textures made setMatrix4x4cloneTo crash).
  • VFXAssetParser.ts: parse textureType === Transformentry.transformSource.

Mirrors the validated engine bundle (laya.vfx.js). transformPosition block codegen lives in the VFX editor plugin.

xiaosong1985 and others added 4 commits June 4, 2026 12:33
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant