@forgeax/engine-vfx-render 0.1.4 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,9 @@ const vfx = createVfxRuntimeHost({
18
18
  const attached = await vfx.attachWorld({ world, assets });
19
19
  if (!attached.ok) return attached;
20
20
 
21
- const renderer = await createRenderer(canvas, { features: [vfx.feature] });
21
+ const created = await createRenderer(canvas, { features: [vfx.feature] });
22
+ if (!created.ok) throw created.error;
23
+ const renderer = created.value;
22
24
  ```
23
25
 
24
26
  Create the host before the Renderer and pass `host.feature` at Renderer
@@ -27,19 +29,13 @@ FixedUpdate producer. `detachWorld` removes both the system and runtime
27
29
  resource. Material and mesh GUIDs resolve through the attached World's
28
30
  `AssetRegistry`.
29
31
 
30
- When the Registry comes from `createApp`, select
31
- `vfxGpuEffectContribution` in the App's `assetDecoders` option. The App and
32
- host share that exact GPU decoder lease; a different `particle-effect`
33
- decoder remains a closed owner conflict. A manually created Registry can use
34
- `installVfxRuntimeDecoder` before `attachWorld`.
35
-
36
32
  ## Frame path
37
33
 
38
34
  | Stage | Work |
39
35
  |:--|:--|
40
36
  | Extract | Read camera and ordered GPU tick intents from each attached World |
41
- | Prepare | Reuse/create program, particle, scan, indirect, per-tick uniform, per-renderer projection, mesh, and graphics resources |
42
- | Contribute | Record spawn/update/scan/compact, one projection dispatch per renderer, then dependent indirect draws |
37
+ | Plan | Declare program, particle, scan, indirect, per-tick uniform, per-renderer projection, mesh, and graphics resources |
38
+ | Record | Compile the plan into spawn/update/scan/compact dispatches, then dependent indirect draws |
43
39
  | Recover | Drop generation-owned GPU state and restart affected runtime players |
44
40
  | Dispose | Release feature-owned state; the Renderer resolver destroys RHI resources exactly once |
45
41
 
@@ -73,9 +69,7 @@ use the same owner path.
73
69
  - A material pass named `particle-billboard` or `particle-mesh` selects that renderer's authored
74
70
  shader module and render state. Ordinary `Forward` passes are ignored because their vertex layout
75
71
  is not a particle projection contract; absence of a matching particle pass uses the package-owned
76
- built-in shader. The render owner derives whether the selected shader consumes a group-0
77
- scene-depth texture from its binding contract, so authored shaders retain their own group-0
78
- layout and are not given an unrelated depth binding.
72
+ built-in shader.
79
73
  - A custom particle material with a non-empty `parameters` schema receives the standard material
80
74
  bind group at group 1. Numeric parameters are uploaded through the shader-schema UBO layout;
81
75
  texture parameters resolve their authored TextureAsset and optional SamplerAsset through the