reze-engine 0.55.4 → 0.55.6

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.
@@ -83,6 +83,10 @@ type ParticleSource = {
83
83
  blend: ParticleBlend
84
84
  /** Feed the bloom pyramid. Off by default — rain should not glow. */
85
85
  bloom: boolean
86
+ /** The effect's `#param` block, or empty. Spliced into BOTH stages: a spawn
87
+ * rule reads the same dial the shading does, and rain's fall speed is used
88
+ * in the compute half. */
89
+ paramsDecl: string
86
90
  }
87
91
 
88
92
  /** Bytes per particle. Explicitly padded — see the struct below. */
@@ -165,6 +169,7 @@ export function buildParticleComputeShader(src: ParticleSource, cast: CastLayout
165
169
  CAMERA_STRUCT +
166
170
  PARTICLE_UNIFORMS +
167
171
  `
172
+ ${src.paramsDecl}
168
173
  @group(0) @binding(0) var<storage, read_write> particles: array<Particle>;
169
174
  @group(0) @binding(1) var<uniform> pu: ParticleU;
170
175
  @group(0) @binding(2) var<uniform> cam: CameraU;
@@ -227,6 +232,7 @@ override ADDITIVE: bool = ${src.blend === "additive" ? "true" : "false"};\n` +
227
232
  CAMERA_STRUCT +
228
233
  PARTICLE_UNIFORMS +
229
234
  `
235
+ ${src.paramsDecl}
230
236
  @group(0) @binding(0) var<storage, read> particles: array<Particle>;
231
237
  @group(0) @binding(1) var<uniform> pu: ParticleU;
232
238
  @group(0) @binding(2) var<uniform> cam: CameraU;
@@ -33,6 +33,8 @@ type TrailSource = {
33
33
  /** For each ribbon, the LOCAL anchor slot it belongs to. Identity when every
34
34
  * anchor is trailed; otherwise it skips the untrailed ones. */
35
35
  ribbonSlots: number[]
36
+ /** The effect's `#param` block, or empty. */
37
+ paramsDecl: string
36
38
  /** Additive, like most glowing ribbons, or straight alpha. */
37
39
  blend: "alpha" | "additive"
38
40
  bloom: boolean
@@ -138,6 +140,7 @@ struct TrailU {
138
140
  weight: f32,
139
141
  _pad2: f32,
140
142
  }
143
+ ${src.paramsDecl}
141
144
  @group(0) @binding(0) var<storage, read> _rzCast: array<vec4f>;
142
145
  @group(0) @binding(1) var<uniform> tu: TrailU;
143
146
  @group(0) @binding(2) var<uniform> cam: CameraU;