@woosh/meep-engine 3.67.0 → 3.69.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/CHANGELOG.md +45 -0
- package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts +2 -17
- package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts.map +1 -1
- package/editor/ecs/component/editors/ecs/Trail3DEditor.js +3 -18
- package/package.json +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +33 -65
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.js +37 -245
- package/src/engine/graphics/ecs/trail3d/Trail3DFlags.d.ts +0 -4
- package/src/engine/graphics/ecs/trail3d/Trail3DFlags.js +4 -10
- package/src/engine/graphics/ecs/trail3d/seed_trail_stroke.d.ts +13 -10
- package/src/engine/graphics/ecs/trail3d/seed_trail_stroke.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/seed_trail_stroke.js +28 -37
- package/src/engine/graphics/ecs/trail3d/trail_knot_count.d.ts +10 -0
- package/src/engine/graphics/ecs/trail3d/trail_knot_count.d.ts.map +1 -0
- package/src/engine/graphics/ecs/trail3d/trail_knot_count.js +27 -0
- package/src/engine/graphics/trail/TrailKnots.d.ts +62 -0
- package/src/engine/graphics/trail/TrailKnots.d.ts.map +1 -0
- package/src/engine/graphics/trail/TrailKnots.js +137 -0
- package/src/engine/graphics/trail/tube/TubeXMaterialSpec.d.ts +1 -1
- package/src/engine/graphics/trail/tube/TubeXMaterialSpec.js +1 -1
- package/src/engine/graphics3/EntityRowHold.d.ts +48 -0
- package/src/engine/graphics3/EntityRowHold.d.ts.map +1 -0
- package/src/engine/graphics3/EntityRowHold.js +128 -0
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +6 -2
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +11 -44
- package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics3/GraphicsEngine.js +4 -9
- package/src/engine/graphics3/Trail3DSystem.d.ts +69 -35
- package/src/engine/graphics3/Trail3DSystem.d.ts.map +1 -1
- package/src/engine/graphics3/Trail3DSystem.js +380 -81
- package/src/engine/graphics3/load_cube_environment.js +3 -3
- package/src/engine/physics/fluid/ecs/FluidObstacle.d.ts +17 -0
- package/src/engine/physics/fluid/ecs/FluidObstacle.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidObstacle.js +22 -2
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +6 -5
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.js +14 -3
- package/src/engine/physics/fluid/obstacle/FLUID_OBSTACLE_RECORD_STRUCT.d.ts +9 -1
- package/src/engine/physics/fluid/obstacle/FLUID_OBSTACLE_RECORD_STRUCT.d.ts.map +1 -1
- package/src/engine/physics/fluid/obstacle/FLUID_OBSTACLE_RECORD_STRUCT.js +11 -1
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_create.d.ts +5 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_create.d.ts.map +1 -1
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_create.js +2 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_write_gpu_record.d.ts +4 -3
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_write_gpu_record.d.ts.map +1 -1
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_write_gpu_record.js +11 -3
- package/src/shade/playground/probe_clipmap/index.html +43 -0
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +29 -0
- package/src/shade/playground/trails/index.html +50 -0
- package/src/shade/playground/trails/main.d.ts +2 -0
- package/src/shade/playground/trails/main.d.ts.map +1 -0
- package/src/shade/playground/trails/main.js +258 -0
- package/src/shade/renderer/Renderer.d.ts +7 -0
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +213 -15
- package/src/shade/renderer/ShadeIndirectLightingMode.d.ts +1 -0
- package/src/shade/renderer/ShadeIndirectLightingMode.js +9 -0
- package/src/shade/renderer/animation/animation_curve_write_keys.d.ts +18 -0
- package/src/shade/renderer/animation/animation_curve_write_keys.d.ts.map +1 -0
- package/src/shade/renderer/animation/animation_curve_write_keys.js +34 -0
- package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.d.ts +22 -0
- package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.js +160 -0
- package/src/shade/renderer/atmosphere/ATMOSPHERE_UNIT_SCALE.d.ts +45 -0
- package/src/shade/renderer/atmosphere/ATMOSPHERE_UNIT_SCALE.d.ts.map +1 -0
- package/src/shade/renderer/atmosphere/ATMOSPHERE_UNIT_SCALE.js +57 -0
- package/src/shade/renderer/atmosphere/GPUSky.d.ts +23 -8
- package/src/shade/renderer/atmosphere/GPUSky.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/GPUSky.js +91 -34
- package/src/shade/renderer/atmosphere/SAMPLER_SKY_LUT.d.ts +17 -0
- package/src/shade/renderer/atmosphere/SAMPLER_SKY_LUT.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/SAMPLER_SKY_LUT.js +55 -25
- package/src/shade/renderer/atmosphere/SceneAtmosphere.d.ts +164 -0
- package/src/shade/renderer/atmosphere/SceneAtmosphere.d.ts.map +1 -0
- package/src/shade/renderer/atmosphere/SceneAtmosphere.js +308 -0
- package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts +3 -12
- package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.js +52 -89
- package/src/shade/renderer/atmosphere/chunk_raymarch_sky_scattering.d.ts +14 -0
- package/src/shade/renderer/atmosphere/chunk_raymarch_sky_scattering.d.ts.map +1 -0
- package/src/shade/renderer/atmosphere/chunk_raymarch_sky_scattering.js +103 -0
- package/src/shade/renderer/atmosphere/chunk_sample_multiscatter_lut.d.ts +10 -4
- package/src/shade/renderer/atmosphere/chunk_sample_multiscatter_lut.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/chunk_sample_multiscatter_lut.js +95 -57
- package/src/shade/renderer/atmosphere/chunk_sample_transmittance_lut.d.ts +10 -14
- package/src/shade/renderer/atmosphere/chunk_sample_transmittance_lut.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/chunk_sample_transmittance_lut.js +97 -69
- package/src/shade/renderer/atmosphere/chunk_sky_irradiance_lut_encode_uv.d.ts +17 -0
- package/src/shade/renderer/atmosphere/chunk_sky_irradiance_lut_encode_uv.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/chunk_sky_irradiance_lut_encode_uv.js +117 -48
- package/src/shade/renderer/atmosphere/chunk_sky_lut_compute_uv.d.ts +8 -0
- package/src/shade/renderer/atmosphere/chunk_sky_lut_compute_uv.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/chunk_sky_lut_compute_uv.js +65 -35
- package/src/shade/renderer/atmosphere/compute_mie_absorption.d.ts +2 -1
- package/src/shade/renderer/atmosphere/compute_mie_absorption.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/compute_mie_absorption.js +6 -6
- package/src/shade/renderer/atmosphere/resolve_atmosphere_sun.d.ts +41 -0
- package/src/shade/renderer/atmosphere/resolve_atmosphere_sun.d.ts.map +1 -0
- package/src/shade/renderer/atmosphere/resolve_atmosphere_sun.js +123 -0
- package/src/shade/renderer/atmosphere/shader_multiscatter_lut.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/shader_multiscatter_lut.js +21 -64
- package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.d.ts +6 -2
- package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.js +55 -179
- package/src/shade/renderer/atmosphere/shader_sky_view_lut.d.ts +7 -0
- package/src/shade/renderer/atmosphere/shader_sky_view_lut.d.ts.map +1 -0
- package/src/shade/renderer/atmosphere/shader_sky_view_lut.js +111 -0
- package/src/shade/renderer/atmosphere/shader_transmittance_lut.d.ts +0 -1
- package/src/shade/renderer/atmosphere/shader_transmittance_lut.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/shader_transmittance_lut.js +68 -79
- package/src/shade/renderer/deferred/shader_background.js +1 -1
- package/src/shade/renderer/deferred/shader_background_sky.d.ts +5 -0
- package/src/shade/renderer/deferred/shader_background_sky.d.ts.map +1 -0
- package/src/shade/renderer/deferred/shader_background_sky.js +130 -0
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/ColorGrade.js +13 -36
- package/src/shade/renderer/deferred/tonemap/chunk_tonemap_purkinje.d.ts +2 -1
- package/src/shade/renderer/deferred/tonemap/chunk_tonemap_purkinje.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/chunk_tonemap_purkinje.js +6 -2
- package/src/shade/renderer/dynamic/GPUDynamicMeshResidency.js +2 -2
- package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.d.ts +2 -13
- package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.d.ts.map +1 -1
- package/src/shade/renderer/dynamic/chunk_dynamic_mesh_avboit_vertex.js +6 -21
- package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.d.ts +17 -6
- package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.d.ts.map +1 -1
- package/src/shade/renderer/dynamic/graph_dynamic_mesh_avboit.js +38 -178
- package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.d.ts +7 -9
- package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.d.ts.map +1 -1
- package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_draw.js +17 -106
- package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.d.ts +7 -17
- package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.d.ts.map +1 -1
- package/src/shade/renderer/dynamic/shader_dynamic_mesh_avboit_splat.js +18 -118
- package/src/shade/renderer/extension/ViewTextures.d.ts +3 -2
- package/src/shade/renderer/extension/ViewTextures.d.ts.map +1 -1
- package/src/shade/renderer/extension/ViewTextures.js +3 -2
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING.d.ts +14 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING.d.ts.map +1 -1
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING.js +18 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_APPLY_STRUCT.d.ts +3 -1
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_APPLY_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_APPLY_STRUCT.js +4 -1
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +15 -6
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts.map +1 -1
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.js +20 -4
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_cell.d.ts +11 -2
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_cell.d.ts.map +1 -1
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_cell.js +59 -2
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_apply.d.ts +4 -1
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_apply.d.ts.map +1 -1
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_apply.js +367 -341
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.d.ts +6 -2
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.d.ts.map +1 -1
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.js +339 -282
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +20 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +29 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_light.d.ts +47 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_light.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_light.js +246 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +4 -15
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +8 -148
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts +4 -9
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js +9 -58
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +142 -0
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +938 -0
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +192 -0
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +231 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.d.ts +11 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.js +25 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +110 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +197 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts +150 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +408 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts +23 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.js +63 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brick_origin.d.ts +24 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brick_origin.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brick_origin.js +61 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts +39 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js +126 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts +21 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.js +74 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_march_distance.d.ts +20 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_march_distance.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_march_distance.js +26 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_ray_sort.d.ts +24 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_ray_sort.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_ray_sort.js +57 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts +22 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.js +53 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts +62 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.js +156 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_workgroup_sum.d.ts +18 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_workgroup_sum.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_workgroup_sum.js +50 -0
- package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts +21 -0
- package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.js +54 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts +67 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.js +509 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_debug.d.ts +20 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_debug.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_debug.js +128 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +62 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +478 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts +69 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.js +457 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts +27 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.js +219 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.d.ts +22 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.js +151 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.d.ts +66 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.js +301 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +59 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +364 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts +40 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.js +275 -0
- package/src/shade/renderer/grass/blade/GPUGrassBlades.d.ts.map +1 -1
- package/src/shade/renderer/grass/blade/GPUGrassBlades.js +17 -2
- package/src/shade/renderer/grass/blade/grass_blade_resolve.d.ts +18 -8
- package/src/shade/renderer/grass/blade/grass_blade_resolve.d.ts.map +1 -1
- package/src/shade/renderer/grass/blade/grass_blade_resolve.js +114 -32
- package/src/shade/renderer/grass/press/shader_grass_press_mark.d.ts +3 -2
- package/src/shade/renderer/grass/press/shader_grass_press_mark.d.ts.map +1 -1
- package/src/shade/renderer/grass/press/shader_grass_press_mark.js +5 -3
- package/src/shade/renderer/light/GPULightCollection.d.ts +1 -1
- package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
- package/src/shade/renderer/light/GPULightCollection.js +213 -80
- package/src/shade/renderer/{atmosphere → light/environment}/chunk_sample_environment_color.d.ts +1 -2
- package/src/shade/renderer/light/environment/chunk_sample_environment_color.d.ts.map +1 -0
- package/src/shade/renderer/{atmosphere → light/environment}/chunk_sample_environment_color.js +3 -4
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_render_trace_path.js +1 -1
- package/src/shade/renderer/postprocess/denoise/debug/graph_pass_debug_reprojection.js +1 -1
- package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts +1 -1
- package/src/shade/renderer/postprocess/motion_blur/MotionBlur.js +1 -1
- package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts +1 -1
- package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.js +1 -1
- package/src/shade/renderer/postprocess/motion_blur/shader_motion_blur_reconstruct.js +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.js +2 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +2 -0
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts +6 -0
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js +9 -1
- package/src/shade/renderer/postprocess/taa/shader_depth_occlusion_clip.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/shader_depth_occlusion_clip.js +4 -3
- package/src/shade/renderer/postprocess/velocity/VELOCITY_BUFFER.d.ts +17 -0
- package/src/shade/renderer/postprocess/velocity/VELOCITY_BUFFER.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/velocity/VELOCITY_BUFFER.js +16 -0
- package/src/shade/renderer/postprocess/velocity/chunk_velocity_texel.d.ts +21 -0
- package/src/shade/renderer/postprocess/velocity/chunk_velocity_texel.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/velocity/chunk_velocity_texel.js +30 -0
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts +7 -5
- 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 +19 -17
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.js +2 -0
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.d.ts +49 -0
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js +144 -0
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_splat.d.ts +71 -0
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_splat.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_splat.js +152 -0
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_unlit_varyings.d.ts +21 -0
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_unlit_varyings.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_unlit_varyings.js +30 -0
- package/src/shade/renderer/rasterize/native/avboit/graph_avboit_unlit.d.ts +101 -0
- package/src/shade/renderer/rasterize/native/avboit/graph_avboit_unlit.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/native/avboit/graph_avboit_unlit.js +306 -0
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.d.ts +9 -0
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.js +11 -4
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +2 -1
- package/src/shade/renderer/scene/Scene.d.ts +9 -2
- package/src/shade/renderer/scene/Scene.d.ts.map +1 -1
- package/src/shade/renderer/scene/Scene.js +10 -2
- package/src/shade/renderer/shader/ImageShader.d.ts +24 -12
- package/src/shade/renderer/shader/ImageShader.d.ts.map +1 -1
- package/src/shade/renderer/shader/ImageShader.js +11 -8
- package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_HEIGHT_DECLARATION.d.ts +3 -1
- package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_HEIGHT_DECLARATION.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_HEIGHT_DECLARATION.js +11 -3
- package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_RADII_DECLARATION.d.ts +2 -11
- package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_RADII_DECLARATION.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_RADII_DECLARATION.js +23 -32
- package/src/shade/renderer/shader/chunk/atmosphere/PLANET_RADIUS_DECLARATION.d.ts +6 -0
- package/src/shade/renderer/shader/chunk/atmosphere/PLANET_RADIUS_DECLARATION.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/PLANET_RADIUS_DECLARATION.js +14 -2
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_height.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_height.js +4 -2
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_intersection.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_intersection.js +11 -3
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_ray_bounds.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_atmosphere_ray_bounds.js +68 -69
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_get_sun_transmittance.d.ts +4 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_get_sun_transmittance.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_get_sun_transmittance.js +46 -39
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_position_relative_to_planet_center.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_position_relative_to_planet_center.js +5 -3
- package/src/shade/renderer/shader/chunk/color/tonemap/purkinje/chunk_apply_purkinje_shift.d.ts +18 -10
- package/src/shade/renderer/shader/chunk/color/tonemap/purkinje/chunk_apply_purkinje_shift.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/purkinje/chunk_apply_purkinje_shift.js +30 -27
- package/src/shade/renderer/shader/chunk/depth/chunk_get_device_depth.d.ts +14 -0
- package/src/shade/renderer/shader/chunk/depth/chunk_get_device_depth.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/depth/chunk_get_device_depth.js +30 -0
- package/src/shade/renderer/shader/chunk/geometry/octahedron/chunk_uv_equal_area_sphere.d.ts +21 -0
- package/src/shade/renderer/shader/chunk/geometry/octahedron/chunk_uv_equal_area_sphere.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/octahedron/chunk_uv_equal_area_sphere.js +60 -0
- package/src/shade/renderer/shader/chunk/light/{sky/chunk_sample_sky_color.d.ts → io/chunk_light_get_sun.d.ts} +3 -6
- package/src/shade/renderer/shader/chunk/light/io/chunk_light_get_sun.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/light/{sky/chunk_sample_sky_color.js → io/chunk_light_get_sun.js} +6 -26
- package/src/shade/renderer/shadow/sdf/cascade/shader_scene_sdf_soft_shadows.js +1 -1
- package/src/shade/renderer/trails/GPUTrailAVBOITChannel.d.ts +69 -0
- package/src/shade/renderer/trails/GPUTrailAVBOITChannel.d.ts.map +1 -0
- package/src/shade/renderer/trails/GPUTrailAVBOITChannel.js +129 -0
- package/src/shade/renderer/trails/GPUTrailSystem.d.ts +164 -0
- package/src/shade/renderer/trails/GPUTrailSystem.d.ts.map +1 -0
- package/src/shade/renderer/trails/GPUTrailSystem.js +725 -0
- package/src/shade/renderer/trails/data/TRAIL_DATABASE_SPEC.d.ts +14 -0
- package/src/shade/renderer/trails/data/TRAIL_DATABASE_SPEC.d.ts.map +1 -0
- package/src/shade/renderer/trails/data/TRAIL_DATABASE_SPEC.js +38 -0
- package/src/shade/renderer/trails/data/TRAIL_KNOT.d.ts +66 -0
- package/src/shade/renderer/trails/data/TRAIL_KNOT.d.ts.map +1 -0
- package/src/shade/renderer/trails/data/TRAIL_KNOT.js +154 -0
- package/src/shade/renderer/trails/data/TRAIL_RECORD.d.ts +19 -0
- package/src/shade/renderer/trails/data/TRAIL_RECORD.d.ts.map +1 -0
- package/src/shade/renderer/trails/data/TRAIL_RECORD.js +68 -0
- package/src/shade/renderer/trails/data/TRAIL_STATE.d.ts +18 -0
- package/src/shade/renderer/trails/data/TRAIL_STATE.d.ts.map +1 -0
- package/src/shade/renderer/trails/data/TRAIL_STATE.js +43 -0
- package/src/shade/renderer/trails/graph_trails.d.ts +58 -0
- package/src/shade/renderer/trails/graph_trails.d.ts.map +1 -0
- package/src/shade/renderer/trails/graph_trails.js +155 -0
- package/src/shade/renderer/trails/graph_trails_avboit.d.ts +126 -0
- package/src/shade/renderer/trails/graph_trails_avboit.d.ts.map +1 -0
- package/src/shade/renderer/trails/graph_trails_avboit.js +300 -0
- package/src/shade/renderer/trails/runtime/TrailFadeCurves.d.ts +56 -0
- package/src/shade/renderer/trails/runtime/TrailFadeCurves.d.ts.map +1 -0
- package/src/shade/renderer/trails/runtime/TrailFadeCurves.js +220 -0
- package/src/shade/renderer/trails/runtime/TrailKnotPool.d.ts +49 -0
- package/src/shade/renderer/trails/runtime/TrailKnotPool.d.ts.map +1 -0
- package/src/shade/renderer/trails/runtime/TrailKnotPool.js +162 -0
- package/src/shade/renderer/trails/runtime/TrailParameters.d.ts +52 -0
- package/src/shade/renderer/trails/runtime/TrailParameters.d.ts.map +1 -0
- package/src/shade/renderer/trails/runtime/TrailParameters.js +126 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_frame_transport.d.ts +23 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_frame_transport.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_frame_transport.js +57 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_knot_alpha.d.ts +14 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_knot_alpha.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_knot_alpha.js +40 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_seed.d.ts +18 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_seed.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_seed.js +64 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_segment.d.ts +14 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_segment.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_segment.js +51 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_update.d.ts +48 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_update.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_update.js +197 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_vertex.d.ts +34 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_vertex.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/chunk_trail_vertex.js +111 -0
- package/src/shade/renderer/trails/shaders/shader_trail_avboit.d.ts +24 -0
- package/src/shade/renderer/trails/shaders/shader_trail_avboit.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/shader_trail_avboit.js +78 -0
- package/src/shade/renderer/trails/shaders/shader_trail_avboit_segments.d.ts +23 -0
- package/src/shade/renderer/trails/shaders/shader_trail_avboit_segments.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/shader_trail_avboit_segments.js +130 -0
- package/src/shade/renderer/trails/shaders/shader_trail_draw_args.d.ts +29 -0
- package/src/shade/renderer/trails/shaders/shader_trail_draw_args.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/shader_trail_draw_args.js +78 -0
- package/src/shade/renderer/trails/shaders/shader_trail_seed.d.ts +18 -0
- package/src/shade/renderer/trails/shaders/shader_trail_seed.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/shader_trail_seed.js +79 -0
- package/src/shade/renderer/trails/shaders/shader_trail_update.d.ts +20 -0
- package/src/shade/renderer/trails/shaders/shader_trail_update.d.ts.map +1 -0
- package/src/shade/renderer/trails/shaders/shader_trail_update.js +101 -0
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +3 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +4 -2
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +743 -739
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.js +2 -0
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +19 -17
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_scattering_lut.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_scattering_lut.js +5 -3
- package/src/shade/renderer/water/chunk_water_gi.js +2 -0
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
- package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
- package/src/engine/graphics/ecs/trail3d/advance_trail.d.ts +0 -18
- package/src/engine/graphics/ecs/trail3d/advance_trail.d.ts.map +0 -1
- package/src/engine/graphics/ecs/trail3d/advance_trail.js +0 -42
- package/src/engine/graphics/ecs/trail3d/seed_trail_tube.d.ts +0 -14
- package/src/engine/graphics/ecs/trail3d/seed_trail_tube.d.ts.map +0 -1
- package/src/engine/graphics/ecs/trail3d/seed_trail_tube.js +0 -75
- package/src/engine/graphics/ecs/trail3d/trail_head_position.d.ts +0 -17
- package/src/engine/graphics/ecs/trail3d/trail_head_position.d.ts.map +0 -1
- package/src/engine/graphics/ecs/trail3d/trail_head_position.js +0 -19
- package/src/engine/graphics/sh3/path_tracer/make_sky_hosek.d.ts +0 -2
- package/src/engine/graphics/sh3/path_tracer/make_sky_hosek.d.ts.map +0 -1
- package/src/engine/graphics/sh3/path_tracer/make_sky_hosek.js +0 -45
- package/src/engine/graphics/sh3/path_tracer/make_sky_rtiw.d.ts +0 -2
- package/src/engine/graphics/sh3/path_tracer/make_sky_rtiw.d.ts.map +0 -1
- package/src/engine/graphics/sh3/path_tracer/make_sky_rtiw.js +0 -17
- package/src/engine/graphics/sh3/sky/hosek/README.md +0 -4
- package/src/engine/graphics/sh3/sky/hosek/data.d.ts +0 -17
- package/src/engine/graphics/sh3/sky/hosek/data.d.ts.map +0 -1
- package/src/engine/graphics/sh3/sky/hosek/data.js +0 -3744
- package/src/engine/graphics/sh3/sky/hosek/prototype_hosek.d.ts +0 -2
- package/src/engine/graphics/sh3/sky/hosek/prototype_hosek.d.ts.map +0 -1
- package/src/engine/graphics/sh3/sky/hosek/prototype_hosek.js +0 -71
- package/src/engine/graphics/sh3/sky/hosek/render_hosek_sky_to_equirectangular.d.ts +0 -26
- package/src/engine/graphics/sh3/sky/hosek/render_hosek_sky_to_equirectangular.d.ts.map +0 -1
- package/src/engine/graphics/sh3/sky/hosek/render_hosek_sky_to_equirectangular.js +0 -70
- package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.d.ts +0 -22
- package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.d.ts.map +0 -1
- package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.js +0 -388
- package/src/engine/graphics/trail/tube/TubeX.d.ts +0 -186
- package/src/engine/graphics/trail/tube/TubeX.d.ts.map +0 -1
- package/src/engine/graphics/trail/tube/TubeX.js +0 -575
- package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts +0 -16
- package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts.map +0 -1
- package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.js +0 -34
- package/src/engine/graphics/trail/tube/tube_attributes_spec.d.ts +0 -27
- package/src/engine/graphics/trail/tube/tube_attributes_spec.d.ts.map +0 -1
- package/src/engine/graphics/trail/tube/tube_attributes_spec.js +0 -70
- package/src/engine/graphics3/make_default_environment.d.ts +0 -15
- package/src/engine/graphics3/make_default_environment.d.ts.map +0 -1
- package/src/engine/graphics3/make_default_environment.js +0 -111
- package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts +0 -38
- package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts.map +0 -1
- package/src/engine/graphics3/trail/trail_tube_write_geometry.js +0 -119
- package/src/shade/renderer/atmosphere/MIE_G.d.ts +0 -6
- package/src/shade/renderer/atmosphere/MIE_G.d.ts.map +0 -1
- package/src/shade/renderer/atmosphere/MIE_G.js +0 -5
- package/src/shade/renderer/atmosphere/chunk_sample_environment_color.d.ts.map +0 -1
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.d.ts +0 -4
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.d.ts.map +0 -1
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.js +0 -44
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.d.ts +0 -2
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.js +0 -43
- package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_DENSITY_DECLARATION.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_DENSITY_DECLARATION.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/atmosphere/ATMOSPHERE_DENSITY_DECLARATION.js +0 -6
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_absorb.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_absorb.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_absorb.js +0 -18
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_optical_depth.d.ts +0 -14
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_optical_depth.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_optical_depth.js +0 -86
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_scattering.d.ts +0 -8
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_scattering.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_integrate_scattering.js +0 -125
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_planet_intersection.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_planet_intersection.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_planet_intersection.js +0 -17
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_sphere_intersection_nearest.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_sphere_intersection_nearest.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_sphere_intersection_nearest.js +0 -38
- package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.d.ts +0 -16
- package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.js +0 -28
- package/src/shade/renderer/shader/chunk/light/sky/chunk_sample_sky_color.d.ts.map +0 -1
- package/src/shade/renderer/view/GPUViewSkyContext.d.ts +0 -26
- package/src/shade/renderer/view/GPUViewSkyContext.d.ts.map +0 -1
- package/src/shade/renderer/view/GPUViewSkyContext.js +0 -170
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The velocity buffer's format: how each pixel's surface point moved since the last frame, four half floats
|
|
3
|
+
* (`chunk_velocity_texel` makes the texel):
|
|
4
|
+
*
|
|
5
|
+
* - **x, y**: internal pixels from the point's place on last frame's screen to its place on this one;
|
|
6
|
+
* - **z**: the point's view depth now less its view depth then, in world units: negative for a surface coming
|
|
7
|
+
* nearer, zero for one moving across the view at its depth, and zero for the sky;
|
|
8
|
+
* - **w**: zero.
|
|
9
|
+
*
|
|
10
|
+
* Both frames' projections are taken free of the TAA jitter, so a still surface under a still camera holds zero
|
|
11
|
+
* throughout. A delta rather than last frame's depth itself: a half float holds it to a share of the motion, and so
|
|
12
|
+
* holds the depth recovered from it, `depth − z`, to that share of the motion rather than of the depth.
|
|
13
|
+
*
|
|
14
|
+
* @type {GPUTextureFormat}
|
|
15
|
+
*/
|
|
16
|
+
export const VELOCITY_FORMAT = 'rgba16float';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pixel's texel of the velocity buffer (`VELOCITY_FORMAT`), from its surface point now and where that point stood a
|
|
3
|
+
* frame ago:
|
|
4
|
+
*
|
|
5
|
+
* ```wgsl
|
|
6
|
+
* fn velocity_texel(pixel: vec2<f32>, depth: f32, before: vec4<f32>, size: vec2<f32>) -> vec4<f32>
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* - `pixel`: the pixel's centre, in the view's internal pixels; `size`: the view's size in them.
|
|
10
|
+
* - `depth`: the point's clip w this frame.
|
|
11
|
+
* - `before`: the point a frame ago, in last frame's clip space.
|
|
12
|
+
*
|
|
13
|
+
* Both clip spaces are the un-jittered projections' (`view_velocity_matrices`). The texel's z is the clip w now less
|
|
14
|
+
* then, which a perspective projection makes the view depth; under an orthographic one, whose w is always one, it is
|
|
15
|
+
* zero.
|
|
16
|
+
*
|
|
17
|
+
* @type {CodeChunk}
|
|
18
|
+
*/
|
|
19
|
+
export const chunk_velocity_texel: CodeChunk;
|
|
20
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
21
|
+
//# sourceMappingURL=chunk_velocity_texel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_velocity_texel.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/velocity/chunk_velocity_texel.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,mCAFU,SAAS,CAWhB;0BA7BuB,oCAAoC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A pixel's texel of the velocity buffer (`VELOCITY_FORMAT`), from its surface point now and where that point stood a
|
|
5
|
+
* frame ago:
|
|
6
|
+
*
|
|
7
|
+
* ```wgsl
|
|
8
|
+
* fn velocity_texel(pixel: vec2<f32>, depth: f32, before: vec4<f32>, size: vec2<f32>) -> vec4<f32>
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* - `pixel`: the pixel's centre, in the view's internal pixels; `size`: the view's size in them.
|
|
12
|
+
* - `depth`: the point's clip w this frame.
|
|
13
|
+
* - `before`: the point a frame ago, in last frame's clip space.
|
|
14
|
+
*
|
|
15
|
+
* Both clip spaces are the un-jittered projections' (`view_velocity_matrices`). The texel's z is the clip w now less
|
|
16
|
+
* then, which a perspective projection makes the view depth; under an orthographic one, whose w is always one, it is
|
|
17
|
+
* zero.
|
|
18
|
+
*
|
|
19
|
+
* @type {CodeChunk}
|
|
20
|
+
*/
|
|
21
|
+
export const chunk_velocity_texel = CodeChunk.from(
|
|
22
|
+
//language=WGSL
|
|
23
|
+
`
|
|
24
|
+
fn velocity_texel(pixel: vec2<f32>, depth: f32, before: vec4<f32>, size: vec2<f32>) -> vec4<f32> {
|
|
25
|
+
let ndc = before.xy / before.w;
|
|
26
|
+
let previous = vec2<f32>((ndc.x + 1.0) * 0.5 * size.x, (1.0 - ndc.y) * 0.5 * size.y);
|
|
27
|
+
|
|
28
|
+
return vec4<f32>(pixel - previous, depth - before.w, 0.0);
|
|
29
|
+
}
|
|
30
|
+
`);
|
|
@@ -27,10 +27,12 @@ export function enquire_per_object_velocity_pipelines(enquiry: PipelineEnquiry):
|
|
|
27
27
|
* per-vertex skin deformation (the limb-ghosting case Stage 1
|
|
28
28
|
* couldn't address) on top of the per-object motion.
|
|
29
29
|
*
|
|
30
|
-
* The skinned and rigid foreground branches both produce
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
30
|
+
* The skinned and rigid foreground branches both produce the
|
|
31
|
+
* velocity buffer's texel (`VELOCITY_FORMAT`: pixel deltas and the
|
|
32
|
+
* view depth moved through), so downstream consumers (TAA, motion
|
|
33
|
+
* blur, the screen probes) just see velocity — no
|
|
34
|
+
* skinning-awareness needed at any layer above this pass. The
|
|
35
|
+
* background's depth delta is zero.
|
|
34
36
|
*
|
|
35
37
|
* Un-jittered matrices are CPU-built from
|
|
36
38
|
* `camera.projection_matrix × camera.view_matrix` — viewport
|
|
@@ -51,7 +53,7 @@ export function enquire_per_object_velocity_pipelines(enquiry: PipelineEnquiry):
|
|
|
51
53
|
* placeholders and the shader forces the rigid path.
|
|
52
54
|
* @param {number[]} args.resolution
|
|
53
55
|
* @param {GPUViewContext} args.view
|
|
54
|
-
* @returns {number} FrameGraph handle to the velocity texture (
|
|
56
|
+
* @returns {number} FrameGraph handle to the velocity texture (`VELOCITY_FORMAT`)
|
|
55
57
|
*/
|
|
56
58
|
export function graph_add_per_object_velocity({ graph, texture_depth, texture_visibility, buffer_visible_meshlets, buffer_scene_database, buffer_meshlet_metadata, buffer_meshlet_data, buffer_prev_position_offsets, buffer_prev_positions, skinning_active, resolution, view, }: {
|
|
57
59
|
graph: FrameGraph;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_add_per_object_velocity.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.js"],"names":[],"mappings":"AA8QA;;;;GAIG;AACH,+DAFW,eAAe,QAIzB;AAED
|
|
1
|
+
{"version":3,"file":"graph_add_per_object_velocity.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.js"],"names":[],"mappings":"AA8QA;;;;GAIG;AACH,+DAFW,eAAe,QAIzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH;IAhB4B,KAAK;IACT,aAAa,EAA1B,MAAM;IACO,kBAAkB,EAA/B,MAAM;IACO,uBAAuB,EAApC,MAAM;IACO,qBAAqB,EAAlC,MAAM;IACO,uBAAuB,EAApC,MAAM;IACO,mBAAmB,EAAhC,MAAM;IACO,4BAA4B,EAAzC,MAAM;IACO,qBAAqB,EAAlC,MAAM;IACQ,eAAe,EAA7B,OAAO;IAGQ,UAAU,EAAzB,MAAM,EAAE;IACa,IAAI;IACvB,MAAM,CA+DlB;8BA9VY,OAAO,6CAA6C,EAAE,eAAe"}
|
|
@@ -30,7 +30,9 @@ import { graph_image_pass } from "../../shader/graph/graph_image_pass.js";
|
|
|
30
30
|
import { ImageShader } from "../../shader/ImageShader.js";
|
|
31
31
|
import { ShaderResourceSetDescriptor } from "../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
32
32
|
import { ShaderDescriptor } from "../../shader/ShaderDescriptor.js";
|
|
33
|
+
import { chunk_velocity_texel } from "./chunk_velocity_texel.js";
|
|
33
34
|
import { construct_pixel_reprojection_matrix } from "./construct_pixel_reprojection_matrix.js";
|
|
35
|
+
import { VELOCITY_FORMAT } from "./VELOCITY_BUFFER.js";
|
|
34
36
|
import { view_velocity_matrices } from "./view_velocity_matrices.js";
|
|
35
37
|
import {
|
|
36
38
|
construct_reprojection_matrix_rotation_only,
|
|
@@ -92,7 +94,7 @@ fn read_prev_position(base: u32, vertex_index: u32) -> vec3<f32> {
|
|
|
92
94
|
@fragment
|
|
93
95
|
fn main(
|
|
94
96
|
@builtin(position) coord: vec4<f32>,
|
|
95
|
-
) -> @location(0)
|
|
97
|
+
) -> @location(0) vec4<f32> {
|
|
96
98
|
|
|
97
99
|
let cur_px = coord.xy;
|
|
98
100
|
let texel = vec2<u32>(cur_px);
|
|
@@ -103,12 +105,13 @@ fn main(
|
|
|
103
105
|
// Visibility-buffer clears leave VISIBILITY_NONE on sky
|
|
104
106
|
// pixels, where reverse-Z depth is always 0.0. Passing 0.0
|
|
105
107
|
// directly avoids a tDepth textureLoad on every background pixel.
|
|
108
|
+
// The sky stands infinitely far, so it has no depth to move through.
|
|
106
109
|
if visibility_word == VISIBILITY_NONE {
|
|
107
110
|
let position_previous = v3_matrix4_project(
|
|
108
111
|
vec3<f32>(cur_px, 0.0),
|
|
109
112
|
mReprojectionRotation
|
|
110
113
|
);
|
|
111
|
-
return cur_px - position_previous.xy;
|
|
114
|
+
return vec4<f32>(cur_px - position_previous.xy, 0.0, 0.0);
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
// ── Reconstruct world-space position for this pixel ─────────
|
|
@@ -233,15 +236,11 @@ fn main(
|
|
|
233
236
|
prev_world = prev_world_h.xyz / prev_world_h.w;
|
|
234
237
|
}
|
|
235
238
|
|
|
236
|
-
// ── Project to previous frame
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
(1.0 - prev_ndc.y) * 0.5 * res.y,
|
|
242
|
-
);
|
|
243
|
-
|
|
244
|
-
return cur_px - prev_px;
|
|
239
|
+
// ── Project to previous frame: the pixel and depth deltas ───
|
|
240
|
+
//
|
|
241
|
+
// This frame's clip w, the point's view depth, is the reciprocal of
|
|
242
|
+
// the w its unprojection came out with.
|
|
243
|
+
return velocity_texel(cur_px, 1.0 / cur_world_h.w, mViewProjPrevious * vec4<f32>(prev_world, 1.0), res);
|
|
245
244
|
}
|
|
246
245
|
`, [
|
|
247
246
|
chunk_v3_matrix4_project,
|
|
@@ -251,6 +250,7 @@ fn main(
|
|
|
251
250
|
chunk_read_meshlet_vertex_position,
|
|
252
251
|
MESHLET_METADATA_STRUCT.declaration_chunk,
|
|
253
252
|
chunk_visibility_decode,
|
|
253
|
+
chunk_velocity_texel,
|
|
254
254
|
]
|
|
255
255
|
);
|
|
256
256
|
|
|
@@ -261,7 +261,7 @@ const shader = new ImageShader({
|
|
|
261
261
|
body
|
|
262
262
|
}),
|
|
263
263
|
targets: [{
|
|
264
|
-
format:
|
|
264
|
+
format: VELOCITY_FORMAT,
|
|
265
265
|
}]
|
|
266
266
|
});
|
|
267
267
|
|
|
@@ -300,10 +300,12 @@ export function enquire_per_object_velocity_pipelines(enquiry) {
|
|
|
300
300
|
* per-vertex skin deformation (the limb-ghosting case Stage 1
|
|
301
301
|
* couldn't address) on top of the per-object motion.
|
|
302
302
|
*
|
|
303
|
-
* The skinned and rigid foreground branches both produce
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
303
|
+
* The skinned and rigid foreground branches both produce the
|
|
304
|
+
* velocity buffer's texel (`VELOCITY_FORMAT`: pixel deltas and the
|
|
305
|
+
* view depth moved through), so downstream consumers (TAA, motion
|
|
306
|
+
* blur, the screen probes) just see velocity — no
|
|
307
|
+
* skinning-awareness needed at any layer above this pass. The
|
|
308
|
+
* background's depth delta is zero.
|
|
307
309
|
*
|
|
308
310
|
* Un-jittered matrices are CPU-built from
|
|
309
311
|
* `camera.projection_matrix × camera.view_matrix` — viewport
|
|
@@ -324,7 +326,7 @@ export function enquire_per_object_velocity_pipelines(enquiry) {
|
|
|
324
326
|
* placeholders and the shader forces the rigid path.
|
|
325
327
|
* @param {number[]} args.resolution
|
|
326
328
|
* @param {GPUViewContext} args.view
|
|
327
|
-
* @returns {number} FrameGraph handle to the velocity texture (
|
|
329
|
+
* @returns {number} FrameGraph handle to the velocity texture (`VELOCITY_FORMAT`)
|
|
328
330
|
*/
|
|
329
331
|
export function graph_add_per_object_velocity({
|
|
330
332
|
graph,
|
|
@@ -35,3 +35,5 @@ chunk_forward_sample_indirect.add(ShadeIndirectLightingMode.IBL, chunk_forward_s
|
|
|
35
35
|
chunk_forward_sample_indirect.add(ShadeIndirectLightingMode.Brick4, chunk_forward_sample_indirect_brick4);
|
|
36
36
|
chunk_forward_sample_indirect.add(ShadeIndirectLightingMode.LPV, chunk_forward_sample_indirect_environment);
|
|
37
37
|
chunk_forward_sample_indirect.add(ShadeIndirectLightingMode.ProbeClipmap, chunk_forward_sample_indirect_probe_clipmap);
|
|
38
|
+
// the screen probes light only the deferred opaque surfaces: every other reader takes the world-space probes
|
|
39
|
+
chunk_forward_sample_indirect.add(ShadeIndirectLightingMode.ScreenProbes, chunk_forward_sample_indirect_probe_clipmap);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The render pipeline for an unlit draw shader: additive into the accumulators with the emission
|
|
3
|
+
* target masked off, the opaque scene's depth tested and never written, both faces.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} params
|
|
6
|
+
* @param {string} params.label
|
|
7
|
+
* @param {import("../../../shader/resource/ShaderResourceSetDescriptor.js").ShaderResourceSetDescriptor} params.resources
|
|
8
|
+
* the shader's resources; must hold {@link AVBOIT_UNLIT_DRAW_PASS_GROUP}
|
|
9
|
+
* @param {string} params.source the assembled shader, with a vertex entry point named `vs_main` and
|
|
10
|
+
* {@link chunk_avboit_unlit_draw_fragment}'s `fs_main`
|
|
11
|
+
* @returns {RenderPipelineDescriptor}
|
|
12
|
+
*/
|
|
13
|
+
export function avboit_unlit_draw_pipeline({ label, resources, source }: {
|
|
14
|
+
label: string;
|
|
15
|
+
resources: import("../../../shader/resource/ShaderResourceSetDescriptor.js").ShaderResourceSetDescriptor;
|
|
16
|
+
source: string;
|
|
17
|
+
}): RenderPipelineDescriptor;
|
|
18
|
+
/**
|
|
19
|
+
* What the unlit draw reads once per pass: the view, the warp, the integral and the fog.
|
|
20
|
+
*
|
|
21
|
+
* @type {ShaderResourceGroupDescriptor}
|
|
22
|
+
*/
|
|
23
|
+
export const AVBOIT_UNLIT_DRAW_PASS_GROUP: ShaderResourceGroupDescriptor;
|
|
24
|
+
/**
|
|
25
|
+
* The unlit AVBOIT draw's fragment stage, `fs_main`: unlit straight-alpha geometry — a dynamic mesh, a
|
|
26
|
+
* trail — drawn at internal resolution into the four accumulators the transparent meshes and the
|
|
27
|
+
* particles draw into (`avboit_draw_fragment_body`), so it composites against both order-independently.
|
|
28
|
+
* Any vertex stage that hands it `AVBOITUnlitVaryings` (`chunk_avboit_unlit_varyings`) can be linked
|
|
29
|
+
* with it.
|
|
30
|
+
*
|
|
31
|
+
* Per fragment: nothing at all if it has faded out (the unlit splat recorded nothing for it either),
|
|
32
|
+
* then the transmittance of everything in front from the integral texture — a fragment the volume
|
|
33
|
+
* already calls extinct is discarded unshaded — the volumetric fog at its depth, and the accumulators
|
|
34
|
+
* through `avboit_premultiplied_contribution`, the routing every side channel shares.
|
|
35
|
+
*
|
|
36
|
+
* The colour is straight alpha and unlit: it is premultiplied here and never emits — a fragment that
|
|
37
|
+
* can get past the first test covers something — so {@link avboit_unlit_draw_pipeline} does not write
|
|
38
|
+
* the emission target at all rather than blend zeros into it over every covered pixel.
|
|
39
|
+
*
|
|
40
|
+
* The enclosing shader binds {@link AVBOIT_UNLIT_DRAW_PASS_GROUP} and names its vertex entry point
|
|
41
|
+
* anything but `fs_main`.
|
|
42
|
+
*
|
|
43
|
+
* @type {CodeChunk}
|
|
44
|
+
*/
|
|
45
|
+
export const chunk_avboit_unlit_draw_fragment: CodeChunk;
|
|
46
|
+
import { RenderPipelineDescriptor } from "../../../../descriptor/pipeline/render/RenderPipelineDescriptor.js";
|
|
47
|
+
import { ShaderResourceGroupDescriptor } from "../../../shader/resource/ShaderResourceGroupDescriptor.js";
|
|
48
|
+
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
49
|
+
//# sourceMappingURL=avboit_unlit_draw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avboit_unlit_draw.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js"],"names":[],"mappings":"AAiHA;;;;;;;;;;;GAWG;AACH;IAP0B,KAAK,EAApB,MAAM;IACgG,SAAS,EAA/G,OAAO,yDAAyD,EAAE,2BAA2B;IAE9E,MAAM,EAArB,MAAM;IAEJ,wBAAwB,CAoBpC;AA5HD;;;;GAIG;AACH,2CAFU,6BAA6B,CAEyC;AAahF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,+CAFU,SAAS,CAuDjB;yCA7GuC,oEAAoE;8CAI/D,2DAA2D;0BAD/E,uCAAuC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { GPUShaderStage } from "../../../../descriptor/GPUShaderStage.js";
|
|
2
|
+
import { DepthStencilState } from "../../../../descriptor/pipeline/render/DepthStencilState.js";
|
|
3
|
+
import { RenderPipelineDescriptor } from "../../../../descriptor/pipeline/render/RenderPipelineDescriptor.js";
|
|
4
|
+
import { assert } from "../../../../../core/assert.js";
|
|
5
|
+
import { chunk_sample_volumetrics } from "../../../deferred/chunk_sample_volumetrics.js";
|
|
6
|
+
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
7
|
+
import { ShaderResourceGroupDescriptor } from "../../../shader/resource/ShaderResourceGroupDescriptor.js";
|
|
8
|
+
import { SAMPLER_LINEAR_UPSCALE } from "../../../texture/SAMPLER_LINEAR_UPSCALE.js";
|
|
9
|
+
import { VIEW_UNIFORM_STRUCT } from "../../../view/VIEW_UNIFORM_STRUCT.js";
|
|
10
|
+
import { VOLUMETRICS_METADATA_STRUCT } from "../../../volumetrics/VOLUMETRICS_METADATA_STRUCT.js";
|
|
11
|
+
import { AVBOIT_EXTINCT_TRANSMITTANCE } from "./AVBOIT_CONSTANTS.js";
|
|
12
|
+
import { AVBOIT_WARP_STRUCT } from "./AVBOIT_WARP_STRUCT.js";
|
|
13
|
+
import { AVBOIT_DRAW_TARGETS } from "./avboit_draw_fragment_body.js";
|
|
14
|
+
import { chunk_avboit_footprint_bias } from "./chunk_avboit_footprint_bias.js";
|
|
15
|
+
import { chunk_avboit_premultiplied_contribution } from "./chunk_avboit_premultiplied_contribution.js";
|
|
16
|
+
import { chunk_avboit_sample_transmittance } from "./chunk_avboit_sample_transmittance.js";
|
|
17
|
+
import { chunk_avboit_unlit_varyings } from "./chunk_avboit_unlit_varyings.js";
|
|
18
|
+
import { chunk_avboit_view_depth_to_virtual } from "./chunk_avboit_view_depth_to_virtual.js";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* What the unlit draw reads once per pass: the view, the warp, the integral and the fog.
|
|
22
|
+
*
|
|
23
|
+
* @type {ShaderResourceGroupDescriptor}
|
|
24
|
+
*/
|
|
25
|
+
export const AVBOIT_UNLIT_DRAW_PASS_GROUP = new ShaderResourceGroupDescriptor();
|
|
26
|
+
|
|
27
|
+
AVBOIT_UNLIT_DRAW_PASS_GROUP
|
|
28
|
+
.addUniform("view", VIEW_UNIFORM_STRUCT)
|
|
29
|
+
.addStorageBuffer("warp", AVBOIT_WARP_STRUCT)
|
|
30
|
+
// sampled through sLinear: linear, clamped on every axis, which is what the integral needs
|
|
31
|
+
.addTexture("tIntegral", "float", "3d")
|
|
32
|
+
.addSampler("sLinear", "filtering", SAMPLER_LINEAR_UPSCALE)
|
|
33
|
+
// volumetrics (composited inline)
|
|
34
|
+
.addUniform("volumetrics_metadata", VOLUMETRICS_METADATA_STRUCT)
|
|
35
|
+
.addTexture("tVolumetrics", "float", "3d")
|
|
36
|
+
.addTexture("tSTBN_vec3", "float", "3d");
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The unlit AVBOIT draw's fragment stage, `fs_main`: unlit straight-alpha geometry — a dynamic mesh, a
|
|
40
|
+
* trail — drawn at internal resolution into the four accumulators the transparent meshes and the
|
|
41
|
+
* particles draw into (`avboit_draw_fragment_body`), so it composites against both order-independently.
|
|
42
|
+
* Any vertex stage that hands it `AVBOITUnlitVaryings` (`chunk_avboit_unlit_varyings`) can be linked
|
|
43
|
+
* with it.
|
|
44
|
+
*
|
|
45
|
+
* Per fragment: nothing at all if it has faded out (the unlit splat recorded nothing for it either),
|
|
46
|
+
* then the transmittance of everything in front from the integral texture — a fragment the volume
|
|
47
|
+
* already calls extinct is discarded unshaded — the volumetric fog at its depth, and the accumulators
|
|
48
|
+
* through `avboit_premultiplied_contribution`, the routing every side channel shares.
|
|
49
|
+
*
|
|
50
|
+
* The colour is straight alpha and unlit: it is premultiplied here and never emits — a fragment that
|
|
51
|
+
* can get past the first test covers something — so {@link avboit_unlit_draw_pipeline} does not write
|
|
52
|
+
* the emission target at all rather than blend zeros into it over every covered pixel.
|
|
53
|
+
*
|
|
54
|
+
* The enclosing shader binds {@link AVBOIT_UNLIT_DRAW_PASS_GROUP} and names its vertex entry point
|
|
55
|
+
* anything but `fs_main`.
|
|
56
|
+
*
|
|
57
|
+
* @type {CodeChunk}
|
|
58
|
+
*/
|
|
59
|
+
export const chunk_avboit_unlit_draw_fragment = CodeChunk.from(
|
|
60
|
+
//language=WGSL
|
|
61
|
+
`
|
|
62
|
+
struct AVBOITUnlitDrawOutput {
|
|
63
|
+
@location(0) color : vec4<f32>,
|
|
64
|
+
@location(1) norm : vec4<f32>,
|
|
65
|
+
@location(2) extinction : vec4<f32>,
|
|
66
|
+
@location(3) emission : vec4<f32>,
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@fragment
|
|
70
|
+
fn fs_main(fragment : AVBOITUnlitVaryings) -> AVBOITUnlitDrawOutput {
|
|
71
|
+
// a ribbon seen at an angle runs through depth across a voxel; see avboit_footprint_bias. Taken
|
|
72
|
+
// first, in uniform control flow
|
|
73
|
+
let footprint = avboit_footprint_bias(&warp, fwidth(avboit_view_depth_to_virtual(&warp, fragment.view_depth)));
|
|
74
|
+
|
|
75
|
+
if (fragment.color.a <= 0.0) {
|
|
76
|
+
// faded out: covers nothing, and straight alpha carries no light without coverage
|
|
77
|
+
discard;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
let screen_uv = fragment.clip.xy / vec2<f32>(f32(view.width), f32(view.height));
|
|
81
|
+
|
|
82
|
+
let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, screen_uv, fragment.view_depth, footprint);
|
|
83
|
+
|
|
84
|
+
if (all(transmittance <= vec3<f32>(${AVBOIT_EXTINCT_TRANSMITTANCE}))) {
|
|
85
|
+
// nothing this fragment contributes survives what is in front of it; skip the shading
|
|
86
|
+
discard;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
let volumetrics = sample_volumetrics(fragment.view_depth, screen_uv, fragment.clip.xy);
|
|
90
|
+
|
|
91
|
+
let premultiplied = vec4<f32>(fragment.color.rgb * fragment.color.a, fragment.color.a);
|
|
92
|
+
|
|
93
|
+
let contribution = avboit_premultiplied_contribution(premultiplied, transmittance, volumetrics);
|
|
94
|
+
|
|
95
|
+
var out : AVBOITUnlitDrawOutput;
|
|
96
|
+
|
|
97
|
+
out.color = contribution.color;
|
|
98
|
+
out.norm = contribution.norm;
|
|
99
|
+
out.extinction = contribution.extinction;
|
|
100
|
+
out.emission = contribution.emission;
|
|
101
|
+
|
|
102
|
+
return out;
|
|
103
|
+
}
|
|
104
|
+
`, [
|
|
105
|
+
chunk_avboit_unlit_varyings,
|
|
106
|
+
chunk_avboit_view_depth_to_virtual,
|
|
107
|
+
chunk_avboit_footprint_bias,
|
|
108
|
+
chunk_avboit_sample_transmittance,
|
|
109
|
+
chunk_sample_volumetrics,
|
|
110
|
+
chunk_avboit_premultiplied_contribution,
|
|
111
|
+
]
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The render pipeline for an unlit draw shader: additive into the accumulators with the emission
|
|
116
|
+
* target masked off, the opaque scene's depth tested and never written, both faces.
|
|
117
|
+
*
|
|
118
|
+
* @param {object} params
|
|
119
|
+
* @param {string} params.label
|
|
120
|
+
* @param {import("../../../shader/resource/ShaderResourceSetDescriptor.js").ShaderResourceSetDescriptor} params.resources
|
|
121
|
+
* the shader's resources; must hold {@link AVBOIT_UNLIT_DRAW_PASS_GROUP}
|
|
122
|
+
* @param {string} params.source the assembled shader, with a vertex entry point named `vs_main` and
|
|
123
|
+
* {@link chunk_avboit_unlit_draw_fragment}'s `fs_main`
|
|
124
|
+
* @returns {RenderPipelineDescriptor}
|
|
125
|
+
*/
|
|
126
|
+
export function avboit_unlit_draw_pipeline({ label, resources, source }) {
|
|
127
|
+
assert.isString(label, "label");
|
|
128
|
+
assert.isString(source, "source");
|
|
129
|
+
assert.notEqual(resources.groups.indexOf(AVBOIT_UNLIT_DRAW_PASS_GROUP), -1, "resources must hold the unlit draw's pass group");
|
|
130
|
+
|
|
131
|
+
return RenderPipelineDescriptor.from({
|
|
132
|
+
label,
|
|
133
|
+
layout: resources.generatePipelineLayout(GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT),
|
|
134
|
+
vertex: { module: { code: source }, entryPoint: "vs_main" },
|
|
135
|
+
fragment: {
|
|
136
|
+
module: { code: source },
|
|
137
|
+
entryPoint: "fs_main",
|
|
138
|
+
// color, norm, extinction — and not emission
|
|
139
|
+
targets: AVBOIT_DRAW_TARGETS.map((target, i) => ({ ...target, writeMask: [0xF, 0xF, 0xF, 0][i] })),
|
|
140
|
+
},
|
|
141
|
+
depthStencil: DepthStencilState.from({ format: "depth32float", depthWriteEnabled: false, depthCompare: "greater" }),
|
|
142
|
+
primitive: { topology: "triangle-list", cullMode: "none" },
|
|
143
|
+
});
|
|
144
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The render pipeline for an unlit splat shader: no depth, one never-written attachment to size the
|
|
3
|
+
* raster ({@link AVBOIT_UNLIT_SPLAT_SAMPLES} samples, not the volume's single-sampled one the meshlet
|
|
4
|
+
* and particle splats share), both faces — a trail is seen from inside and out.
|
|
5
|
+
*
|
|
6
|
+
* The layout is built group by group: the volume's atomics are fragment-only, and WebGPU refuses a
|
|
7
|
+
* read-write storage buffer that is visible to the vertex stage. Every other group is visible to both
|
|
8
|
+
* stages, so a group the shader shares with other pipelines keeps the one layout they all declare.
|
|
9
|
+
*
|
|
10
|
+
* @param {object} params
|
|
11
|
+
* @param {string} params.label
|
|
12
|
+
* @param {import("../../../shader/resource/ShaderResourceSetDescriptor.js").ShaderResourceSetDescriptor} params.resources
|
|
13
|
+
* the shader's resources; must hold {@link AVBOIT_UNLIT_SPLAT_PASS_GROUP} and `AVBOIT_SPLAT_VOLUME_GROUP`
|
|
14
|
+
* @param {string} params.source the assembled shader, with a vertex entry point named `vs_main` and
|
|
15
|
+
* {@link chunk_avboit_unlit_splat_fragment}'s `fs_main`
|
|
16
|
+
* @returns {RenderPipelineDescriptor}
|
|
17
|
+
*/
|
|
18
|
+
export function avboit_unlit_splat_pipeline({ label, resources, source }: {
|
|
19
|
+
label: string;
|
|
20
|
+
resources: import("../../../shader/resource/ShaderResourceSetDescriptor.js").ShaderResourceSetDescriptor;
|
|
21
|
+
source: string;
|
|
22
|
+
}): RenderPipelineDescriptor;
|
|
23
|
+
/**
|
|
24
|
+
* Samples per pixel of the unlit splat's raster, which is what a fragment's extinction is weighted by
|
|
25
|
+
* the share of. Four, being the only count above one that WebGPU guarantees.
|
|
26
|
+
* @type {number}
|
|
27
|
+
*/
|
|
28
|
+
export const AVBOIT_UNLIT_SPLAT_SAMPLES: number;
|
|
29
|
+
/**
|
|
30
|
+
* What the unlit splat reads once per pass: the warp, which places a view depth in the volume.
|
|
31
|
+
*
|
|
32
|
+
* @type {ShaderResourceGroupDescriptor}
|
|
33
|
+
*/
|
|
34
|
+
export const AVBOIT_UNLIT_SPLAT_PASS_GROUP: ShaderResourceGroupDescriptor;
|
|
35
|
+
/**
|
|
36
|
+
* The unlit AVBOIT splat's fragment stage, `fs_main`: unlit straight-alpha geometry — a dynamic mesh,
|
|
37
|
+
* a trail — adding its extinction into the voxel volume through `avboit_splat_slice`, the same write
|
|
38
|
+
* path as the meshlet and particle splats, so a trail, a particle and a surface at one depth pile up in
|
|
39
|
+
* one field. Any vertex stage that hands it `AVBOITUnlitVaryings` (`chunk_avboit_unlit_varyings`) can
|
|
40
|
+
* be linked with it.
|
|
41
|
+
*
|
|
42
|
+
* Coverage is the varyings' alpha through `avboit_coverage` — the function the unlit draw weights the
|
|
43
|
+
* same fragment by — and `T_self = 1 - coverage`, untinted. A fragment that has faded to nothing covers
|
|
44
|
+
* nothing and writes nothing, which on a trail is its whole aged-out tail.
|
|
45
|
+
*
|
|
46
|
+
* **Weighted by the share of the voxel the triangle covers.** A voxel is eight pixels across, and a
|
|
47
|
+
* trail is often narrower than that. Sampled at the voxel's centre alone, a thin trail either crosses
|
|
48
|
+
* the centre and writes its full extinction there or misses it and writes nothing, so its occlusion of
|
|
49
|
+
* what lies behind it comes and goes as it moves by a fraction of a voxel. The raster has
|
|
50
|
+
* {@link AVBOIT_UNLIT_SPLAT_SAMPLES} samples per pixel, the fragment runs wherever any of them is
|
|
51
|
+
* covered, and its extinction is scaled by the covered fraction: the voxel gets the triangle's
|
|
52
|
+
* extinction averaged over its footprint, as a volume that coarse can hold it. The triangles of one
|
|
53
|
+
* mesh cover disjoint samples, so the fractions of the triangles sharing a voxel add up to at most one
|
|
54
|
+
* layer; a fully covered voxel is written exactly as an unweighted splat would write it. What remains
|
|
55
|
+
* is the average's own bias — a trail a fraction of a voxel wide occludes what is behind it by that
|
|
56
|
+
* fraction of its extinction — which holds still as the trail moves.
|
|
57
|
+
*
|
|
58
|
+
* Depth is the fragment's own view depth from the varyings, through curve → warp → physical and the
|
|
59
|
+
* two-slice linear split the other splats make. No depth attachment, for the reason the meshlet splat
|
|
60
|
+
* has none: a splat behind an opaque surface lies deeper than anything the draw will look it up for.
|
|
61
|
+
*
|
|
62
|
+
* The enclosing shader binds {@link AVBOIT_UNLIT_SPLAT_PASS_GROUP} and `AVBOIT_SPLAT_VOLUME_GROUP`,
|
|
63
|
+
* and names its vertex entry point anything but `fs_main`.
|
|
64
|
+
*
|
|
65
|
+
* @type {CodeChunk}
|
|
66
|
+
*/
|
|
67
|
+
export const chunk_avboit_unlit_splat_fragment: CodeChunk;
|
|
68
|
+
import { RenderPipelineDescriptor } from "../../../../descriptor/pipeline/render/RenderPipelineDescriptor.js";
|
|
69
|
+
import { ShaderResourceGroupDescriptor } from "../../../shader/resource/ShaderResourceGroupDescriptor.js";
|
|
70
|
+
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
71
|
+
//# sourceMappingURL=avboit_unlit_splat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avboit_unlit_splat.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_unlit_splat.js"],"names":[],"mappings":"AAwGA;;;;;;;;;;;;;;;;GAgBG;AACH;IAP0B,KAAK,EAApB,MAAM;IACgG,SAAS,EAA/G,OAAO,yDAAyD,EAAE,2BAA2B;IAE9E,MAAM,EAArB,MAAM;IAEJ,wBAAwB,CAgCpC;AAzID;;;;GAIG;AACH,yCAFU,MAAM,CAE4B;AAE5C;;;;GAIG;AACH,4CAFU,6BAA6B,CAE0C;AAKjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,gDAFU,SAAS,CAyCjB;yCApGuC,oEAAoE;8CAG/D,2DAA2D;0BAD/E,uCAAuC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { GPUShaderStage } from "../../../../descriptor/GPUShaderStage.js";
|
|
2
|
+
import { PipelineLayoutDescriptor } from "../../../../descriptor/pipeline/PipelineLayoutDescriptor.js";
|
|
3
|
+
import { RenderPipelineDescriptor } from "../../../../descriptor/pipeline/render/RenderPipelineDescriptor.js";
|
|
4
|
+
import { assert } from "../../../../../core/assert.js";
|
|
5
|
+
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
6
|
+
import { ShaderResourceGroupDescriptor } from "../../../shader/resource/ShaderResourceGroupDescriptor.js";
|
|
7
|
+
import { AVBOIT_WARP_STRUCT } from "./AVBOIT_WARP_STRUCT.js";
|
|
8
|
+
import { chunk_avboit_coverage } from "./chunk_avboit_coverage.js";
|
|
9
|
+
import { chunk_avboit_splat_slice } from "./chunk_avboit_splat_slice.js";
|
|
10
|
+
import { chunk_avboit_transmittance_to_extinction } from "./chunk_avboit_transmittance_to_extinction.js";
|
|
11
|
+
import { chunk_avboit_unlit_varyings } from "./chunk_avboit_unlit_varyings.js";
|
|
12
|
+
import { chunk_avboit_view_depth_to_physical } from "./chunk_avboit_view_depth_to_physical.js";
|
|
13
|
+
import { AVBOIT_SPLAT_DUMMY_FORMAT, AVBOIT_SPLAT_VOLUME_GROUP } from "./shader_avboit_splat.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Samples per pixel of the unlit splat's raster, which is what a fragment's extinction is weighted by
|
|
17
|
+
* the share of. Four, being the only count above one that WebGPU guarantees.
|
|
18
|
+
* @type {number}
|
|
19
|
+
*/
|
|
20
|
+
export const AVBOIT_UNLIT_SPLAT_SAMPLES = 4;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* What the unlit splat reads once per pass: the warp, which places a view depth in the volume.
|
|
24
|
+
*
|
|
25
|
+
* @type {ShaderResourceGroupDescriptor}
|
|
26
|
+
*/
|
|
27
|
+
export const AVBOIT_UNLIT_SPLAT_PASS_GROUP = new ShaderResourceGroupDescriptor();
|
|
28
|
+
|
|
29
|
+
AVBOIT_UNLIT_SPLAT_PASS_GROUP
|
|
30
|
+
.addStorageBuffer("warp", AVBOIT_WARP_STRUCT);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The unlit AVBOIT splat's fragment stage, `fs_main`: unlit straight-alpha geometry — a dynamic mesh,
|
|
34
|
+
* a trail — adding its extinction into the voxel volume through `avboit_splat_slice`, the same write
|
|
35
|
+
* path as the meshlet and particle splats, so a trail, a particle and a surface at one depth pile up in
|
|
36
|
+
* one field. Any vertex stage that hands it `AVBOITUnlitVaryings` (`chunk_avboit_unlit_varyings`) can
|
|
37
|
+
* be linked with it.
|
|
38
|
+
*
|
|
39
|
+
* Coverage is the varyings' alpha through `avboit_coverage` — the function the unlit draw weights the
|
|
40
|
+
* same fragment by — and `T_self = 1 - coverage`, untinted. A fragment that has faded to nothing covers
|
|
41
|
+
* nothing and writes nothing, which on a trail is its whole aged-out tail.
|
|
42
|
+
*
|
|
43
|
+
* **Weighted by the share of the voxel the triangle covers.** A voxel is eight pixels across, and a
|
|
44
|
+
* trail is often narrower than that. Sampled at the voxel's centre alone, a thin trail either crosses
|
|
45
|
+
* the centre and writes its full extinction there or misses it and writes nothing, so its occlusion of
|
|
46
|
+
* what lies behind it comes and goes as it moves by a fraction of a voxel. The raster has
|
|
47
|
+
* {@link AVBOIT_UNLIT_SPLAT_SAMPLES} samples per pixel, the fragment runs wherever any of them is
|
|
48
|
+
* covered, and its extinction is scaled by the covered fraction: the voxel gets the triangle's
|
|
49
|
+
* extinction averaged over its footprint, as a volume that coarse can hold it. The triangles of one
|
|
50
|
+
* mesh cover disjoint samples, so the fractions of the triangles sharing a voxel add up to at most one
|
|
51
|
+
* layer; a fully covered voxel is written exactly as an unweighted splat would write it. What remains
|
|
52
|
+
* is the average's own bias — a trail a fraction of a voxel wide occludes what is behind it by that
|
|
53
|
+
* fraction of its extinction — which holds still as the trail moves.
|
|
54
|
+
*
|
|
55
|
+
* Depth is the fragment's own view depth from the varyings, through curve → warp → physical and the
|
|
56
|
+
* two-slice linear split the other splats make. No depth attachment, for the reason the meshlet splat
|
|
57
|
+
* has none: a splat behind an opaque surface lies deeper than anything the draw will look it up for.
|
|
58
|
+
*
|
|
59
|
+
* The enclosing shader binds {@link AVBOIT_UNLIT_SPLAT_PASS_GROUP} and `AVBOIT_SPLAT_VOLUME_GROUP`,
|
|
60
|
+
* and names its vertex entry point anything but `fs_main`.
|
|
61
|
+
*
|
|
62
|
+
* @type {CodeChunk}
|
|
63
|
+
*/
|
|
64
|
+
export const chunk_avboit_unlit_splat_fragment = CodeChunk.from(
|
|
65
|
+
//language=WGSL
|
|
66
|
+
`
|
|
67
|
+
@fragment
|
|
68
|
+
fn fs_main(fragment : AVBOITUnlitVaryings, @builtin(sample_mask) sample_mask : u32) {
|
|
69
|
+
// the coverage the draw weights this fragment by, through the same function
|
|
70
|
+
let coverage = avboit_coverage(fragment.color.a);
|
|
71
|
+
|
|
72
|
+
if (coverage <= 0.0) {
|
|
73
|
+
// faded out: occludes nothing
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// the share of the voxel's samples this triangle covers
|
|
78
|
+
let footprint = f32(countOneBits(sample_mask)) / ${AVBOIT_UNLIT_SPLAT_SAMPLES}.0;
|
|
79
|
+
|
|
80
|
+
let extinction = avboit_transmittance_to_extinction(vec3<f32>(1.0 - coverage)) * footprint;
|
|
81
|
+
|
|
82
|
+
let p = avboit_view_depth_to_physical(&warp, fragment.view_depth);
|
|
83
|
+
|
|
84
|
+
// fragment.clip is @builtin(position): .xy the low-resolution pixel
|
|
85
|
+
let texel = vec2<u32>(fragment.clip.xy);
|
|
86
|
+
let column = texel.y * warp.voxel_width + texel.x;
|
|
87
|
+
|
|
88
|
+
// linear splat between the two slices around the fragment
|
|
89
|
+
let c = p - 0.5;
|
|
90
|
+
let slice = i32(floor(c));
|
|
91
|
+
let fraction = c - floor(c);
|
|
92
|
+
|
|
93
|
+
avboit_splat_slice(column, slice, extinction * (1.0 - fraction), texel);
|
|
94
|
+
avboit_splat_slice(column, slice + 1, extinction * fraction, texel);
|
|
95
|
+
}
|
|
96
|
+
`, [
|
|
97
|
+
chunk_avboit_unlit_varyings,
|
|
98
|
+
chunk_avboit_coverage,
|
|
99
|
+
chunk_avboit_transmittance_to_extinction,
|
|
100
|
+
chunk_avboit_view_depth_to_physical,
|
|
101
|
+
chunk_avboit_splat_slice,
|
|
102
|
+
]
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The render pipeline for an unlit splat shader: no depth, one never-written attachment to size the
|
|
107
|
+
* raster ({@link AVBOIT_UNLIT_SPLAT_SAMPLES} samples, not the volume's single-sampled one the meshlet
|
|
108
|
+
* and particle splats share), both faces — a trail is seen from inside and out.
|
|
109
|
+
*
|
|
110
|
+
* The layout is built group by group: the volume's atomics are fragment-only, and WebGPU refuses a
|
|
111
|
+
* read-write storage buffer that is visible to the vertex stage. Every other group is visible to both
|
|
112
|
+
* stages, so a group the shader shares with other pipelines keeps the one layout they all declare.
|
|
113
|
+
*
|
|
114
|
+
* @param {object} params
|
|
115
|
+
* @param {string} params.label
|
|
116
|
+
* @param {import("../../../shader/resource/ShaderResourceSetDescriptor.js").ShaderResourceSetDescriptor} params.resources
|
|
117
|
+
* the shader's resources; must hold {@link AVBOIT_UNLIT_SPLAT_PASS_GROUP} and `AVBOIT_SPLAT_VOLUME_GROUP`
|
|
118
|
+
* @param {string} params.source the assembled shader, with a vertex entry point named `vs_main` and
|
|
119
|
+
* {@link chunk_avboit_unlit_splat_fragment}'s `fs_main`
|
|
120
|
+
* @returns {RenderPipelineDescriptor}
|
|
121
|
+
*/
|
|
122
|
+
export function avboit_unlit_splat_pipeline({ label, resources, source }) {
|
|
123
|
+
assert.isString(label, "label");
|
|
124
|
+
assert.isString(source, "source");
|
|
125
|
+
|
|
126
|
+
const groups = resources.groups;
|
|
127
|
+
|
|
128
|
+
assert.notEqual(groups.indexOf(AVBOIT_UNLIT_SPLAT_PASS_GROUP), -1, "resources must hold the unlit splat's pass group");
|
|
129
|
+
assert.notEqual(groups.indexOf(AVBOIT_SPLAT_VOLUME_GROUP), -1, "resources must hold the splat volume group");
|
|
130
|
+
|
|
131
|
+
const layout = PipelineLayoutDescriptor.from(
|
|
132
|
+
groups.map(group => group.generateBindGroupLayoutDescriptor(
|
|
133
|
+
group === AVBOIT_SPLAT_VOLUME_GROUP
|
|
134
|
+
? GPUShaderStage.FRAGMENT
|
|
135
|
+
: GPUShaderStage.VERTEX | GPUShaderStage.FRAGMENT
|
|
136
|
+
)),
|
|
137
|
+
resources.immediateSize
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
return RenderPipelineDescriptor.from({
|
|
141
|
+
label,
|
|
142
|
+
layout,
|
|
143
|
+
vertex: { module: { code: source }, entryPoint: "vs_main" },
|
|
144
|
+
fragment: {
|
|
145
|
+
module: { code: source },
|
|
146
|
+
entryPoint: "fs_main",
|
|
147
|
+
targets: [{ format: AVBOIT_SPLAT_DUMMY_FORMAT, writeMask: 0 }],
|
|
148
|
+
},
|
|
149
|
+
primitive: { topology: "triangle-list", cullMode: "none" },
|
|
150
|
+
multisample: { count: AVBOIT_UNLIT_SPLAT_SAMPLES },
|
|
151
|
+
});
|
|
152
|
+
}
|