@woosh/meep-engine 3.47.0 → 3.49.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/build/bundle-worker-terrain.js +1 -1
- package/editor/particles/effect/ParticleReferenceSimulation.d.ts +1 -2
- package/editor/particles/effect/ParticleReferenceSimulation.d.ts.map +1 -1
- package/editor/particles/effect/ParticleReferenceSimulation.js +2 -4
- package/editor/view/particles/effect/ParticleGraphEditorView.js +1 -1
- package/package.json +1 -1
- package/src/engine/ecs/async/WORKER_SYSTEM_PLAN.md +27 -11
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +11 -0
- package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts +2 -2
- package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts.map +1 -1
- package/src/engine/graphics/ecs/particles/ParticleEffect.js +7 -7
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts +8 -0
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.js +11 -3
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.d.ts +26 -0
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.d.ts.map +1 -0
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.js +91 -0
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +2 -2
- package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics3/GraphicsEngine.js +8 -1
- package/src/engine/graphics3/ParticipatingMedia.d.ts +84 -1
- package/src/engine/graphics3/ParticipatingMedia.d.ts.map +1 -1
- package/src/engine/graphics3/ParticipatingMedia.js +139 -5
- package/src/engine/graphics3/ParticipatingMediaSerializationAdapter.d.ts +6 -2
- package/src/engine/graphics3/ParticipatingMediaSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics3/ParticipatingMediaSerializationAdapter.js +29 -4
- package/src/engine/graphics3/ParticipatingMediaSerializationUpgrader_0_1.d.ts +10 -0
- package/src/engine/graphics3/ParticipatingMediaSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/graphics3/ParticipatingMediaSerializationUpgrader_0_1.js +38 -0
- package/src/engine/graphics3/ParticipatingMediaSystem.d.ts.map +1 -1
- package/src/engine/graphics3/ParticipatingMediaSystem.js +46 -3
- package/src/engine/network/NetworkSession.d.ts +16 -5
- package/src/engine/network/NetworkSession.d.ts.map +1 -1
- package/src/engine/network/NetworkSession.js +104 -7
- package/src/engine/network/README.md +27 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +40 -18
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +180 -190
- package/src/engine/network/replication/Replicator.d.ts +15 -4
- package/src/engine/network/replication/Replicator.d.ts.map +1 -1
- package/src/engine/network/replication/Replicator.js +50 -16
- package/src/engine/network/state/RecordArrivalRing.d.ts +57 -0
- package/src/engine/network/state/RecordArrivalRing.d.ts.map +1 -0
- package/src/engine/network/state/RecordArrivalRing.js +144 -0
- package/src/engine/physics/cloth/MEASUREMENTS.md +354 -0
- package/src/engine/physics/cloth/PLAN.md +85 -5
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +0 -12
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +0 -13
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +2 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +7 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.js +4 -15
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +2 -1
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +6 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +20 -10
- package/src/engine/physics/cloth/playground/collide.html +5 -3
- package/src/engine/physics/cloth/playground/collide_main.js +14 -13
- package/src/engine/physics/cloth/solver/ClothState.d.ts +30 -2
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +62 -4
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +11 -3
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_self_find.js +52 -11
- package/src/engine/physics/cloth/solver/cloth_self_radius.d.ts +42 -0
- package/src/engine/physics/cloth/solver/cloth_self_radius.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_self_radius.js +64 -0
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +99 -24
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +102 -25
- package/src/engine/physics/cloth/solver/cloth_step.d.ts +5 -1
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +13 -3
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +0 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +12 -14
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +23 -4
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +36 -8
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +4 -2
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/device/mock/SoftwareGPUDevice.d.ts +15 -0
- package/src/shade/device/mock/SoftwareGPUDevice.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUDevice.js +21 -0
- package/src/shade/device/pipeline/ComputePipelineManager.d.ts +20 -0
- package/src/shade/device/pipeline/ComputePipelineManager.d.ts.map +1 -1
- package/src/shade/device/pipeline/ComputePipelineManager.js +80 -6
- package/src/shade/device/pipeline/PipelineEnquiry.d.ts +52 -0
- package/src/shade/device/pipeline/PipelineEnquiry.d.ts.map +1 -0
- package/src/shade/device/pipeline/PipelineEnquiry.js +63 -0
- package/src/shade/device/pipeline/RenderPipelineManager.d.ts +21 -0
- package/src/shade/device/pipeline/RenderPipelineManager.d.ts.map +1 -1
- package/src/shade/device/pipeline/RenderPipelineManager.js +84 -4
- package/src/shade/playground/contact_shadows/ContactShadowLab.d.ts +137 -0
- package/src/shade/playground/contact_shadows/ContactShadowLab.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/ContactShadowLab.js +654 -0
- package/src/shade/playground/contact_shadows/README.md +126 -0
- package/src/shade/playground/contact_shadows/index.html +191 -0
- package/src/shade/playground/contact_shadows/main.d.ts +2 -0
- package/src/shade/playground/contact_shadows/main.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/main.js +888 -0
- package/src/shade/playground/contact_shadows/scenes.d.ts +48 -0
- package/src/shade/playground/contact_shadows/scenes.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/scenes.js +620 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_composite.d.ts +36 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_composite.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_composite.js +245 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_reference.d.ts +15 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_reference.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_reference.js +120 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_stats.d.ts +55 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_stats.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_stats.js +216 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_view.d.ts +20 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_view.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_view.js +114 -0
- package/src/shade/playground/contact_shadows/shader_contact_shadow_march.d.ts +11 -0
- package/src/shade/playground/contact_shadows/shader_contact_shadow_march.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_shadow_march.js +90 -0
- package/src/shade/playground/contact_shadows/textures.d.ts +16 -0
- package/src/shade/playground/contact_shadows/textures.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/textures.js +123 -0
- package/src/shade/playground/particle_ecs/README.md +1 -1
- package/src/shade/playground/particle_ecs/effects/flame.json +1932 -1881
- package/src/shade/playground/particle_ecs/effects/smoke.json +99 -1
- package/src/shade/playground/particle_ecs/effects/soot.json +152 -145
- package/src/shade/playground/tonemap_sdr/README.md +90 -0
- package/src/shade/playground/tonemap_sdr/ToneMapCompare.d.ts +105 -0
- package/src/shade/playground/tonemap_sdr/ToneMapCompare.d.ts.map +1 -0
- package/src/shade/playground/tonemap_sdr/ToneMapCompare.js +380 -0
- package/src/shade/playground/tonemap_sdr/chunk_tonemap_gt7_sdr_reference.d.ts +32 -0
- package/src/shade/playground/tonemap_sdr/chunk_tonemap_gt7_sdr_reference.d.ts.map +1 -0
- package/src/shade/playground/tonemap_sdr/chunk_tonemap_gt7_sdr_reference.js +104 -0
- package/src/shade/playground/tonemap_sdr/index.html +90 -0
- package/src/shade/playground/tonemap_sdr/main.d.ts +2 -0
- package/src/shade/playground/tonemap_sdr/main.d.ts.map +1 -0
- package/src/shade/playground/tonemap_sdr/main.js +306 -0
- package/src/shade/playground/tonemap_sdr/scenes.d.ts +26 -0
- package/src/shade/playground/tonemap_sdr/scenes.d.ts.map +1 -0
- package/src/shade/playground/tonemap_sdr/scenes.js +404 -0
- package/src/shade/playground/volumetrics_froxel/main.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/main.js +85 -4
- package/src/shade/playground/water_refraction/README.md +26 -18
- package/src/shade/playground/water_refraction/index.html +1 -1
- package/src/shade/renderer/Renderer.d.ts +35 -3
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +208 -12
- package/src/shade/renderer/ShadeToneMappingMode.d.ts +14 -0
- package/src/shade/renderer/ShadeToneMappingMode.d.ts.map +1 -0
- package/src/shade/renderer/ShadeToneMappingMode.js +30 -0
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts +9 -0
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.js +14 -0
- package/src/shade/renderer/animation/skinning/shader_meshlet_apply_skinning.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/shader_meshlet_apply_skinning.js +5 -3
- package/src/shade/renderer/buffer/table/GPUDatabase.d.ts +7 -0
- package/src/shade/renderer/buffer/table/GPUDatabase.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/GPUDatabase.js +12 -0
- package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.d.ts +8 -0
- package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.js +12 -0
- package/src/shade/renderer/camera/GPUCameraContext.d.ts.map +1 -1
- package/src/shade/renderer/camera/GPUCameraContext.js +19 -8
- package/src/shade/renderer/deferred/chunk_read_gBuffer_material.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_read_gBuffer_material.js +4 -0
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.js +4 -0
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.js +4 -0
- package/src/shade/renderer/deferred/shader_deferred_main.d.ts.map +1 -1
- package/src/shade/renderer/deferred/shader_deferred_main.js +3 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR.d.ts +6 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR.d.ts.map +1 -1
- package/src/shade/renderer/deferred/shader_tonemap_HDR.js +13 -3
- package/src/shade/renderer/deferred/shader_tonemap_HDR_none.d.ts +9 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_none.d.ts.map +1 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_none.js +63 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.d.ts +10 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.d.ts.map +1 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.js +87 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR.d.ts +6 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR.d.ts.map +1 -1
- package/src/shade/renderer/deferred/shader_tonemap_LDR.js +23 -5
- package/src/shade/renderer/deferred/shader_tonemap_LDR_none.d.ts +9 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_none.d.ts.map +1 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_none.js +68 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.d.ts +10 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.d.ts.map +1 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.js +73 -0
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.d.ts.map +1 -1
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +58 -9
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +35 -25
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +97 -196
- package/src/shade/renderer/geometry/sdf/shader_build_sdf.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/shader_build_sdf.js +121 -129
- package/src/shade/renderer/global_illumination/brick4/gpu/bake/brick4_bake_basic.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/bake/brick4_bake_basic.js +3 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/bake/shader_brick4_bake_probes.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/bake/shader_brick4_bake_probes.js +4 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js +4 -0
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.js +3 -0
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.js +4 -0
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.js +4 -0
- package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.js +4 -0
- package/src/shade/renderer/gpu_primitive/bvh/GPU_BVH_BUILD_PLAN.md +131 -1
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_delta.d.ts +7 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_delta.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_delta.js +45 -38
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_determine_range.d.ts +2 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_determine_range.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_determine_range.js +81 -79
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_find_split.d.ts +2 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_find_split.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_find_split.js +5 -3
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_internal_children.d.ts +21 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_internal_children.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_internal_children.js +42 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_morton_code.d.ts +19 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_morton_code.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_morton_code.js +44 -0
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.d.ts +23 -5
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.js +139 -23
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.d.ts +25 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.js +179 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.d.ts +2 -2
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.js +7 -16
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_morton.d.ts +3 -4
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_morton.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_morton.js +6 -23
- package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts +11 -0
- package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.js +14 -3
- package/src/shade/renderer/gpu_primitive/indirect/build_indirect_draw_command.d.ts +10 -0
- package/src/shade/renderer/gpu_primitive/indirect/build_indirect_draw_command.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/indirect/build_indirect_draw_command.js +13 -3
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts +10 -0
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js +14 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_comparator.d.ts +26 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_comparator.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_comparator.js +52 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_workgroup.d.ts +32 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_workgroup.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_workgroup.js +89 -0
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +10 -0
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +20 -1
- package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts +10 -0
- package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts.map +1 -1
- package/src/shade/renderer/hiz/HierarchicalZBuffer.js +294 -281
- package/src/shade/renderer/light/GPULightCollection.d.ts +8 -0
- package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
- package/src/shade/renderer/light/GPULightCollection.js +18 -1
- package/src/shade/renderer/light/cluster/cull/graph_cull_lights.d.ts +8 -0
- package/src/shade/renderer/light/cluster/cull/graph_cull_lights.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/cull/graph_cull_lights.js +234 -218
- package/src/shade/renderer/light/cluster/graph_assign_clsuters.d.ts +7 -0
- package/src/shade/renderer/light/cluster/graph_assign_clsuters.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/graph_assign_clsuters.js +13 -0
- package/src/shade/renderer/light/cluster/graph_build_light_clusters.d.ts +7 -0
- package/src/shade/renderer/light/cluster/graph_build_light_clusters.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/graph_build_light_clusters.js +16 -2
- package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts +10 -0
- package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/execute_filter_environment_map.js +13 -0
- package/src/shade/renderer/lightmap/GPULightMap.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/GPULightMap.js +3 -0
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_irradiance_flat.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_irradiance_flat.js +4 -0
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_sh.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_sh.js +4 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.d.ts +16 -4
- package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.js +38 -8
- package/src/shade/renderer/particles/DESIGN.md +49 -7
- package/src/shade/renderer/particles/ORIENTATION_PLAN_2026_10_15.md +453 -0
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts +5 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js +13 -5
- package/src/shade/renderer/particles/data/particle_emitter_record.js +2 -2
- package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.js +12 -0
- package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.d.ts +60 -0
- package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.js +156 -0
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +2 -2
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/ParticleEmitter.js +8 -8
- 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 +6 -4
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts +7 -6
- 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 +91 -58
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.js +10 -0
- package/src/shade/renderer/path_tracer/accumulating/shader_accumulating_path_tracer.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/shader_accumulating_path_tracer.js +5 -1
- package/src/shade/renderer/path_tracer/graph_path_trace_scene.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/graph_path_trace_scene.js +6 -0
- package/src/shade/renderer/postprocess/bloom/graph_postprocess_bloom.d.ts +7 -0
- package/src/shade/renderer/postprocess/bloom/graph_postprocess_bloom.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/bloom/graph_postprocess_bloom.js +18 -0
- package/src/shade/renderer/postprocess/denoise/LigmaDenoiser.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/denoise/LigmaDenoiser.js +1 -0
- package/src/shade/renderer/postprocess/denoise/shader_temporal_reprojection_luma.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/denoise/shader_temporal_reprojection_luma.js +6 -4
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +11 -0
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +16 -0
- package/src/shade/renderer/postprocess/gtao/GTAO.d.ts +10 -0
- package/src/shade/renderer/postprocess/gtao/GTAO.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/GTAO.js +16 -0
- package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.js +32 -10
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_temporal_accumulate.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_temporal_accumulate.js +3 -0
- package/src/shade/renderer/postprocess/ssr/resolve/build_ssr_resolve_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/build_ssr_resolve_shader.js +6 -3
- package/src/shade/renderer/postprocess/taa/TAA.d.ts +12 -0
- package/src/shade/renderer/postprocess/taa/TAA.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/TAA.js +15 -0
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts +7 -0
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.js +13 -0
- package/src/shade/renderer/rasterize/TemplatePassDescriptor.d.ts +31 -3
- package/src/shade/renderer/rasterize/TemplatePassDescriptor.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/TemplatePassDescriptor.js +79 -4
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts +17 -0
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.js +35 -4
- package/src/shade/renderer/rasterize/compute/graph_mesh_frustum_cull.d.ts +7 -0
- package/src/shade/renderer/rasterize/compute/graph_mesh_frustum_cull.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/compute/graph_mesh_frustum_cull.js +182 -169
- package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.js +20 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.js +18 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.js +20 -1
- package/src/shade/renderer/rasterize/expand/graph_mesh_filter_one_way.d.ts +7 -0
- package/src/shade/renderer/rasterize/expand/graph_mesh_filter_one_way.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/graph_mesh_filter_one_way.js +187 -170
- package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.js +19 -1
- package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.d.ts +13 -0
- package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.js +25 -1
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.js +20 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.js +6 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.js +6 -0
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +3 -2
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +3 -2
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +7 -2
- 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 +12 -4
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_brick4.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_brick4.js +4 -3
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_ibl.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_ibl.js +4 -3
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts +2 -1
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +11 -3
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.js +4 -3
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments_ibl.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments_ibl.js +4 -3
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts +15 -0
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +35 -2
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts +14 -0
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +32 -4
- package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.d.ts +17 -0
- package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.js +34 -4
- package/src/shade/renderer/restir/di/chunk_restir_resolve.d.ts +5 -3
- package/src/shade/renderer/restir/di/chunk_restir_resolve.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/chunk_restir_resolve.js +8 -3
- package/src/shade/renderer/restir/di/graph_restir_di.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/graph_restir_di.js +1 -0
- package/src/shade/renderer/restir/di/shader_restir_di_resolve.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/shader_restir_di_resolve.js +5 -1
- package/src/shade/renderer/restir/reservoir/shader.d.ts.map +1 -1
- package/src/shade/renderer/restir/reservoir/shader.js +7 -4
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +7 -0
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +13 -1
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +10 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +19 -0
- package/src/shade/renderer/scene/SceneManager.d.ts +9 -0
- package/src/shade/renderer/scene/SceneManager.d.ts.map +1 -1
- package/src/shade/renderer/scene/SceneManager.js +11 -0
- package/src/shade/renderer/scene/hierarchy/graph_nodes_update_transform_hierarchy.d.ts +11 -0
- package/src/shade/renderer/scene/hierarchy/graph_nodes_update_transform_hierarchy.d.ts.map +1 -1
- package/src/shade/renderer/scene/hierarchy/graph_nodes_update_transform_hierarchy.js +17 -0
- package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.d.ts +11 -0
- package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.d.ts.map +1 -1
- package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.js +18 -1
- package/src/shade/renderer/shader/ComputeShader.d.ts +12 -0
- package/src/shade/renderer/shader/ComputeShader.d.ts.map +1 -1
- package/src/shade/renderer/shader/ComputeShader.js +53 -0
- package/src/shade/renderer/shader/ImageShader.d.ts +27 -8
- package/src/shade/renderer/shader/ImageShader.d.ts.map +1 -1
- package/src/shade/renderer/shader/ImageShader.js +70 -1
- package/src/shade/renderer/shader/ShaderDescriptor.d.ts +21 -0
- package/src/shade/renderer/shader/ShaderDescriptor.d.ts.map +1 -1
- package/src/shade/renderer/shader/ShaderDescriptor.js +71 -1
- package/src/shade/renderer/shader/chunk/camera/chunk_project_view_position_from_depth.d.ts +17 -0
- package/src/shade/renderer/shader/chunk/camera/chunk_project_view_position_from_depth.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/camera/chunk_project_view_position_from_depth.js +45 -0
- package/src/shade/renderer/shader/chunk/camera/chunk_screen_coordinate_to_view.js +3 -3
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.js +62 -62
- package/src/shade/renderer/shader/chunk/color/tonemap/HDR_TONE_MAPPING_FORMS_BRIEF_2026_10_16.md +318 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/SDR_TONE_MAPPING_BRIEF_2026_10_16.md +237 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.d.ts +17 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.js +22 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_khronos_pbr.d.ts +14 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_khronos_pbr.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_khronos_pbr.js +28 -15
- package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts +12 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.js +128 -110
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_offset_ray_from_depth.d.ts +20 -0
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_offset_ray_from_depth.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_offset_ray_from_depth.js +33 -0
- package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts +4 -0
- package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.js +12 -1
- package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js +7 -0
- package/src/shade/renderer/shader/chunk/material/MULTISCATTER.md +108 -0
- package/src/shade/renderer/shader/chunk/material/chunk_compute_indirect_specular.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/material/chunk_compute_indirect_specular.js +23 -4
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts +18 -0
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +56 -0
- package/src/shade/renderer/shader/chunk/material/chunk_re_indirect_specular_physical.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/material/chunk_re_indirect_specular_physical.js +2 -0
- package/src/shade/renderer/shader/chunk/screen_space/chunk_screen_space_linear_ray.d.ts +43 -0
- package/src/shade/renderer/shader/chunk/screen_space/chunk_screen_space_linear_ray.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/screen_space/chunk_screen_space_linear_ray.js +319 -0
- package/src/shade/renderer/shader/compiler/CodeChunk.d.ts +33 -0
- package/src/shade/renderer/shader/compiler/CodeChunk.d.ts.map +1 -1
- package/src/shade/renderer/shader/compiler/CodeChunk.js +140 -0
- package/src/shade/renderer/shader/compiler/CodeChunkChoice.d.ts +74 -0
- package/src/shade/renderer/shader/compiler/CodeChunkChoice.d.ts.map +1 -0
- package/src/shade/renderer/shader/compiler/CodeChunkChoice.js +166 -0
- package/src/shade/renderer/shader/compiler/SHADER_SWITCH_PROPOSAL_2026_10_16.md +680 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitch.d.ts +86 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitch.d.ts.map +1 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitch.js +178 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitchSet.d.ts +67 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitchSet.d.ts.map +1 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitchSet.js +205 -0
- package/src/shade/renderer/shadow/contact/CONTACT_SHADOW_WAVE_SIZE.d.ts +14 -0
- package/src/shade/renderer/shadow/contact/CONTACT_SHADOW_WAVE_SIZE.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/CONTACT_SHADOW_WAVE_SIZE.js +13 -0
- package/src/shade/renderer/shadow/contact/ContactShadowDispatchList.d.ts +65 -0
- package/src/shade/renderer/shadow/contact/ContactShadowDispatchList.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/ContactShadowDispatchList.js +252 -0
- package/src/shade/renderer/shadow/contact/FINDINGS.md +413 -0
- package/src/shade/renderer/shadow/contact/chunk_contact_shadow_wavefront_extents.d.ts +29 -0
- package/src/shade/renderer/shadow/contact/chunk_contact_shadow_wavefront_extents.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/chunk_contact_shadow_wavefront_extents.js +105 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_linear.d.ts +29 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_linear.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_linear.js +39 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_wavefront.d.ts +29 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_wavefront.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_wavefront.js +92 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_linear.d.ts +29 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_linear.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_linear.js +128 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_wavefront.d.ts +52 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_wavefront.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_wavefront.js +358 -0
- package/src/shade/renderer/shadow/map/ShadowDirectionalTechnique.d.ts +10 -0
- package/src/shade/renderer/shadow/map/ShadowDirectionalTechnique.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/ShadowDirectionalTechnique.js +12 -0
- package/src/shade/renderer/shadow/map/shader/SHADOW_DIRECTIONAL_TECHNIQUE.d.ts +13 -0
- package/src/shade/renderer/shadow/map/shader/SHADOW_DIRECTIONAL_TECHNIQUE.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shader/SHADOW_DIRECTIONAL_TECHNIQUE.js +14 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional.d.ts +14 -8
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional.js +20 -86
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.d.ts +14 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.js +79 -0
- package/src/shade/renderer/shadow/ray/shader_ray_shadow_code.d.ts.map +1 -1
- package/src/shade/renderer/shadow/ray/shader_ray_shadow_code.js +12 -12
- package/src/shade/renderer/shadow/ray/staged/gen/shader_generate_rays.d.ts.map +1 -1
- package/src/shade/renderer/shadow/ray/staged/gen/shader_generate_rays.js +153 -151
- package/src/shade/renderer/shadow/vsm/shader/chunk_shadowmap_sample_directional_virtual.d.ts +13 -0
- package/src/shade/renderer/shadow/vsm/shader/chunk_shadowmap_sample_directional_virtual.d.ts.map +1 -0
- package/src/shade/renderer/shadow/vsm/shader/chunk_shadowmap_sample_directional_virtual.js +48 -0
- package/src/shade/renderer/texture/GPUTextureContext.d.ts +10 -0
- package/src/shade/renderer/texture/GPUTextureContext.d.ts.map +1 -1
- package/src/shade/renderer/texture/GPUTextureContext.js +24 -0
- package/src/shade/renderer/texture/atlas/GPUTileAtlas3D.d.ts +219 -0
- package/src/shade/renderer/texture/atlas/GPUTileAtlas3D.d.ts.map +1 -0
- package/src/shade/renderer/texture/atlas/GPUTileAtlas3D.js +671 -0
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts +26 -2
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.js +108 -4
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +5 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +6 -0
- package/src/shade/renderer/volumetrics/NOTES.md +50 -0
- package/src/shade/renderer/volumetrics/PARTICIPATING_MEDIA_VOLUME_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/PARTICIPATING_MEDIA_VOLUME_STRUCT.js +30 -1
- package/src/shade/renderer/volumetrics/ParticipatingMediaVolume.d.ts +51 -13
- package/src/shade/renderer/volumetrics/ParticipatingMediaVolume.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/ParticipatingMediaVolume.js +98 -13
- package/src/shade/renderer/volumetrics/SceneVolumetrics.d.ts +9 -0
- package/src/shade/renderer/volumetrics/SceneVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/SceneVolumetrics.js +78 -68
- package/src/shade/renderer/volumetrics/VOLUMETRIC_NOISE_PLAN_2026_10_15.md +326 -0
- package/src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.d.ts +7 -4
- package/src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.js +21 -9
- package/src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.d.ts +19 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.js +53 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sample_froxel_extinction.d.ts +12 -3
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sample_froxel_extinction.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sample_froxel_extinction.js +85 -48
- package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts +4 -1
- package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.js +4 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts +4 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +21 -1
- package/src/shade/renderer/volumetrics/noise/PARTICIPATING_MEDIA_NOISE.d.ts +98 -0
- package/src/shade/renderer/volumetrics/noise/PARTICIPATING_MEDIA_NOISE.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/PARTICIPATING_MEDIA_NOISE.js +115 -0
- package/src/shade/renderer/volumetrics/noise/VOLUMETRICS_NOISE_TILE_BAKE_SETTINGS_STRUCT.d.ts +9 -0
- package/src/shade/renderer/volumetrics/noise/VOLUMETRICS_NOISE_TILE_BAKE_SETTINGS_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/VOLUMETRICS_NOISE_TILE_BAKE_SETTINGS_STRUCT.js +24 -0
- package/src/shade/renderer/volumetrics/noise/bake_volumetrics_noise_tile.d.ts +27 -0
- package/src/shade/renderer/volumetrics/noise/bake_volumetrics_noise_tile.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/bake_volumetrics_noise_tile.js +91 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise.d.ts +35 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise.js +92 -0
- package/src/shade/renderer/volumetrics/noise/shader_volumetrics_noise_tile_bake.d.ts +10 -0
- package/src/shade/renderer/volumetrics/noise/shader_volumetrics_noise_tile_bake.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/shader_volumetrics_noise_tile_bake.js +121 -0
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.js +38 -3
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_sun_shadow_volume.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_sun_shadow_volume.js +311 -290
- package/src/shade/renderer/volumetrics/volumetrics_position_world_to_froxel_uvw.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/volumetrics_position_world_to_froxel_uvw.js +28 -49
- package/src/shade/renderer/water/GPUWaterRenderer.d.ts +3 -1
- package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
- package/src/shade/renderer/water/GPUWaterRenderer.js +24 -18
- package/src/shade/renderer/water/chunk_water_transport.d.ts +0 -1
- package/src/shade/renderer/water/chunk_water_transport.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_transport.js +0 -17
- package/src/shade/renderer/water/shader_water.d.ts +4 -2
- package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water.js +27 -16
- package/src/shade/renderer/water/shader_water_avboit.d.ts +0 -4
- package/src/shade/renderer/water/shader_water_avboit.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water_avboit.js +0 -63
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +43 -9
- package/src/engine/network/transport/Channel.d.ts +0 -85
- package/src/engine/network/transport/Channel.d.ts.map +0 -1
- package/src/engine/network/transport/ReliableCommandPipeline.d.ts +0 -155
- package/src/engine/network/transport/ReliableCommandPipeline.d.ts.map +0 -1
- package/src/engine/network/transport/fragments/FragmentAssembler.d.ts +0 -105
- package/src/engine/network/transport/fragments/FragmentAssembler.d.ts.map +0 -1
- package/src/engine/network/transport/fragments/FragmentRetention.d.ts +0 -103
- package/src/engine/network/transport/fragments/FragmentRetention.d.ts.map +0 -1
- package/src/engine/network/transport/fragments/fragment_send.d.ts +0 -61
- package/src/engine/network/transport/fragments/fragment_send.d.ts.map +0 -1
- package/src/engine/network/transport/fragments/packet_size.d.ts +0 -99
- package/src/engine/network/transport/fragments/packet_size.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/sRGB/chunk_RRTAndODTFit.d.ts +0 -6
- package/src/shade/renderer/shader/chunk/color/sRGB/chunk_RRTAndODTFit.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/sRGB/chunk_RRTAndODTFit.js +0 -16
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_aces.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_aces.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_aces.js +0 -46
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_agx.d.ts +0 -10
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_agx.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_agx.js +0 -127
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_pbr_neutral.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_pbr_neutral.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_pbr_neutral.js +0 -39
|
@@ -20,6 +20,15 @@ export class SceneVolumetrics {
|
|
|
20
20
|
*/
|
|
21
21
|
volumes: ParticipatingMediaVolume[];
|
|
22
22
|
version: number;
|
|
23
|
+
/**
|
|
24
|
+
* The wind every volume's noise scrolls with, metres a second along the world axes. Each
|
|
25
|
+
* volume feels it through its own `noise_wind_factor` and adds its own velocity; the fold is
|
|
26
|
+
* `ParticipatingMediaSystem`'s, once a frame, and the result is a scroll phase on the volume —
|
|
27
|
+
* this number itself never reaches the GPU.
|
|
28
|
+
*
|
|
29
|
+
* @type {number[]}
|
|
30
|
+
*/
|
|
31
|
+
wind: number[];
|
|
23
32
|
/**
|
|
24
33
|
*
|
|
25
34
|
* @param {ParticipatingMediaVolume} volume
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneVolumetrics.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/SceneVolumetrics.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;GAWG;AACH;IACI;;;OAGG;IACH,SAFU,wBAAwB,EAAE,CAEvB;IAEb,gBAAY;IAEZ;;;OAGG;IACH,YAFW,wBAAwB,QAQlC;IAED;;;;;OAKG;IACH,eAHW,wBAAwB,GACtB,OAAO,CAenB;IAED;;;;;OAKG;IACH,mBAEC;CACJ;
|
|
1
|
+
{"version":3,"file":"SceneVolumetrics.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/SceneVolumetrics.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;GAWG;AACH;IACI;;;OAGG;IACH,SAFU,wBAAwB,EAAE,CAEvB;IAEb,gBAAY;IAEZ;;;;;;;OAOG;IACH,MAFU,MAAM,EAAE,CAED;IAEjB;;;OAGG;IACH,YAFW,wBAAwB,QAQlC;IAED;;;;;OAKG;IACH,eAHW,wBAAwB,GACtB,OAAO,CAenB;IAED;;;;;OAKG;IACH,mBAEC;CACJ;uCA5EY,OAAO,+BAA+B,EAAE,wBAAwB"}
|
|
@@ -1,68 +1,78 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {import("./ParticipatingMediaVolume.js").ParticipatingMediaVolume} ParticipatingMediaVolume
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Every participating medium in a scene, and a counter saying whether the GPU's copy is stale.
|
|
7
|
-
*
|
|
8
|
-
* **The version is the whole synchronisation protocol.** {@link GPUSceneVolumetrics} repacks the
|
|
9
|
-
* entire table whenever the number moves and does nothing at all when it does not, so a volume
|
|
10
|
-
* changed without moving the counter renders with the values it was last uploaded with — the CPU
|
|
11
|
-
* object holds the new density, reads back correctly, and only the picture is stale. Anything that
|
|
12
|
-
* writes into a volume in place therefore has to say so; see {@link invalidate}.
|
|
13
|
-
*
|
|
14
|
-
* **Volumes are packed by array index**, so removing one renumbers the rest. That is free here
|
|
15
|
-
* because the upload is all-or-nothing, and it is the reason no volume carries a slot number.
|
|
16
|
-
*/
|
|
17
|
-
export class SceneVolumetrics {
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {ParticipatingMediaVolume[]}
|
|
21
|
-
*/
|
|
22
|
-
volumes = [];
|
|
23
|
-
|
|
24
|
-
version = 0;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import("./ParticipatingMediaVolume.js").ParticipatingMediaVolume} ParticipatingMediaVolume
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Every participating medium in a scene, and a counter saying whether the GPU's copy is stale.
|
|
7
|
+
*
|
|
8
|
+
* **The version is the whole synchronisation protocol.** {@link GPUSceneVolumetrics} repacks the
|
|
9
|
+
* entire table whenever the number moves and does nothing at all when it does not, so a volume
|
|
10
|
+
* changed without moving the counter renders with the values it was last uploaded with — the CPU
|
|
11
|
+
* object holds the new density, reads back correctly, and only the picture is stale. Anything that
|
|
12
|
+
* writes into a volume in place therefore has to say so; see {@link invalidate}.
|
|
13
|
+
*
|
|
14
|
+
* **Volumes are packed by array index**, so removing one renumbers the rest. That is free here
|
|
15
|
+
* because the upload is all-or-nothing, and it is the reason no volume carries a slot number.
|
|
16
|
+
*/
|
|
17
|
+
export class SceneVolumetrics {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {ParticipatingMediaVolume[]}
|
|
21
|
+
*/
|
|
22
|
+
volumes = [];
|
|
23
|
+
|
|
24
|
+
version = 0;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The wind every volume's noise scrolls with, metres a second along the world axes. Each
|
|
28
|
+
* volume feels it through its own `noise_wind_factor` and adds its own velocity; the fold is
|
|
29
|
+
* `ParticipatingMediaSystem`'s, once a frame, and the result is a scroll phase on the volume —
|
|
30
|
+
* this number itself never reaches the GPU.
|
|
31
|
+
*
|
|
32
|
+
* @type {number[]}
|
|
33
|
+
*/
|
|
34
|
+
wind = [0, 0, 0];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param {ParticipatingMediaVolume} volume
|
|
39
|
+
*/
|
|
40
|
+
add(volume) {
|
|
41
|
+
|
|
42
|
+
this.volumes.push(volume);
|
|
43
|
+
|
|
44
|
+
this.version++;
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Take a volume back out.
|
|
50
|
+
*
|
|
51
|
+
* @param {ParticipatingMediaVolume} volume
|
|
52
|
+
* @returns {boolean} true if it was there to be removed
|
|
53
|
+
*/
|
|
54
|
+
remove(volume) {
|
|
55
|
+
|
|
56
|
+
const index = this.volumes.indexOf(volume);
|
|
57
|
+
|
|
58
|
+
if (index === -1) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
this.volumes.splice(index, 1);
|
|
63
|
+
|
|
64
|
+
this.version++;
|
|
65
|
+
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Say that a volume already in the scene has been written into.
|
|
71
|
+
*
|
|
72
|
+
* Adding and removing move the version by themselves; changing a volume in place is invisible
|
|
73
|
+
* from here, and this is how such a change reaches the GPU.
|
|
74
|
+
*/
|
|
75
|
+
invalidate() {
|
|
76
|
+
this.version++;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# Noise for participating-media volumes — design brief, 2026-10-15
|
|
2
|
+
|
|
3
|
+
Status: **revision (c), built.** Written against the tree at 59861de99; the implementation is what
|
|
4
|
+
the tree beside this file holds, and `NOTES.md` (2026-10-15) has the device numbers. Revisions (a)
|
|
5
|
+
and (b) proposed a procedural field and then a texture with a stack of phases; Alex's answers
|
|
6
|
+
(§6) settled on one static texture per slot in a general 3-D tile atlas, evolution by scrolling and
|
|
7
|
+
a domain warp, no stacks, no clock. §4 and §5 describe what was built; §7 is what was left open.
|
|
8
|
+
|
|
9
|
+
The ask: noise-modulated density on `ParticipatingMedia` volumes with a simple API and a cost that
|
|
10
|
+
stays flat. The starting concept was a fixed number of octaves of 4-D noise, sampled in world
|
|
11
|
+
space, with a per-volume scale and temporal rate, a per-volume lerp between uniform and noisy so one
|
|
12
|
+
shader path serves both, and a global wind vector.
|
|
13
|
+
|
|
14
|
+
## 1. What the tree had
|
|
15
|
+
|
|
16
|
+
Facts, read from the sources, each of which shaped the design.
|
|
17
|
+
|
|
18
|
+
**The volume model is a unit box posed by a matrix, carrying `density`, a particle spec, and an
|
|
19
|
+
edge fade.** `PARTICIPATING_MEDIA_VOLUME_STRUCT` was `particle_spec`, `transform`,
|
|
20
|
+
`transform_inverse`, `fade_distance`, `density` — a row in the scene database, rows packed from 0
|
|
21
|
+
and rewritten whole whenever `SceneVolumetrics.version` moves. The renderer-side
|
|
22
|
+
`ParticipatingMediaVolume` carried six dead stub fields (`noise_scale/amplitude/offset/velocity/
|
|
23
|
+
evolution_speed`, `time`) from an older version of this very concept; nothing read them. Deleted.
|
|
24
|
+
|
|
25
|
+
**The froxel density pass had no sample point.** `shader_volumetrics_build_participating_media`
|
|
26
|
+
runs a 16×16 workgroup per z-slice over `ceil(w/16) × ceil(h/16) × 64` froxels — 120×68×64 =
|
|
27
|
+
522,240 at 1080p, 2,073,600 at 2160p. Per froxel it builds the slab's world frustum (the z edges
|
|
28
|
+
carry the per-column jitter), then for every volume row: reject on `aabb3_intersects_frustum`,
|
|
29
|
+
estimate `frustum_unit_box_coverage` (8 three-plane intersections), evaluate the edge fade at the
|
|
30
|
+
midpoint of the centre ray's intersection with the box, and accumulate `density × coverage × fade`.
|
|
31
|
+
The density was a slab average, never a value at a point. Adding noise meant choosing a point, and
|
|
32
|
+
the rule from 2026-10-09 applies — a froxel's value is evaluated at a per-frame jittered point,
|
|
33
|
+
never a fixed lattice, or a large particle reading the volume shows the lattice as seams.
|
|
34
|
+
|
|
35
|
+
**The lighting pass reads the density textures at a jittered point and the TAA integrates it.**
|
|
36
|
+
STBN at the `(37, 71)` decorrelation offset, the 3-D TAA at 0.95, about 39 effective frames,
|
|
37
|
+
reprojected by camera motion only. A density field that moves in world space is averaged over the
|
|
38
|
+
window, not reprojected.
|
|
39
|
+
|
|
40
|
+
**Nothing downstream re-evaluates the volumes.** The sun's optical-depth cascades and the
|
|
41
|
+
local-light march both read `tParticipatingMedia1`, the froxel extinction texture. Noise costs once,
|
|
42
|
+
in the density pass, never per shadow step.
|
|
43
|
+
|
|
44
|
+
**The path tracer evaluates the volumes analytically and needs a majorant.**
|
|
45
|
+
`participating_media_volume_density_at(volume, p)` is bounded above by `density`, and
|
|
46
|
+
`chunk_medium_volumes`'s piece majorant is `Σ density × extinction`. The noise had to be a factor
|
|
47
|
+
in [0, 1], applied inside that one function, or the null-collision estimator goes biased.
|
|
48
|
+
|
|
49
|
+
**psrdnoise was in the tree with a GPU consumer already.** `chunk_psrdnoise3(x, period, alpha)`
|
|
50
|
+
tiles at any integer period up to 289 on each axis. That property is what makes the bake exact:
|
|
51
|
+
each octave gets an integer period across the tile, so each tiles on its own.
|
|
52
|
+
|
|
53
|
+
**There was a 3-D slot atlas, a slot allocator, and a texture that resizes with its contents.**
|
|
54
|
+
`GPUGeometrySDFManager` packs 50³ SDF slots into one 3-D texture and grows; `PageSlotAllocator` is
|
|
55
|
+
an O(1) free list; `GPUTextureContext.resize(…, true)` copies the old extent across. None was a
|
|
56
|
+
general tile atlas. The 2-D terrain atlas is a rect packer for arbitrary patches, a different thing.
|
|
57
|
+
Brixelizer carries its own 8³ brick SDF atlas (the FFX port) and was left alone, as asked.
|
|
58
|
+
|
|
59
|
+
**WebGPU has no bindless and no compressed 3-D textures.** A per-volume texture is an atlas or
|
|
60
|
+
nothing, and the atlas is `r8unorm`: BC4 is 2-D only there. And no `r8unorm` storage texture in
|
|
61
|
+
core WebGPU, which is why the bake writes a byte block into a storage buffer and copies it in.
|
|
62
|
+
|
|
63
|
+
**Froxels are long in z.** On the 64-slice log curve a slab is ≈16% of its depth (≈8 m at 50 m,
|
|
64
|
+
≈79 m at 500 m); a 16-px tile at 1080p is ≈1.4% of depth across. Features finer than the slab are
|
|
65
|
+
averaged by the jitter and the TAA into a lower-contrast mean, so distant fog goes uniform on its own.
|
|
66
|
+
|
|
67
|
+
## 2. What the field ships
|
|
68
|
+
|
|
69
|
+
Tagged **VERIFIED** where the slides or source were read, **SECONDARY** where only documentation
|
|
70
|
+
or a search summary was, **NOT RE-READ** where the material exists but was not opened.
|
|
71
|
+
|
|
72
|
+
**Smolder — IO Interactive, 007 First Light, SIGGRAPH 2026 Advances (VERIFIED, slides + notes).**
|
|
73
|
+
Not a noise system: a per-pixel raymarcher over baked animated density (OpenVDB frames in a custom
|
|
74
|
+
sparse brick format, 4³ bricks stored 5³, 4 bits a voxel), 4-moment volumetric shadows on async
|
|
75
|
+
compute, segment-based overlap culling (4 volumes), an adaptive lighting rate. No temporal
|
|
76
|
+
filtering inside, blue noise per pixel, FSR's reactive mask. The density lookup "was only a small
|
|
77
|
+
fraction" of the per-sample cost; and the one thing they refused was a fallback that makes artists
|
|
78
|
+
"author content twice". 450 volumes shipped. Slides:
|
|
79
|
+
`advances.realtimerendering.com/s2026/content/AlexanderMueller_Smolder_Siggraph26.pdf`.
|
|
80
|
+
|
|
81
|
+
**Enshrouded — Keen Games, GPC 2025 "The fog is lifting" (VERIFIED, slides).** A froxel volume
|
|
82
|
+
(160×90×64, to 10 km, temporally accumulated on the populate pass only) for atmosphere, weather and
|
|
83
|
+
VFX-injected box volumes — `densityTexture, uvOffset, uvScale, density, falloff, …` — and a
|
|
84
|
+
half-resolution ray march for the dense shroud over a world voxel volume (16³ tiles with a
|
|
85
|
+
"half voxel border on each side for seamless trilinear filtering"). **Detail noise is baked**:
|
|
86
|
+
Nubis-Cubed "Curly-Alligator" and "Alligator" types, "tileable, 128x128x128 four channels
|
|
87
|
+
uncompressed", eroding density at ray-march samples. Slides on
|
|
88
|
+
`static.graphicsprogrammingconference.com/public/2025/talks/the-fog-is-lifting-volumetric-rendering-enshrouded/`.
|
|
89
|
+
The GPC 2024 talk (Lukas Feller, linked at the top of `NOTES.md`) is video only.
|
|
90
|
+
|
|
91
|
+
**Assassin's Creed 4 — Wronski, SIGGRAPH 2014 (VERIFIED).** "Just one octave of Perlin noise that
|
|
92
|
+
is animated by wind. We tried using multiple octaves, but in the end difference was rather subtle
|
|
93
|
+
for added cost." Density and lighting 0.43 ms on PS4 at 160×90×64.
|
|
94
|
+
|
|
95
|
+
**Bevy `scrolling_fog` (VERIFIED, source).** A repeating 3-D noise texture, a
|
|
96
|
+
`density_texture_offset` the app advances on the CPU by `velocity × dt`, jitter under TAA.
|
|
97
|
+
|
|
98
|
+
**Godot 4 FogMaterial (SECONDARY).** A static 3-D `density_texture` in clamped local box space,
|
|
99
|
+
height falloff, edge fade; animation needs a custom shader. **Unity HDRP (SECONDARY):** 3-D mask
|
|
100
|
+
texture, scroll speed and tiling per axis. **Unreal 5.4 (VERIFIED, local source):** local fog
|
|
101
|
+
volumes are analytic (radial + exponential height, no noise); froxel fog density comes from
|
|
102
|
+
Volume-domain materials evaluated per froxel at a jittered slice depth. **Frostbite 2015, RDR2
|
|
103
|
+
2019, Nubis Cubed 2023 (NOT RE-READ):** PPTX only, or cited through Enshrouded.
|
|
104
|
+
|
|
105
|
+
**The pattern.** Froxel fog ships one or two octaves of 3-D noise scrolled by wind, or a baked
|
|
106
|
+
tileable 3-D texture eroding a density; hero effects are baked animated voxels. The 3-D texture is
|
|
107
|
+
the universal artist hook, and 128³ is the size the two most recent references use.
|
|
108
|
+
|
|
109
|
+
## 3. What it costs
|
|
110
|
+
|
|
111
|
+
Per (froxel, volume) the noise is two trilinear `r8unorm` taps into an atlas of a few MiB (one tap
|
|
112
|
+
when `noise_warp == 0`) plus ~25 scalar ops of coordinate arithmetic, against the ~300 ops the
|
|
113
|
+
coverage estimator already spends per volume in the same loop. Paid only inside `aabb_intersects`;
|
|
114
|
+
a froxel with no volume pays nothing, and a volume at `noise_strength == 0` branches around it
|
|
115
|
+
uniformly, so a scene with no noisy volume costs what it did before. The device numbers, taken by
|
|
116
|
+
the paired protocol in `volumetrics_froxel/measure.js` at 2160p, are in `NOTES.md` (2026-10-15).
|
|
117
|
+
|
|
118
|
+
## 4. The concept, item by item, as built
|
|
119
|
+
|
|
120
|
+
**Fixed number of octaves — 3, baked into the default tile.** Lacunarity 2, gain 0.5, three
|
|
121
|
+
octaves of `psrdnoise3` at integer periods 4, 8 and 16 lattice units across the content, each
|
|
122
|
+
offset by a constant times its index so the doubled lattices do not sit on the base one's corners.
|
|
123
|
+
The finest octave is 8 texels a wavelength in a 128³ tile. At runtime the octave count is not a
|
|
124
|
+
parameter: it is whatever the texture holds, and a user tile may hold one or ten at the same cost.
|
|
125
|
+
|
|
126
|
+
**4-D noise — dropped (F1), on Alex's call.** "3-D preserves mass/volume better perceptually; 4-D
|
|
127
|
+
is great for variation but with discrete samples not worth it, blurrier borders for little benefit
|
|
128
|
+
and 2x taps." No phase stack either, for memory. The evolution is **scroll plus a domain warp**: a
|
|
129
|
+
second tap of the same tile at half frequency and its own, slower scroll displaces the base lookup
|
|
130
|
+
along a fixed oblique direction by `noise_warp` tile units times how far the warp value sits from
|
|
131
|
+
its mean. As the two scrolls slide against each other (ratio 0.37) the base field changes shape in
|
|
132
|
+
place. `noise_warp == 0` is one tap and a field that only slides.
|
|
133
|
+
|
|
134
|
+
**Time tick / supplied time — no clock at all.** The scroll is a **phase on the volume**, two
|
|
135
|
+
`[0, 1)³` offsets (`noise_offset`, `noise_warp_offset`) advanced once a frame by
|
|
136
|
+
`participating_media_volume_advance_noise(volume, velocity, dt)` in f64 and wrapped there — a
|
|
137
|
+
running sum, so a change of wind never jumps the field and a session running for days never grows
|
|
138
|
+
a number. `ParticipatingMediaSystem.update(dt)` is the caller for an ECS scene; a playground calls
|
|
139
|
+
it from its loop. Not called, the field stands still, which is what an accumulating reference
|
|
140
|
+
wants. The GPU never multiplies a velocity by a time.
|
|
141
|
+
|
|
142
|
+
**Temporal scale per volume — became `noise_warp`.** A rate had no meaning without a 4th
|
|
143
|
+
dimension; the warp amount is the knob that sets how much the field changes shape as it moves.
|
|
144
|
+
|
|
145
|
+
**World-space sampling — kept, with repeat.** The tile repeats every `noise_scale` metres along
|
|
146
|
+
each world axis; `fract` folds the world position onto the tile. Neighbouring volumes with the same
|
|
147
|
+
settings share one continuous field, and a volume carried by a moving entity has the world's fog
|
|
148
|
+
flow through it. User tiles must tile seamlessly; the engine's does by construction.
|
|
149
|
+
|
|
150
|
+
**Noise scale per volume — one scalar, metres per tile repeat.** `noise_scale`, default 32 m,
|
|
151
|
+
which with the default tile's four base features puts them 8 m apart and the finest octave at 2 m.
|
|
152
|
+
|
|
153
|
+
**Lerp between noisy and uniform — `noise_strength ∈ [0, 1]`, blending to the texture's [0, 1]
|
|
154
|
+
value.** `density(p) = density × fade(p) × mix(1, tile(p), strength)`. Bounded by `density`, so the
|
|
155
|
+
tracer's majorant, the ray spans and the froxel coverage arithmetic are untouched. The remap that
|
|
156
|
+
shapes the wisps — `smoothstep(−0.6, 0.6, fBm)`, psrdnoise's fBm sits in about ±0.7 — is baked, so
|
|
157
|
+
the texture *is* the multiplier and a user tile is one too, with nothing more to say.
|
|
158
|
+
|
|
159
|
+
**Uniform path.** `noise_strength == 0` branches around the taps inside the volume loop: a property
|
|
160
|
+
of the volume, identical for every thread, so a uniform branch and not a variant.
|
|
161
|
+
|
|
162
|
+
**Global wind — `SceneVolumetrics.wind`, felt per medium.** Per Alex's F7: effective velocity
|
|
163
|
+
`= wind × noise_wind_factor + noise_velocity`, two explicit fields on the component, folded by the
|
|
164
|
+
system into the phase. The row carries phases only.
|
|
165
|
+
|
|
166
|
+
**Where the froxel pass evaluates it.** Once per froxel, before the volume loop, a world point
|
|
167
|
+
inside the slab at an STBN jitter with a **third** decorrelation offset `(53, 97)` — the aerial pass
|
|
168
|
+
owns zero and the lighting pass `(37, 71)`, and two passes drawing the same number lock their
|
|
169
|
+
nuisance variables together, which biases the estimate and no TAA window recovers it. Per volume
|
|
170
|
+
inside `aabb_intersects`, the multiplier at that point scales the slab's weight. The slab's z jitter
|
|
171
|
+
is already per frame, so the point moves on all three axes.
|
|
172
|
+
|
|
173
|
+
**Band limiting — none (F2).** No mips (a one-texel skirt is wrong from level 1 down, and the
|
|
174
|
+
tracer samples one level anyway), no octave skipping; the texture is band-limited at its texel and
|
|
175
|
+
the jitter plus the TAA average the froxel.
|
|
176
|
+
|
|
177
|
+
**What the path tracer gets.** The same `participating_media_volume_density_at`, which now needs
|
|
178
|
+
`tParticipatingMediaNoise` and `sParticipatingMediaNoise` bound by every shader that imports it:
|
|
179
|
+
the accumulating tracer, `graph_path_trace_scene`, the Brick4 probe bake, both lightmap viz bakes
|
|
180
|
+
and the deprecated LPV trace all declare and bind them.
|
|
181
|
+
|
|
182
|
+
**The TAA envelope — a stated limit.** At 0.95 the history spans ≈39 frames, 0.65 s at 60 Hz; a
|
|
183
|
+
feature scrolls `|v| × 0.65 s` inside that window. Wind at a few m/s on 8 m features is fine; 10 m/s
|
|
184
|
+
on 2 m features is mush, and a history reprojected by the scroll is a separate piece of work.
|
|
185
|
+
|
|
186
|
+
## 5. The design, in one place
|
|
187
|
+
|
|
188
|
+
### 5.1 `GPUTileAtlas3D` — general, one instance for the volumetrics
|
|
189
|
+
|
|
190
|
+
`shade/renderer/texture/atlas/GPUTileAtlas3D.js`. One 3-D `GPUTextureContext` of one format, cut
|
|
191
|
+
into tiles of `content_size + 2·border` texels, slots linear (x fastest, z slowest), handed out by
|
|
192
|
+
a free list that reuses the most recently freed slot first.
|
|
193
|
+
|
|
194
|
+
- `new GPUTileAtlas3D({ device, format, content_size, border, slots_x, slots_y, capacity, usage, label })`,
|
|
195
|
+
every argument required. `slots_x`/`slots_y` are the starting footprint; `capacity` is rounded
|
|
196
|
+
up to whole z layers of it. `usage` is how the clients bind the texture (`TEXTURE_BINDING`,
|
|
197
|
+
`STORAGE_BINDING`); the atlas adds the `COPY_DST | COPY_SRC` its writes and grows need (added
|
|
198
|
+
2026-10-16 for the SDF manager, whose build stores into its tiles).
|
|
199
|
+
- `allocate()` returns a slot and, when none is free, **grows the texture by a layer**, copying the
|
|
200
|
+
old extent across (`resize(…, true)`; x and y do not change, so every tile keeps its origin).
|
|
201
|
+
**Once z is at `maxTextureDimension3D` it widens instead** (2026-10-16, Alex's design): the
|
|
202
|
+
smaller of x and y doubles (x on a tie, capped at the device), the layers halve (+1 for the slot
|
|
203
|
+
being allocated), and every tile handed out is copied — in runs along x, a whole old row per
|
|
204
|
+
copy when a side doubles — to where its slot sits under the new footprint, through
|
|
205
|
+
`GPUTextureContext.replace`. A slot keeps its index and texels; its origin moves. Rare and as
|
|
206
|
+
costly as a full copy. The ceiling is `capacity_limit`, the device's limit in tiles cubed; past
|
|
207
|
+
it, `allocate` throws with the numbers. `free(slot)`, `is_live(slot)`, `live_count`.
|
|
208
|
+
- `write(slot, content)` takes `content_size³` texels and builds the skirt on the host
|
|
209
|
+
(`tile_atlas_bordered_block`, pure and exported: the skirt is the content wrapped) in one
|
|
210
|
+
`writeTexture`. `copy_from_buffer(encoder, slot, buffer, offset, bytes_per_row)` lands a whole
|
|
211
|
+
bordered tile a device producer wrote, rows padded to the copy alignment.
|
|
212
|
+
- `slot_origin(slot, out)` is the same arithmetic in JS and WGSL.
|
|
213
|
+
- A grow replaces the `GPUTexture` and a widen moves every tile; take a view, the footprint or an
|
|
214
|
+
origin after allocating, never across an `allocate`. The frame graph imports the texture per
|
|
215
|
+
frame and the noise shader takes the footprint from `textureDimensions`, so the passes are fine
|
|
216
|
+
by construction.
|
|
217
|
+
|
|
218
|
+
The volumetrics instance (`PARTICIPATING_MEDIA_NOISE.js`): `r8unorm`, content 128, border 1
|
|
219
|
+
(tile 130), footprint 2×1, capacity 2 — the engine's tile and one spare, 4.4 MB — growing by 2
|
|
220
|
+
slots (4.4 MB) a layer to 30 on a 2048-limit device, then widening. Per scene, on `GPUSceneVolumetrics.noise_atlas`:
|
|
221
|
+
a volume names its tile by slot and the volumes are the scene's.
|
|
222
|
+
|
|
223
|
+
`GPUGeometrySDFManager` is the second instance (G4, 2026-10-16): `r32float`, content 50, border 0
|
|
224
|
+
(every reader loads inside its tile and clamps the far tap to the last texel, and a wrapped skirt
|
|
225
|
+
would be wrong for a distance field anyway), starting footprint 4×4 — the 16 slots it started with,
|
|
226
|
+
and its smallest growth step — to 40 layers (640 slots, 320 MB) on a 2048-limit device, then
|
|
227
|
+
widening to 8×4×21 and on. A slot is its geometry's id, so it claims slots in order and frees none.
|
|
228
|
+
Brixelizer's atlas is not migrated.
|
|
229
|
+
|
|
230
|
+
### 5.2 The engine's default tile — slot 0, baked on first update
|
|
231
|
+
|
|
232
|
+
`shader_volumetrics_noise_tile_bake` + `bake_volumetrics_noise_tile`: a compute dispatch over the
|
|
233
|
+
whole 130³ tile — skirt included, by wrapping the texel index, the same rule the host applies — into
|
|
234
|
+
a transient storage buffer of 256-byte rows, four `r8unorm` texels a word, then
|
|
235
|
+
`copyBufferToTexture` into the slot, in one command stream. Three octaves at periods 4/8/16,
|
|
236
|
+
`features` 4, remap baked. Runs once, from `GPUSceneVolumetrics.update` the first time it is
|
|
237
|
+
called (a bake needs a command stream and the constructor has none). Deterministic, so the
|
|
238
|
+
emulator bakes small tiles in `shader_volumetrics_noise_tile_bake.spec.js`.
|
|
239
|
+
|
|
240
|
+
### 5.3 The API
|
|
241
|
+
|
|
242
|
+
ECS, flat on `ParticipatingMedia`:
|
|
243
|
+
|
|
244
|
+
noise_strength = 0 // [0, 1]; 0 = uniform, nothing evaluated
|
|
245
|
+
noise_scale = 32 // metres per tile repeat (default tile: 8 m base features)
|
|
246
|
+
noise_warp = 0.1 // tile units the warp may displace by; 0 = one tap, slide only
|
|
247
|
+
noise_velocity = [0,0,0] // m/s, the medium's own motion, added to the wind
|
|
248
|
+
noise_wind_factor = 1 // how much of the scene wind it feels
|
|
249
|
+
noise_texture = 0 // atlas slot; 0 = the engine's
|
|
250
|
+
|
|
251
|
+
Scene: `SceneVolumetrics.wind` (m/s). Tiles: `GPUSceneVolumetrics.noise_atlas` —
|
|
252
|
+
`allocate()`, `write(slot, Uint8Array(128³))`, `free(slot)`.
|
|
253
|
+
|
|
254
|
+
Renderer-side `ParticipatingMediaVolume`: `noise_strength`, `noise_scale`, `noise_warp`,
|
|
255
|
+
`noise_slot`, and the phase state `noise_offset`, `noise_warp_offset`, advanced by
|
|
256
|
+
`participating_media_volume_advance_noise(volume, velocity_m_s, dt_s)`, which returns whether
|
|
257
|
+
anything moved.
|
|
258
|
+
|
|
259
|
+
GPU row, appended to `PARTICIPATING_MEDIA_VOLUME_STRUCT`: `noise_offset: vec3f`,
|
|
260
|
+
`noise_warp_offset: vec3f`, `noise_slot: u32`, `noise_strength: f32`, `noise_inverse_scale: f32`,
|
|
261
|
+
`noise_warp: f32`. Packed by `GPUSceneVolumetrics` whenever the version moves — which, while any
|
|
262
|
+
volume's phase moves, is every frame (tens of rows).
|
|
263
|
+
|
|
264
|
+
Serialization: `ParticipatingMediaSerializationAdapter` version 1 (eighteen doubles),
|
|
265
|
+
`ParticipatingMediaSerializationUpgrader_0_1` fills a version-0 save with the defaults.
|
|
266
|
+
|
|
267
|
+
### 5.4 The shader
|
|
268
|
+
|
|
269
|
+
`chunk_participating_media_noise`, bound as `tParticipatingMediaNoise` (`texture_3d<f32>`) with
|
|
270
|
+
`sParticipatingMediaNoise` (linear, clamped — the wrap is the skirt's and `fract`'s, never the
|
|
271
|
+
sampler's, which would wrap the whole atlas):
|
|
272
|
+
|
|
273
|
+
tap(slot, u): cell = (slot mod sx, (slot / sx) mod sy, slot / (sx·sy)), sx/sy from textureDimensions
|
|
274
|
+
texel = cell·130 + 1 + fract(u)·128; sample at texel / atlas_size
|
|
275
|
+
multiplier(volume, p):
|
|
276
|
+
base = p · noise_inverse_scale; u = base + noise_offset
|
|
277
|
+
if noise_warp > 0: w = tap(slot, base·0.5 + noise_warp_offset)
|
|
278
|
+
u += (w − 0.5) · noise_warp · (0.6, 0.48, −0.64)
|
|
279
|
+
return mix(1, tap(slot, u), noise_strength)
|
|
280
|
+
|
|
281
|
+
`participating_media_volume_density_at` multiplies it in under `if (noise_strength > 0)`.
|
|
282
|
+
|
|
283
|
+
### 5.5 Specs
|
|
284
|
+
|
|
285
|
+
`GPUTileAtlas3D.spec.js` (slots, placement, skirt, growth with tiles preserved — read back off the
|
|
286
|
+
software device — the limit, formats); `shader_volumetrics_noise_tile_bake.spec.js` (emulator: skirt
|
|
287
|
+
= content wrapped, range, periodicity of the field across the content, padding words untouched,
|
|
288
|
+
octaves and features, determinism, the octave ceiling, WGSL validity);
|
|
289
|
+
`chunk_participating_media_noise.spec.js` (emulator, hand-built atlas: texel centres, wrap, the
|
|
290
|
+
skirt blend and never the next slot, strength, scale, scroll, the warp's displacement in closed
|
|
291
|
+
form, the density function bounded); `ParticipatingMediaVolume.spec.js` (the advance: units,
|
|
292
|
+
wrap, continuity, a week of frames); `GPUSceneVolumetrics.spec.js` and
|
|
293
|
+
`GPUViewVolumetrics.passes.spec.js` (unchanged, now encoding the atlas); the ECS `*.noise.spec.js`
|
|
294
|
+
trio (component JSON/equality, adapter round trip and the 0→1 upgrade, the system's fold and
|
|
295
|
+
per-frame invalidation).
|
|
296
|
+
|
|
297
|
+
## 6. The forks, as answered
|
|
298
|
+
|
|
299
|
+
Revision (a): **F1** flow noise — yes in principle, then ditched with the texture pivot (§4).
|
|
300
|
+
**F2** octave band-limiting — "with textures insignificant", dropped. **F3** [0, 1] multiplier —
|
|
301
|
+
"absolutely". **F4** CPU-side wrapped phase — fine, "a mod on the CPU". **F5** scalar scale — fine.
|
|
302
|
+
**F6** delete the stubs — yes. **F7** per-volume velocity additive plus a multiplier on the wind —
|
|
303
|
+
yes: `noise_velocity`, `noise_wind_factor`.
|
|
304
|
+
|
|
305
|
+
Revision (b): **G1** no stacks — "one static texture, temporal variation via domain warping and
|
|
306
|
+
scrolling"; built as scroll + warp. **G2** 128³ — yes. **G3** general atlas from day one — yes.
|
|
307
|
+
**G4** migrating the SDF manager — a follow-up; Brixelizer left alone or promoted out of its FFX
|
|
308
|
+
naming, not built on. **G5** world-space repeat only — yes. **G6** automatic growth — "house style";
|
|
309
|
+
16 slots was fine, 2 was chosen as the first layer since a layer is 4.4 MB and growth is automatic.
|
|
310
|
+
**G7** `r8unorm` — yes.
|
|
311
|
+
|
|
312
|
+
## 7. Open, by measurement or by later ask
|
|
313
|
+
|
|
314
|
+
- The repeat distance is `noise_scale`; at 32 m on a wide bank seen from above it may read as a
|
|
315
|
+
lattice. The fix, if it shows, is a user tile with more features or a larger scale — no code.
|
|
316
|
+
- A per-volume `contrast`, a local clamped sampling mode (a texture that *is* the shape), exponential
|
|
317
|
+
height falloff, and history reprojected by the scroll: each a one-field or one-pass addition the
|
|
318
|
+
layout leaves room for, none asked for.
|
|
319
|
+
- The froxel-versus-tracer parity check for a noisy volume was not run on the device this pass;
|
|
320
|
+
both paths read one function and the chunk spec pins the function.
|
|
321
|
+
|
|
322
|
+
## 8. Not verified this pass
|
|
323
|
+
|
|
324
|
+
RDR2's and Frostbite's fog-density slides (PPTX only). Nubis Cubed's noise authoring (cited
|
|
325
|
+
through Enshrouded). The GPC 2024 Enshrouded talk (video only). The contrast dip of a phase
|
|
326
|
+
crossfade, which the no-stacks decision made moot.
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
* through, where the froxel volumetrics discretize.
|
|
4
4
|
*
|
|
5
5
|
* - `participating_media_volume_density_at` is the volume's particle density at a world position:
|
|
6
|
-
* `density` times its edge fade, zero outside its box. The fade is the per-axis
|
|
7
|
-
* `fade_distance` (in world units, unaffected by scale) that
|
|
8
|
-
* at a froxel's midpoint; here it is the field itself.
|
|
9
|
-
*
|
|
6
|
+
* `density` times its edge fade times its noise, zero outside its box. The fade is the per-axis
|
|
7
|
+
* smoothstep over `fade_distance` (in world units, unaffected by scale) that
|
|
8
|
+
* `compute_volume_fade_factor` evaluates at a froxel's midpoint; here it is the field itself. The
|
|
9
|
+
* noise is `chunk_participating_media_noise`'s [0, 1] multiplier from the volumetrics noise
|
|
10
|
+
* atlas, which an importing shader therefore binds as `tParticipatingMediaNoise` with
|
|
11
|
+
* `sParticipatingMediaNoise`. Bounded above by `density`, so `density * extinction` majorizes
|
|
12
|
+
* the volume anywhere in it.
|
|
10
13
|
* - `participating_media_volume_span` is where a ray is inside the box, as distances along it,
|
|
11
14
|
* clipped to `[0, t_max]`; empty (`y <= x`) when it misses. The direction need not be unit
|
|
12
15
|
* length, and the distances are in its units: the local direction is not renormalized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_participating_media_volume_sample.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_participating_media_volume_sample.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,sDAFU,SAAS,CAwDjB;0BA/EwB,iCAAiC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { chunk_aabb3_slab_span } from "../shader/chunk/geometry/aabb3/chunk_aabb3_slab_span.js";
|
|
2
2
|
import { chunk_mat4_extract_scale } from "../shader/chunk/geometry/mat4/chunk_mat4_extract_scale.js";
|
|
3
3
|
import { CodeChunk } from "../shader/compiler/CodeChunk.js";
|
|
4
|
+
import { chunk_participating_media_noise } from "./noise/chunk_participating_media_noise.js";
|
|
4
5
|
import { PARTICIPATING_MEDIA_VOLUME_STRUCT } from "./PARTICIPATING_MEDIA_VOLUME_STRUCT.js";
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -8,10 +9,13 @@ import { PARTICIPATING_MEDIA_VOLUME_STRUCT } from "./PARTICIPATING_MEDIA_VOLUME_
|
|
|
8
9
|
* through, where the froxel volumetrics discretize.
|
|
9
10
|
*
|
|
10
11
|
* - `participating_media_volume_density_at` is the volume's particle density at a world position:
|
|
11
|
-
* `density` times its edge fade, zero outside its box. The fade is the per-axis
|
|
12
|
-
* `fade_distance` (in world units, unaffected by scale) that
|
|
13
|
-
* at a froxel's midpoint; here it is the field itself.
|
|
14
|
-
*
|
|
12
|
+
* `density` times its edge fade times its noise, zero outside its box. The fade is the per-axis
|
|
13
|
+
* smoothstep over `fade_distance` (in world units, unaffected by scale) that
|
|
14
|
+
* `compute_volume_fade_factor` evaluates at a froxel's midpoint; here it is the field itself. The
|
|
15
|
+
* noise is `chunk_participating_media_noise`'s [0, 1] multiplier from the volumetrics noise
|
|
16
|
+
* atlas, which an importing shader therefore binds as `tParticipatingMediaNoise` with
|
|
17
|
+
* `sParticipatingMediaNoise`. Bounded above by `density`, so `density * extinction` majorizes
|
|
18
|
+
* the volume anywhere in it.
|
|
15
19
|
* - `participating_media_volume_span` is where a ray is inside the box, as distances along it,
|
|
16
20
|
* clipped to `[0, t_max]`; empty (`y <= x`) when it misses. The direction need not be unit
|
|
17
21
|
* length, and the distances are in its units: the local direction is not renormalized.
|
|
@@ -32,14 +36,21 @@ fn participating_media_volume_density_at(volume: ${PARTICIPATING_MEDIA_VOLUME_ST
|
|
|
32
36
|
return 0.0;
|
|
33
37
|
}
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
var density = volume.density;
|
|
40
|
+
|
|
41
|
+
if (volume.fade_distance > 0.001) {
|
|
42
|
+
let to_edge_world = to_edge_local * mat4_extract_scale(volume.transform);
|
|
43
|
+
let fade = smoothstep(vec3<f32>(0.0), vec3<f32>(volume.fade_distance), to_edge_world);
|
|
44
|
+
|
|
45
|
+
density *= fade.x * fade.y * fade.z;
|
|
37
46
|
}
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
|
|
48
|
+
// a property of the volume, so every thread agrees: a uniform branch, not a variant
|
|
49
|
+
if (volume.noise_strength > 0.0) {
|
|
50
|
+
density *= participating_media_noise_multiplier(volume, position);
|
|
51
|
+
}
|
|
41
52
|
|
|
42
|
-
return
|
|
53
|
+
return density;
|
|
43
54
|
}
|
|
44
55
|
|
|
45
56
|
fn participating_media_volume_span(
|
|
@@ -66,5 +77,6 @@ fn participating_media_volume_span(
|
|
|
66
77
|
PARTICIPATING_MEDIA_VOLUME_STRUCT.declaration_chunk,
|
|
67
78
|
chunk_aabb3_slab_span,
|
|
68
79
|
chunk_mat4_extract_scale,
|
|
80
|
+
chunk_participating_media_noise,
|
|
69
81
|
]
|
|
70
82
|
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Froxel-grid texture coordinates of a point given as its clip position and its planar view depth.
|
|
3
|
+
*
|
|
4
|
+
* The second half of {@link volumetrics_position_world_to_froxel_uvw}, for a caller that already
|
|
5
|
+
* has those two: a march along a straight line, where both are affine in the line parameter and
|
|
6
|
+
* cost two `fma` per sample, a vec4 and a scalar, instead of two matrix products (see
|
|
7
|
+
* {@link chunk_volumetrics_sample_froxel_extinction}).
|
|
8
|
+
*
|
|
9
|
+
* `content_offset` is {@link chunk_volumetrics_froxel_content_offset} of the grid's slice scale. It
|
|
10
|
+
* depends on nothing but the grid, so a march evaluates it once and passes it in. Evaluated per
|
|
11
|
+
* sample, it is an `exp` and three divides that the compiler leaves inside the loop.
|
|
12
|
+
*
|
|
13
|
+
* NOTE: we don't clamp final slice coordinate, this is intentional, we let the linear texture sampler take care of that.
|
|
14
|
+
* See {@link build_light_cluster_parameters}
|
|
15
|
+
* @type {CodeChunk}
|
|
16
|
+
*/
|
|
17
|
+
export const chunk_volumetrics_froxel_uvw_from_clip: CodeChunk;
|
|
18
|
+
import { CodeChunk } from "../shader/compiler/CodeChunk.js";
|
|
19
|
+
//# sourceMappingURL=chunk_volumetrics_froxel_uvw_from_clip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_volumetrics_froxel_uvw_from_clip.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AACH,qDAFU,SAAS,CAmCjB;0BAnDwB,iCAAiC"}
|