@woosh/meep-engine 3.34.0 → 3.35.0
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/package.json +1 -1
- package/src/shade/device/timing/profile/GPUProfileSession.d.ts +25 -11
- package/src/shade/device/timing/profile/GPUProfileSession.d.ts.map +1 -1
- package/src/shade/device/timing/profile/GPUProfileSession.js +553 -474
- package/src/shade/playground/avboit/main.d.ts.map +1 -1
- package/src/shade/playground/avboit/main.js +888 -916
- package/src/shade/playground/particle_ecs/README.md +13 -7
- package/src/shade/playground/particle_ecs/bonfire_effects.d.ts +5 -5
- package/src/shade/playground/particle_ecs/bonfire_effects.js +5 -5
- package/src/shade/playground/particle_ecs/effects/smoke.json +1859 -1859
- package/src/shade/playground/particle_ecs/effects/soot.json +1605 -1605
- package/src/shade/playground/particle_system/README.md +1 -2
- package/src/shade/playground/profile_hotkey.d.ts.map +1 -1
- package/src/shade/playground/profile_hotkey.js +4 -40
- package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/main.js +4 -39
- package/src/shade/playground/volumetrics_froxel/main.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/main.js +4 -39
- package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/measure.js +2 -4
- package/src/shade/renderer/Renderer.d.ts +1 -1
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +3 -1
- package/src/shade/renderer/light/GPULightCollection.d.ts +9 -1
- package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
- package/src/shade/renderer/light/GPULightCollection.js +41 -0
- package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts +37 -0
- package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/shader_project_environment_sh.js +105 -0
- package/src/shade/renderer/particles/DESIGN.md +65 -8
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts +7 -1
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +1247 -1244
- package/src/shade/renderer/particles/graph_particles_avboit.d.ts +7 -1
- package/src/shade/renderer/particles/graph_particles_avboit.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles_avboit.js +9 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +4 -2
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts +15 -9
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting.js +29 -11
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting_model.d.ts +24 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting_model.d.ts.map +1 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_lighting_model.js +45 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts +3 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.js +38 -0
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +190 -185
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +8 -0
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +5 -0
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +8 -1
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +9 -0
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +13 -3
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +9 -1
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts +39 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.js +107 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.d.ts +15 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.js +44 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts +19 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.js +48 -0
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts +29 -0
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.js +90 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.d.ts +10 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.js +55 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.d.ts +10 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.js +47 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.d.ts +10 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.js +63 -0
- package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.d.ts +17 -0
- package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.js +26 -0
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts +8 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +50 -2
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +488 -436
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts +1 -1
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +254 -63
|
@@ -115,8 +115,13 @@ Two things to know before editing one:
|
|
|
115
115
|
- **The flame does not darken what is behind it.** Additive emitters write the emission accumulator,
|
|
116
116
|
which the resolve adds outside the coverage normalization — so the fire lights the frame instead of
|
|
117
117
|
taking coverage from it. The smoke, which is matter, does cover.
|
|
118
|
-
- **The
|
|
119
|
-
|
|
118
|
+
- **The smoke is lit, not painted.** Its gradient is an albedo — tar-brown near the fire, paling to
|
|
119
|
+
grey as it thins — and `EMITTER_FLAG.LIGHTING` does the rest: the firelight warms its underside,
|
|
120
|
+
the moon greys the column above, both shadowed, both read out of the froxel volume that lights
|
|
121
|
+
the fog. Orbit until the moon is behind it: the thin edges pass moonlight through (back-face
|
|
122
|
+
transmission) and the dense core holds it back.
|
|
123
|
+
- **The soot flakes cross in front of the flame** and read because they are near-black — lit like the
|
|
124
|
+
smoke, with an albedo to match. That is the cheapest depth cue in the set.
|
|
120
125
|
- **Orbit around it.** The particles and the transparent surfaces composite against each other with
|
|
121
126
|
no order between them — both write extinction into one voxel volume and both resolve out of the
|
|
122
127
|
same accumulators. Switch the renderer to MBOIT and the particles vanish while everything else
|
|
@@ -140,11 +145,8 @@ ask for it.
|
|
|
140
145
|
|
|
141
146
|
## What it deliberately does not do
|
|
142
147
|
|
|
143
|
-
- **
|
|
144
|
-
|
|
145
|
-
change no pixel. The smoke and the soot are *painted* lit instead: their gradients carry the fire's
|
|
146
|
-
warmth low down and the moon's blue higher up, over the particle's own age. When a lit hook lands,
|
|
147
|
-
those gradients are the thing to reconsider.
|
|
148
|
+
- **The flame and the embers are not lit.** They are additive and they are the light; the firelight
|
|
149
|
+
is a point light at the fire, because a particle does not light anything.
|
|
148
150
|
- **No emitter opts into culling.** One fire, always on screen; the frustum test in the tick pass
|
|
149
151
|
would never be taken. The measured bounds are still published every frame and still read by the
|
|
150
152
|
occupancy pass.
|
|
@@ -201,3 +203,7 @@ The four programs are around 620 VM instructions each in UPDATE, most of which i
|
|
|
201
203
|
is twelve of them for a divergence-free field: over a metre of flame nobody can tell, and the four
|
|
202
204
|
effects share the register budget above — the editor's toolbar reports both numbers after every
|
|
203
205
|
recompile, which is the cheapest way to notice an edit that has gone past them.
|
|
206
|
+
|
|
207
|
+
Lighting the smoke and the soot costs the particle draw +200..275 us at 1898x926 and +0.8..1.2 ms at
|
|
208
|
+
3818x2006 on an RTX 4090, over ~450 us and ~2.1 ms unlit; `renderer/particles/DESIGN.md` has how that was
|
|
209
|
+
measured and where it goes.
|
|
@@ -115,11 +115,11 @@ export function bonfire_sprite_urls(textures?: object): {
|
|
|
115
115
|
*
|
|
116
116
|
* ## Lighting
|
|
117
117
|
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
118
|
+
* The smoke and the soot are lit (`EMITTER_FLAG.LIGHTING`), so their gradients are albedo: the smoke
|
|
119
|
+
* tar-brown at birth paling to grey as it thins, the soot near-black throughout — the alpha ramps are
|
|
120
|
+
* the same as when the gradients were painted lit, emitted colour carrying the fire's warmth low down
|
|
121
|
+
* and the moon's blue higher up. The fire and the moon now do that. The flame and the embers are
|
|
122
|
+
* additive and unlit: they are the light.
|
|
123
123
|
*/
|
|
124
124
|
/**
|
|
125
125
|
* The four saved documents, by the key the page knows them by.
|
|
@@ -62,11 +62,11 @@ import soot_json from "./effects/soot.json";
|
|
|
62
62
|
*
|
|
63
63
|
* ## Lighting
|
|
64
64
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
65
|
+
* The smoke and the soot are lit (`EMITTER_FLAG.LIGHTING`), so their gradients are albedo: the smoke
|
|
66
|
+
* tar-brown at birth paling to grey as it thins, the soot near-black throughout — the alpha ramps are
|
|
67
|
+
* the same as when the gradients were painted lit, emitted colour carrying the fire's warmth low down
|
|
68
|
+
* and the moon's blue higher up. The fire and the moon now do that. The flame and the embers are
|
|
69
|
+
* additive and unlit: they are the light.
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
72
|
/**
|