@woosh/meep-engine 3.70.0 → 3.71.1
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 +15 -0
- package/MIGRATION_2_TO_3.md +1 -1
- package/package.json +1 -1
- package/src/engine/graphics3/VolumetricLightMapSystem.d.ts +1 -1
- package/src/engine/graphics3/VolumetricLightMapSystem.js +261 -261
- package/src/engine/input/devices/PointerDevice.d.ts +12 -1
- package/src/engine/input/devices/PointerDevice.d.ts.map +1 -1
- package/src/engine/input/devices/PointerDevice.js +266 -24
- package/src/engine/input/devices/mouse/MouseButtons.d.ts +1 -2
- package/src/engine/input/devices/mouse/MouseButtons.d.ts.map +1 -1
- package/src/engine/input/devices/mouse/MouseButtons.js +1 -2
- package/src/engine/input/devices/mouse/mouseButtonToEventButtonsMask.d.ts +13 -0
- package/src/engine/input/devices/mouse/mouseButtonToEventButtonsMask.d.ts.map +1 -0
- package/src/engine/input/devices/mouse/mouseButtonToEventButtonsMask.js +24 -0
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +3 -1
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/sound/simulation/probe/probe_place_sdf_cover.d.ts +1 -2
- package/src/engine/sound/simulation/probe/probe_place_sdf_cover.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/probe_place_sdf_cover.js +1 -2
- package/src/shade/renderer/Renderer.d.ts +0 -12
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +0 -101
- package/src/shade/renderer/ShadeIndirectLightingMode.d.ts +0 -1
- package/src/shade/renderer/ShadeIndirectLightingMode.js +0 -2
- package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.js +7 -0
- package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.js +1 -4
- 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/GPUFluidForcing.d.ts +7 -7
- 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_clipmap/GPUProbeClipmapGI.d.ts +1 -1
- package/src/shade/renderer/light/GPULightCollection.d.ts +3 -2
- package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
- package/src/shade/renderer/light/GPULightCollection.js +28 -2
- package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts +2 -2
- package/src/shade/renderer/light/environment/shader_project_environment_sh.js +2 -2
- package/src/shade/renderer/light/make_sunlight.d.ts +14 -0
- package/src/shade/renderer/light/make_sunlight.d.ts.map +1 -1
- package/src/shade/renderer/light/make_sunlight.js +16 -2
- package/src/shade/renderer/light/model/DirectionalLight.d.ts +9 -0
- package/src/shade/renderer/light/model/DirectionalLight.d.ts.map +1 -1
- package/src/shade/renderer/light/model/DirectionalLight.js +10 -1
- package/src/shade/renderer/light/model/Light.d.ts +4 -2
- package/src/shade/renderer/light/model/Light.d.ts.map +1 -1
- package/src/shade/renderer/light/model/Light.js +4 -2
- package/src/shade/renderer/light/model/io/light_record_directional.d.ts.map +1 -1
- package/src/shade/renderer/light/model/io/light_record_directional.js +3 -0
- package/src/shade/renderer/light/shader_refresh_light_poses.d.ts +16 -1
- package/src/shade/renderer/light/shader_refresh_light_poses.d.ts.map +1 -1
- package/src/shade/renderer/light/shader_refresh_light_poses.js +211 -154
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts +2 -5
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.js +1 -13
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts +2 -9
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.js +2 -38
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts +0 -5
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +0 -16
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.js +3 -10
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts +0 -2
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.js +0 -3
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +0 -6
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +0 -19
- package/src/shade/renderer/scene/Scene.d.ts +1 -7
- package/src/shade/renderer/scene/Scene.d.ts.map +1 -1
- package/src/shade/renderer/scene/Scene.js +1 -8
- package/src/shade/renderer/scene/bvh/sdf_build_from_scene.d.ts.map +1 -0
- package/src/shade/renderer/{global_illumination/lpv/placement/software → scene/bvh}/sdf_build_from_scene.js +6 -6
- package/src/shade/renderer/scene/bvh/sdf_find_local_maxima.d.ts.map +1 -0
- package/src/shade/renderer/{global_illumination/lpv/placement/software → scene/bvh}/sdf_find_local_maxima.js +1 -1
- package/src/shade/renderer/shader/chunk/light/DIRECTIONAL_LIGHT_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/DIRECTIONAL_LIGHT_STRUCT.js +12 -2
- package/src/shade/renderer/shader/chunk/light/io/chunk_point_lights_iterate.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/light/io/chunk_point_lights_iterate.js +1 -1
- package/src/shade/renderer/{global_illumination/probe/octahedral/sample → shader/chunk/light/probe}/chunk_parallax_correct_spherical_probe.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/light/probe/chunk_parallax_correct_spherical_probe.d.ts.map +1 -0
- package/src/shade/renderer/{global_illumination/probe/octahedral/sample → shader/chunk/light/probe}/chunk_parallax_correct_spherical_probe.js +2 -2
- package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.js +1 -1
- package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh2_dering_optimize_positive.d.ts +1 -2
- package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh2_dering_optimize_positive.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh2_dering_optimize_positive.js +1 -2
- package/src/shade/renderer/trails/GPUTrailSystem.d.ts +4 -0
- package/src/shade/renderer/trails/GPUTrailSystem.d.ts.map +1 -1
- package/src/shade/renderer/trails/GPUTrailSystem.js +9 -3
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +1 -3
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +0 -3
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts +2 -2
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.js +2 -2
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +1 -3
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +0 -9
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts +0 -5
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.js +0 -29
- package/src/shade/renderer/volumetrics/irradiance_clipmap/shader_irradiance_clipmap_build.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/shader_irradiance_clipmap_build.js +0 -2
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +11 -6
- 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 +10 -4
- package/src/shade/renderer/water/chunk_water_gi.d.ts +1 -1
- package/src/shade/renderer/water/chunk_water_gi.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_gi.js +1 -3
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
- package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
- package/src/shade/renderer/deferred/indirect/chunk_gi_sample_lpv_cache.d.ts +0 -3
- package/src/shade/renderer/deferred/indirect/chunk_gi_sample_lpv_cache.d.ts.map +0 -1
- package/src/shade/renderer/deferred/indirect/chunk_gi_sample_lpv_cache.js +0 -41
- package/src/shade/renderer/deferred/indirect/chunk_lpv_2d_cache_sample_irradiance.d.ts +0 -6
- package/src/shade/renderer/deferred/indirect/chunk_lpv_2d_cache_sample_irradiance.d.ts.map +0 -1
- package/src/shade/renderer/deferred/indirect/chunk_lpv_2d_cache_sample_irradiance.js +0 -108
- package/src/shade/renderer/deferred/indirect/chunk_lpv_sample_light.d.ts +0 -6
- package/src/shade/renderer/deferred/indirect/chunk_lpv_sample_light.d.ts.map +0 -1
- package/src/shade/renderer/deferred/indirect/chunk_lpv_sample_light.js +0 -100
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts +0 -51
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.js +0 -384
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_STRUCT.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_STRUCT.js +0 -20
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_VOLUME_METADATA_STRUCT.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_VOLUME_METADATA_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_VOLUME_METADATA_STRUCT.js +0 -10
- package/src/shade/renderer/global_illumination/lpv/LightProbeVolume.d.ts +0 -63
- package/src/shade/renderer/global_illumination/lpv/LightProbeVolume.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/LightProbeVolume.js +0 -177
- package/src/shade/renderer/global_illumination/lpv/TETRAHEDRAL_MESH_CELL_STRUCT.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/TETRAHEDRAL_MESH_CELL_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/TETRAHEDRAL_MESH_CELL_STRUCT.js +0 -7
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.d.ts +0 -68
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.js +0 -410
- package/src/shade/renderer/global_illumination/lpv/bake/PROBE_RAYS_PER_WORKGROUP.d.ts +0 -2
- package/src/shade/renderer/global_illumination/lpv/bake/PROBE_RAYS_PER_WORKGROUP.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/bake/PROBE_RAYS_PER_WORKGROUP.js +0 -1
- package/src/shade/renderer/global_illumination/lpv/debug/shader_visualize_probe_depth.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/debug/shader_visualize_probe_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/debug/shader_visualize_probe_depth.js +0 -38
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_RESOLUTION.d.ts +0 -8
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_RESOLUTION.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_RESOLUTION.js +0 -7
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_STRUCT.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_STRUCT.js +0 -8
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.js +0 -48
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_coordinate_to_address.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_coordinate_to_address.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_coordinate_to_address.js +0 -11
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_get_pixel.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_get_pixel.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_get_pixel.js +0 -20
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.d.ts +0 -5
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.js +0 -206
- package/src/shade/renderer/global_illumination/lpv/edit/AddProbeAction.d.ts +0 -14
- package/src/shade/renderer/global_illumination/lpv/edit/AddProbeAction.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/edit/AddProbeAction.js +0 -39
- package/src/shade/renderer/global_illumination/lpv/graph_bake_irradiance_lookup_2d.d.ts +0 -16
- package/src/shade/renderer/global_illumination/lpv/graph_bake_irradiance_lookup_2d.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/graph_bake_irradiance_lookup_2d.js +0 -201
- package/src/shade/renderer/global_illumination/lpv/lpv_jitter_points.d.ts +0 -10
- package/src/shade/renderer/global_illumination/lpv/lpv_jitter_points.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/lpv_jitter_points.js +0 -27
- package/src/shade/renderer/global_illumination/lpv/lpv_visualise_probes.d.ts +0 -18
- package/src/shade/renderer/global_illumination/lpv/lpv_visualise_probes.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/lpv_visualise_probes.js +0 -265
- package/src/shade/renderer/global_illumination/lpv/placement/chunk_refine_probe_placement.d.ts +0 -7
- package/src/shade/renderer/global_illumination/lpv/placement/chunk_refine_probe_placement.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/placement/chunk_refine_probe_placement.js +0 -126
- package/src/shade/renderer/global_illumination/lpv/placement/graph_generate_probe_locations.d.ts +0 -13
- package/src/shade/renderer/global_illumination/lpv/placement/graph_generate_probe_locations.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/placement/graph_generate_probe_locations.js +0 -373
- package/src/shade/renderer/global_illumination/lpv/placement/software/lpv_generate_probe_locations2.d.ts +0 -14
- package/src/shade/renderer/global_illumination/lpv/placement/software/lpv_generate_probe_locations2.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/placement/software/lpv_generate_probe_locations2.js +0 -225
- package/src/shade/renderer/global_illumination/lpv/placement/software/sdf_build_from_scene.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/placement/software/sdf_find_local_maxima.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/shader_diffuse_LPV.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/shader_diffuse_LPV.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/shader_diffuse_LPV.js +0 -91
- package/src/shade/renderer/global_illumination/probe/chunk_compute_probe_dering.d.ts +0 -5
- package/src/shade/renderer/global_illumination/probe/chunk_compute_probe_dering.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/chunk_compute_probe_dering.js +0 -45
- package/src/shade/renderer/global_illumination/probe/compute_pipeline_probe_dering.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/compute_pipeline_probe_dering.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/compute_pipeline_probe_dering.js +0 -17
- package/src/shade/renderer/global_illumination/probe/lpv_dering_software.d.ts +0 -6
- package/src/shade/renderer/global_illumination/probe/lpv_dering_software.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/lpv_dering_software.js +0 -21
- package/src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.d.ts +0 -79
- package/src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.js +0 -437
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_ACCUMULATION_PUSH_CONSTANTS.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_ACCUMULATION_PUSH_CONSTANTS.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_ACCUMULATION_PUSH_CONSTANTS.js +0 -14
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_SHADER_RESOURCE_GROUP.d.ts +0 -42
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_SHADER_RESOURCE_GROUP.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_SHADER_RESOURCE_GROUP.js +0 -68
- package/src/shade/renderer/global_illumination/probe/octahedral/ProbeGBufferTypes.d.ts +0 -9
- package/src/shade/renderer/global_illumination/probe/octahedral/ProbeGBufferTypes.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/ProbeGBufferTypes.js +0 -20
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_map_index_to_border.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_map_index_to_border.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_map_index_to_border.js +0 -47
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_paint_borders_body.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_paint_borders_body.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_paint_borders_body.js +0 -55
- package/src/shade/renderer/global_illumination/probe/octahedral/border/graph_lpv_paint_border_depth.d.ts +0 -19
- package/src/shade/renderer/global_illumination/probe/octahedral/border/graph_lpv_paint_border_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/graph_lpv_paint_border_depth.js +0 -85
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_border_read.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_border_read.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_border_read.js +0 -78
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_depth.d.ts +0 -7
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_depth.js +0 -70
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_radiance.d.ts +0 -7
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_radiance.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_radiance.js +0 -20
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/chunk_compute_coefficient_address.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/chunk_compute_coefficient_address.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/chunk_compute_coefficient_address.js +0 -20
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lpv_store_sh.d.ts +0 -19
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lpv_store_sh.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lpv_store_sh.js +0 -128
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lvp_atlas_to_sh.d.ts +0 -22
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lvp_atlas_to_sh.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lvp_atlas_to_sh.js +0 -200
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.d.ts +0 -23
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.js +0 -179
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_lpv_shade.d.ts +0 -13
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_lpv_shade.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_lpv_shade.js +0 -416
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.d.ts +0 -16
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.js +0 -268
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_patch_texel_coord.d.ts +0 -17
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_patch_texel_coord.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_patch_texel_coord.js +0 -38
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_read_patch_texel.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_read_patch_texel.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_read_patch_texel.js +0 -34
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance.js +0 -62
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance_nearest.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance_nearest.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance_nearest.js +0 -37
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_mesh_interpolate_radiance_via_atlas.d.ts +0 -7
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_mesh_interpolate_radiance_via_atlas.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_mesh_interpolate_radiance_via_atlas.js +0 -62
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_radiance_sample_reflection.d.ts +0 -7
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_radiance_sample_reflection.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_radiance_sample_reflection.js +0 -61
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_parallax_correct_spherical_probe.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_parallax_correct_spherical_probe_iterative.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_parallax_correct_spherical_probe_iterative.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_parallax_correct_spherical_probe_iterative.js +0 -80
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_accumulate_depth.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_accumulate_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_accumulate_depth.js +0 -143
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_atlas_write_depth.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_atlas_write_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_atlas_write_depth.js +0 -59
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.js +0 -227
- package/src/shade/renderer/shader/chunk/light/lpv/INVALID_TET_DECLARATION.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/light/lpv/INVALID_TET_DECLARATION.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/INVALID_TET_DECLARATION.js +0 -12
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_interpolate_probe_irradiance8.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_interpolate_probe_irradiance8.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_interpolate_probe_irradiance8.js +0 -37
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_barycentric_coordinates.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_barycentric_coordinates.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_barycentric_coordinates.js +0 -29
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_neighbours.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_neighbours.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_neighbours.js +0 -20
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_vertices.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_vertices.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_vertices.js +0 -22
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe.d.ts +0 -4
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe.js +0 -53
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance.js +0 -48
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance_pre.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance_pre.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance_pre.js +0 -35
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolation_probe_sh.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolation_probe_sh.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolation_probe_sh.js +0 -38
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_lookup_nearest_cell.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_lookup_nearest_cell.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_lookup_nearest_cell.js +0 -67
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_walk_to_tetrahedron.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_walk_to_tetrahedron.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_walk_to_tetrahedron.js +0 -52
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_data.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_data.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_data.js +0 -22
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_position.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_position.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_position.js +0 -17
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance.js +0 -48
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_8.d.ts +0 -9
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_8.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_8.js +0 -126
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_no_depth.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_no_depth.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_no_depth.js +0 -45
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_radiance.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_radiance.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_radiance.js +0 -61
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_sh3_at.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_sh3_at.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_sh3_at.js +0 -33
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.d.ts +0 -4
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.js +0 -161
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_probe_sample_depth_array.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_probe_sample_depth_array.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_probe_sample_depth_array.js +0 -59
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_sample_depth_atlas.d.ts +0 -4
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_sample_depth_atlas.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_sample_depth_atlas.js +0 -97
- /package/src/shade/renderer/{global_illumination/lpv/placement/software → scene/bvh}/sdf_build_from_scene.d.ts +0 -0
- /package/src/shade/renderer/{global_illumination/lpv/placement/software → scene/bvh}/sdf_find_local_maxima.d.ts +0 -0
|
@@ -1,154 +1,211 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
});
|
|
1
|
+
import { ATMOSPHERE_PARAMETERS_STRUCT } from "../atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.js";
|
|
2
|
+
import { chunk_sample_transmittance_lut_params_for } from "../atmosphere/chunk_sample_transmittance_lut.js";
|
|
3
|
+
import { SKY_LUT_SAMPLER_RESOURCE, SKY_LUT_TRANSMITTANCE_RESOURCE } from "../atmosphere/SAMPLER_SKY_LUT.js";
|
|
4
|
+
import { f32, u32 } from "../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
5
|
+
import { WebGPUArray } from "../shader/type/WebGPUArray.js";
|
|
6
|
+
import { WebGPUStruct } from "../shader/type/WebGPUStruct.js";
|
|
7
|
+
import { CodeChunk } from "../shader/compiler/CodeChunk.js";
|
|
8
|
+
import { COMPUTE_SHADER_DEFAULT_GROUP_SIZE } from "../shader/COMPUTE_SHADER_DEFAULT_GROUP_SIZE.js";
|
|
9
|
+
import { ComputeShader } from "../shader/ComputeShader.js";
|
|
10
|
+
import { ShaderResourceSetDescriptor } from "../shader/resource/ShaderResourceSetDescriptor.js";
|
|
11
|
+
import { chunk_scene_database_access } from "../scene/chunk_scene_database_access.js";
|
|
12
|
+
import { LIGHT_DATABASE_SPEC } from "./LIGHT_DATABASE_SPEC.js";
|
|
13
|
+
|
|
14
|
+
export const REFRESH_LIGHT_POSES_WORKGROUP_SIZE = COMPUTE_SHADER_DEFAULT_GROUP_SIZE;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Which light table a workgroup along `y` of the dispatch walks.
|
|
18
|
+
*
|
|
19
|
+
* @readonly
|
|
20
|
+
* @enum {number}
|
|
21
|
+
*/
|
|
22
|
+
export const REFRESH_LIGHT_POSES_TABLE = Object.freeze({
|
|
23
|
+
POINT: 0,
|
|
24
|
+
SPOT: 1,
|
|
25
|
+
DIRECTIONAL: 2,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/** The dispatch is three tables wide. */
|
|
29
|
+
export const REFRESH_LIGHT_POSES_TABLE_COUNT = 3;
|
|
30
|
+
|
|
31
|
+
const POINT = LIGHT_DATABASE_SPEC.get('light_point');
|
|
32
|
+
const SPOT = LIGHT_DATABASE_SPEC.get('light_spot');
|
|
33
|
+
const DIRECTIONAL = LIGHT_DATABASE_SPEC.get('light_directional');
|
|
34
|
+
|
|
35
|
+
const WG = REFRESH_LIGHT_POSES_WORKGROUP_SIZE;
|
|
36
|
+
|
|
37
|
+
// read-write iterators over the light tables' pages: the pass writes the pose back into the
|
|
38
|
+
// database it reads the row from, and WGSL will not coerce a `read_write` pointer down to `read`
|
|
39
|
+
const PG_POINT = POINT.page_iterator_symbol_prefix(WG, true);
|
|
40
|
+
const PG_SPOT = SPOT.page_iterator_symbol_prefix(WG, true);
|
|
41
|
+
const PG_DIRECTIONAL = DIRECTIONAL.page_iterator_symbol_prefix(WG, true);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The atmosphere a directional light is seen through.
|
|
45
|
+
*/
|
|
46
|
+
export const REFRESH_LIGHT_POSES_SETTINGS = WebGPUStruct.from({
|
|
47
|
+
/**
|
|
48
|
+
* {@link SceneAtmosphere#reference_altitude}, in metres: where the scene stands in the
|
|
49
|
+
* atmosphere, the same point the sky's light on the scene is taken at.
|
|
50
|
+
*/
|
|
51
|
+
reference_altitude: f32,
|
|
52
|
+
/**
|
|
53
|
+
* `1` while {@link SceneAtmosphere#enabled}; `0` leaves a directional light as authored.
|
|
54
|
+
*/
|
|
55
|
+
atmosphere_enabled: u32,
|
|
56
|
+
}, "RefreshLightPosesSettings");
|
|
57
|
+
|
|
58
|
+
const resources = new ShaderResourceSetDescriptor();
|
|
59
|
+
|
|
60
|
+
resources.setImmediate("settings", REFRESH_LIGHT_POSES_SETTINGS);
|
|
61
|
+
|
|
62
|
+
resources.createGroup()
|
|
63
|
+
.addStorageBuffer('scene_database', WebGPUArray.from(u32), false)
|
|
64
|
+
.addStorageBuffer('light_database', WebGPUArray.from(u32), true)
|
|
65
|
+
.addUniform('atmosphere', ATMOSPHERE_PARAMETERS_STRUCT)
|
|
66
|
+
.add(SKY_LUT_TRANSMITTANCE_RESOURCE)
|
|
67
|
+
.add(SKY_LUT_SAMPLER_RESOURCE);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Write every light record's pose from the `transforms` row it names — after the hierarchy pass
|
|
71
|
+
* has composed that row's `global` — and, for a directional light, the colour that reaches the
|
|
72
|
+
* scene from that direction.
|
|
73
|
+
*
|
|
74
|
+
* **This is what makes a light's pose the GPU's.** A light is an entity, and its record's `node`
|
|
75
|
+
* is that entity's row. The row's `global` is composed on the GPU from its TRS and its parent
|
|
76
|
+
* chain, and once an ancestor can be GPU-driven — a torch in an animated hand — nothing on the
|
|
77
|
+
* CPU holds the world transform the record would need. So the pose is taken where the transform
|
|
78
|
+
* is: a point light's `position` is the row's translation, a directional light's `direction` is
|
|
79
|
+
* the row's +Z, a spot light's both; once per light per frame, over each table's pages rather
|
|
80
|
+
* than over `[0, count)`, because rows are addresses and a live one can sit above any number of
|
|
81
|
+
* holes.
|
|
82
|
+
*
|
|
83
|
+
* The CPU still writes the same fields when it builds a record, from the entity's own transform
|
|
84
|
+
* — exact for an entity the CPU composes, and what a pass that runs before this one in a frame
|
|
85
|
+
* reads. This pass is what makes them right for the entity the CPU does not compose, and it runs
|
|
86
|
+
* every frame because the hierarchy pass does.
|
|
87
|
+
*
|
|
88
|
+
* **A directional light is authored as it is above the air.** It stands at infinity, so with the
|
|
89
|
+
* scene's atmosphere enabled what reaches the scene is the light through the whole atmosphere
|
|
90
|
+
* toward it: its `color_above_atmosphere` times the transmittance LUT, read at the scene's
|
|
91
|
+
* reference altitude for the direction just written. That goes into `color`, which every
|
|
92
|
+
* consumer shading a surface reads, so a sun near the horizon dims and reddens, and one below it
|
|
93
|
+
* is black, from its direction alone. One value per light for the whole scene, as the sky's light
|
|
94
|
+
* on the scene is one map taken at that same altitude. The CPU's `color` is the light undimmed.
|
|
95
|
+
* With the atmosphere disabled `color` is `color_above_atmosphere`.
|
|
96
|
+
*
|
|
97
|
+
* Runs after the hierarchy pass and before anything reads a light. The dispatch is
|
|
98
|
+
* {@link REFRESH_LIGHT_POSES_TABLE_COUNT} workgroups wide along `y`, one table each, and along
|
|
99
|
+
* `x` as many as the widest table's {@link GPUTypedTable#dispatch_group_count} at
|
|
100
|
+
* {@link REFRESH_LIGHT_POSES_WORKGROUP_SIZE}; a workgroup past a table's pages bails at setup.
|
|
101
|
+
*/
|
|
102
|
+
export const shader_refresh_light_poses = ComputeShader.from({
|
|
103
|
+
label: "Light/RefreshPoses",
|
|
104
|
+
body: CodeChunk.from(
|
|
105
|
+
//language=WGSL
|
|
106
|
+
`
|
|
107
|
+
fn light_row_position(node: u32) -> vec3<f32> {
|
|
108
|
+
let xf = scene_read_node(&scene_database, node).global;
|
|
109
|
+
|
|
110
|
+
return (xf * vec4<f32>(0.0, 0.0, 0.0, 1.0)).xyz;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// the engine's convention: a light shines along its +Z
|
|
114
|
+
fn light_row_direction(node: u32) -> vec3<f32> {
|
|
115
|
+
let xf = scene_read_node(&scene_database, node).global;
|
|
116
|
+
|
|
117
|
+
return normalize((xf * vec4<f32>(0.0, 0.0, 1.0, 0.0)).xyz);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// What of a light at infinity, shining along direction, gets through the atmosphere to the
|
|
121
|
+
// scene's reference altitude. The light stands at -direction, and up there is +Y.
|
|
122
|
+
fn light_atmosphere_transmittance(direction: vec3<f32>) -> vec3<f32> {
|
|
123
|
+
if settings.atmosphere_enabled == 0u {
|
|
124
|
+
return vec3<f32>(1.0);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return sample_transmittance_lut_params_for(
|
|
128
|
+
atmosphere,
|
|
129
|
+
atmosphere_clamped_height_for(atmosphere, settings.reference_altitude),
|
|
130
|
+
-direction.y
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@compute @workgroup_size(${WG},1,1)
|
|
135
|
+
fn main(
|
|
136
|
+
@builtin(workgroup_id) wg_id: vec3<u32>,
|
|
137
|
+
@builtin(local_invocation_index) local_id: u32,
|
|
138
|
+
) {
|
|
139
|
+
// wg_id is uniform across the workgroup, and so is every branch below
|
|
140
|
+
if wg_id.y == ${REFRESH_LIGHT_POSES_TABLE.POINT}u {
|
|
141
|
+
if !${PG_POINT}_setup(&light_database, wg_id.x, local_id) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
let slot = ${PG_POINT}_slot_in_page(local_id);
|
|
146
|
+
|
|
147
|
+
if slot >= ${PG_POINT}_ELEMENTS_PER_PAGE || !${PG_POINT}_is_occupied(slot) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
let index = ${PG_POINT}_slot_to_index(slot);
|
|
152
|
+
let light = ${POINT.marshalling_method_read_rw}(&light_database, index);
|
|
153
|
+
|
|
154
|
+
${POINT.marshalling_method_write_field('position')}(&light_database, index, light_row_position(light.node));
|
|
155
|
+
} else if wg_id.y == ${REFRESH_LIGHT_POSES_TABLE.SPOT}u {
|
|
156
|
+
if !${PG_SPOT}_setup(&light_database, wg_id.x, local_id) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
let slot = ${PG_SPOT}_slot_in_page(local_id);
|
|
161
|
+
|
|
162
|
+
if slot >= ${PG_SPOT}_ELEMENTS_PER_PAGE || !${PG_SPOT}_is_occupied(slot) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
let index = ${PG_SPOT}_slot_to_index(slot);
|
|
167
|
+
let light = ${SPOT.marshalling_method_read_rw}(&light_database, index);
|
|
168
|
+
|
|
169
|
+
${SPOT.marshalling_method_write_field('position')}(&light_database, index, light_row_position(light.node));
|
|
170
|
+
${SPOT.marshalling_method_write_field('direction')}(&light_database, index, light_row_direction(light.node));
|
|
171
|
+
} else {
|
|
172
|
+
if !${PG_DIRECTIONAL}_setup(&light_database, wg_id.x, local_id) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
let slot = ${PG_DIRECTIONAL}_slot_in_page(local_id);
|
|
177
|
+
|
|
178
|
+
if slot >= ${PG_DIRECTIONAL}_ELEMENTS_PER_PAGE || !${PG_DIRECTIONAL}_is_occupied(slot) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
let index = ${PG_DIRECTIONAL}_slot_to_index(slot);
|
|
183
|
+
let light = ${DIRECTIONAL.marshalling_method_read_rw}(&light_database, index);
|
|
184
|
+
|
|
185
|
+
let direction = light_row_direction(light.node);
|
|
186
|
+
|
|
187
|
+
${DIRECTIONAL.marshalling_method_write_field('direction')}(&light_database, index, direction);
|
|
188
|
+
${DIRECTIONAL.marshalling_method_write_field('color')}(
|
|
189
|
+
&light_database,
|
|
190
|
+
index,
|
|
191
|
+
light.color_above_atmosphere * light_atmosphere_transmittance(direction)
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
`, [
|
|
196
|
+
chunk_scene_database_access,
|
|
197
|
+
POINT.chunk_iterate(WG, true),
|
|
198
|
+
SPOT.chunk_iterate(WG, true),
|
|
199
|
+
DIRECTIONAL.chunk_iterate(WG, true),
|
|
200
|
+
POINT.chunk_read_rw,
|
|
201
|
+
SPOT.chunk_read_rw,
|
|
202
|
+
DIRECTIONAL.chunk_read_rw,
|
|
203
|
+
POINT.wgsl_gen_write_field_code('position'),
|
|
204
|
+
SPOT.wgsl_gen_write_field_code('position'),
|
|
205
|
+
SPOT.wgsl_gen_write_field_code('direction'),
|
|
206
|
+
DIRECTIONAL.wgsl_gen_write_field_code('direction'),
|
|
207
|
+
DIRECTIONAL.wgsl_gen_write_field_code('color'),
|
|
208
|
+
chunk_sample_transmittance_lut_params_for,
|
|
209
|
+
]),
|
|
210
|
+
resources,
|
|
211
|
+
});
|
|
@@ -13,7 +13,7 @@ export class TinyGltf {
|
|
|
13
13
|
* @readonly
|
|
14
14
|
* @type {TextureFormat}
|
|
15
15
|
*/
|
|
16
|
-
static readonly "__#
|
|
16
|
+
static readonly "__#309@#UNCOMPRESSED_TARGET": TextureFormat;
|
|
17
17
|
/**
|
|
18
18
|
* @param {AssetManager} assetManager
|
|
19
19
|
* @param {AssetRequestScope} [scope]
|
|
@@ -51,7 +51,7 @@ export class NSS {
|
|
|
51
51
|
* @returns {number}
|
|
52
52
|
*/
|
|
53
53
|
static recommended_jitter_sequence_size(upscale_ratio: number): number;
|
|
54
|
-
static "__#
|
|
54
|
+
static "__#217@#preprocess_tensor_descriptor"(render_w: any, render_h: any): TextureResourceDescriptor;
|
|
55
55
|
/**
|
|
56
56
|
* @param {GraphicsContext} graphics
|
|
57
57
|
*/
|
|
@@ -51,9 +51,7 @@ export class SSR {
|
|
|
51
51
|
* @param {ShaderSwitchSet} [options.shader_switches] the renderer's; the resolve is built for them, and
|
|
52
52
|
* falls back to the indirect lighting they say where the trace finds nothing
|
|
53
53
|
* @param {import("../../global_illumination/brick4/Brick4LightMap.js").Brick4LightMap} [options.brick4] the scene's,
|
|
54
|
-
* while Brick4 runs
|
|
55
|
-
* @param {import("../../global_illumination/lpv/GPULightProbeVolume.js").GPULightProbeVolume} [options.lpv] the
|
|
56
|
-
* scene's, while LPV runs. A source not given is the resolve's default, for a variant that does not read it
|
|
54
|
+
* while Brick4 runs. A source not given is the resolve's default, for a variant that does not read it
|
|
57
55
|
* @param {number} [options.input_indirect_diffuse] the deferred pass's indirect diffuse, irradiance with AO in,
|
|
58
56
|
* while the probe clipmap runs: its bounce at a hit reads the hit's texel. Recorded before this pass
|
|
59
57
|
* @param {import("../../global_illumination/probe_clipmap/GPUProbeClipmapGI.js").GPUProbeClipmapGI} options.probes
|
|
@@ -63,7 +61,7 @@ export class SSR {
|
|
|
63
61
|
* @param {number} [options.mip] Higher mip = lower resolution trace
|
|
64
62
|
* @returns {{final:number, trace:number, reflections:number, denoised:number, denoised_1:number, denoise_tiles:number}}
|
|
65
63
|
*/
|
|
66
|
-
graph_pass({ graph, input_depth, input_depth_previous, view_ctx, jitter, input_hzb, input_scene_color, input_pbr, input_normal, input_velocity, input_occlusion, input_albedo, resolution, camera_current, camera_previous, input_environment, shader_switches,
|
|
64
|
+
graph_pass({ graph, input_depth, input_depth_previous, view_ctx, jitter, input_hzb, input_scene_color, input_pbr, input_normal, input_velocity, input_occlusion, input_albedo, resolution, camera_current, camera_previous, input_environment, shader_switches, brick4, input_indirect_diffuse, probes, mip, }: {
|
|
67
65
|
graph: import("../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
|
|
68
66
|
input_depth: number;
|
|
69
67
|
input_depth_previous?: number;
|
|
@@ -80,7 +78,6 @@ export class SSR {
|
|
|
80
78
|
camera_previous: number;
|
|
81
79
|
shader_switches?: ShaderSwitchSet;
|
|
82
80
|
brick4?: import("../../global_illumination/brick4/Brick4LightMap.js").Brick4LightMap;
|
|
83
|
-
lpv?: import("../../global_illumination/lpv/GPULightProbeVolume.js").GPULightProbeVolume;
|
|
84
81
|
input_indirect_diffuse?: number;
|
|
85
82
|
probes: import("../../global_illumination/probe_clipmap/GPUProbeClipmapGI.js").GPUProbeClipmapGI;
|
|
86
83
|
view_ctx?: import("../../view/GPUViewContext.js").GPUViewContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSR.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/ssr/SSR.js"],"names":[],"mappings":"AAiBA;IA6EI;;;OAGG;IACH,sBAFW,OAAO,0BAA0B,EAAE,eAAe,EAkB5D;IA1ED,oBAAgB;IAWhB,2CAMC;IAZD;;;;OAIG;IACH,sCAAqE;IAoCrE,kCAMC;IAZD;;;;OAIG;IACH,6BAAmD;IAxBnD,8CAOC;IATD,iGAAiG;IACjG,yCAA2E;IAY3E,qCAMC;IARD,qCAAqC;IACrC,gCAA2D;IA6C3D;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAUhB;IAED
|
|
1
|
+
{"version":3,"file":"SSR.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/ssr/SSR.js"],"names":[],"mappings":"AAiBA;IA6EI;;;OAGG;IACH,sBAFW,OAAO,0BAA0B,EAAE,eAAe,EAkB5D;IA1ED,oBAAgB;IAWhB,2CAMC;IAZD;;;;OAIG;IACH,sCAAqE;IAoCrE,kCAMC;IAZD;;;;OAIG;IACH,6BAAmD;IAxBnD,8CAOC;IATD,iGAAiG;IACjG,yCAA2E;IAY3E,qCAMC;IARD,qCAAqC;IACrC,gCAA2D;IA6C3D;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAUhB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH;QA3BsG,KAAK,EAAhG,OAAO,8DAA8D,EAAE,UAAU;QACjE,WAAW,EAA3B,MAAM;QACW,oBAAoB,GAArC,MAAM;QACU,SAAS,EAAzB,MAAM;QACU,iBAAiB,EAAjC,MAAM;QACU,YAAY,EAA5B,MAAM;QACU,SAAS,EAAzB,MAAM;QACU,YAAY,EAA5B,MAAM;QACU,cAAc,EAA9B,MAAM;QACU,eAAe,EAA/B,MAAM;QACU,iBAAiB,EAAjC,MAAM;QACqB,UAAU,EAArC,UAAU,MAAM,CAAC;QACD,cAAc,EAA9B,MAAM;QACU,eAAe,EAA/B,MAAM;QACoB,eAAe,GAAzC,eAAe;QAEuE,MAAM,GAA5F,OAAO,oDAAoD,EAAE,cAAc;QAE1D,sBAAsB,GAAvC,MAAM;QAE4F,MAAM,EAAxG,OAAO,8DAA8D,EAAE,iBAAiB;QAExB,QAAQ,GAAxE,OAAO,8BAA8B,EAAE,cAAc;QACzB,MAAM,GAAlC,UAAU,MAAM,CAAC;QACA,GAAG,GAApB,MAAM;QACJ;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,WAAW,EAAC,MAAM,CAAC;QAAC,QAAQ,EAAC,MAAM,CAAC;QAAC,UAAU,EAAC,MAAM,CAAC;QAAC,aAAa,EAAC,MAAM,CAAA;KAAC,CAwQtH;;CACJ;gCAxa+B,0CAA0C"}
|
|
@@ -149,9 +149,7 @@ export class SSR {
|
|
|
149
149
|
* @param {ShaderSwitchSet} [options.shader_switches] the renderer's; the resolve is built for them, and
|
|
150
150
|
* falls back to the indirect lighting they say where the trace finds nothing
|
|
151
151
|
* @param {import("../../global_illumination/brick4/Brick4LightMap.js").Brick4LightMap} [options.brick4] the scene's,
|
|
152
|
-
* while Brick4 runs
|
|
153
|
-
* @param {import("../../global_illumination/lpv/GPULightProbeVolume.js").GPULightProbeVolume} [options.lpv] the
|
|
154
|
-
* scene's, while LPV runs. A source not given is the resolve's default, for a variant that does not read it
|
|
152
|
+
* while Brick4 runs. A source not given is the resolve's default, for a variant that does not read it
|
|
155
153
|
* @param {number} [options.input_indirect_diffuse] the deferred pass's indirect diffuse, irradiance with AO in,
|
|
156
154
|
* while the probe clipmap runs: its bounce at a hit reads the hit's texel. Recorded before this pass
|
|
157
155
|
* @param {import("../../global_illumination/probe_clipmap/GPUProbeClipmapGI.js").GPUProbeClipmapGI} options.probes
|
|
@@ -179,7 +177,6 @@ export class SSR {
|
|
|
179
177
|
camera_previous,
|
|
180
178
|
input_environment,
|
|
181
179
|
shader_switches = ShaderSwitchSet.EMPTY,
|
|
182
|
-
lpv,
|
|
183
180
|
brick4,
|
|
184
181
|
input_indirect_diffuse,
|
|
185
182
|
probes,
|
|
@@ -286,15 +283,6 @@ export class SSR {
|
|
|
286
283
|
resolve_inputs.brick4 = brick4.buffer;
|
|
287
284
|
}
|
|
288
285
|
|
|
289
|
-
if (lpv !== undefined) {
|
|
290
|
-
resolve_inputs.lpv_lookup = lpv.buffer_mesh_bvh;
|
|
291
|
-
resolve_inputs.lpv_metadata = lpv.buffer_metadata;
|
|
292
|
-
resolve_inputs.lpv_mesh = lpv.buffer_mesh;
|
|
293
|
-
resolve_inputs.lpv_probes = lpv.buffer_probes;
|
|
294
|
-
resolve_inputs.lpv_atlas_radiance = lpv.atlas.texture_radiance;
|
|
295
|
-
resolve_inputs.lpv_atlas_depth = lpv.atlas.texture_depth;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
286
|
if (input_indirect_diffuse !== undefined) {
|
|
299
287
|
assert.isNonNegativeInteger(input_indirect_diffuse, 'input_indirect_diffuse');
|
|
300
288
|
|
|
@@ -10,13 +10,6 @@ export const SSR_INDIRECT_DIFFUSE_RESOURCE: ShaderResourceDescriptor;
|
|
|
10
10
|
* @type {CodeChunk}
|
|
11
11
|
*/
|
|
12
12
|
export const chunk_ssr_add_hit_irradiance_none: CodeChunk;
|
|
13
|
-
/**
|
|
14
|
-
* {@link chunk_ssr_add_hit_irradiance} from the light probe volume: the diffuse light the volume says
|
|
15
|
-
* the hit surface receives, reflected by its albedo. Reads the LPV's buffers and atlas, `tAlbedoAO`
|
|
16
|
-
* and `camera`.
|
|
17
|
-
* @type {CodeChunk}
|
|
18
|
-
*/
|
|
19
|
-
export const chunk_ssr_add_hit_irradiance_lpv: CodeChunk;
|
|
20
13
|
/**
|
|
21
14
|
* {@link chunk_ssr_add_hit_irradiance} from the probe clipmap (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.5): the
|
|
22
15
|
* light the deferred pass gave the hit's own texel, reflected by its albedo, so a reflection shows the
|
|
@@ -29,8 +22,8 @@ export const chunk_ssr_add_hit_irradiance_lpv: CodeChunk;
|
|
|
29
22
|
export const chunk_ssr_add_hit_irradiance_probe_clipmap: CodeChunk;
|
|
30
23
|
/**
|
|
31
24
|
* The indirect light SSR's resolve adds to an on-screen hit, by the renderer's indirect lighting mode
|
|
32
|
-
* ({@link INDIRECT_LIGHTING}): one diffuse bounce, from the
|
|
33
|
-
*
|
|
25
|
+
* ({@link INDIRECT_LIGHTING}): one diffuse bounce, from the deferred pass's indirect diffuse at the hit
|
|
26
|
+
* under the probe clipmap; nothing under the others.
|
|
34
27
|
*
|
|
35
28
|
* ```wgsl
|
|
36
29
|
* fn ssr_add_hit_irradiance(result: ptr<function, vec3f>, confidence, position_ws, hit_position_vs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_ssr_add_hit_irradiance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_ssr_add_hit_irradiance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,4CAFU,wBAAwB,CAQhC;AAEF;;;GAGG;AACH,gDAFU,SAAS,CAcR;AAEX;;;;;;;;GAQG;AACH,yDAFU,SAAS,CAsBZ;AAKP;;;;;;;;;;;GAWG;AACH,2CAFU,eAAe,CAE2D;yCAjF3C,sDAAsD;0BAJrE,uCAAuC;gCACjC,6CAA6C"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { INDIRECT_LIGHTING } from "../../../INDIRECT_LIGHTING.js";
|
|
2
2
|
import { ShadeIndirectLightingMode } from "../../../ShadeIndirectLightingMode.js";
|
|
3
3
|
import { chunk_v3_matrix4_project } from "../../../shader/chunk/geometry/vec3/chunk_v3_matrix4_project.js";
|
|
4
|
-
import { chunk_lpv_sample_irradiance } from "../../../shader/chunk/light/lpv/chunk_lpv_sample_irradiance.js";
|
|
5
4
|
import { RECIPROCAL_PI_DECLARATION } from "../../../shader/chunk/math/RECIPROCAL_PI_DECLARATION.js";
|
|
6
5
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
7
6
|
import { CodeChunkChoice } from "../../../shader/compiler/CodeChunkChoice.js";
|
|
@@ -42,40 +41,6 @@ fn ssr_add_hit_irradiance(
|
|
|
42
41
|
}
|
|
43
42
|
`, []);
|
|
44
43
|
|
|
45
|
-
/**
|
|
46
|
-
* {@link chunk_ssr_add_hit_irradiance} from the light probe volume: the diffuse light the volume says
|
|
47
|
-
* the hit surface receives, reflected by its albedo. Reads the LPV's buffers and atlas, `tAlbedoAO`
|
|
48
|
-
* and `camera`.
|
|
49
|
-
* @type {CodeChunk}
|
|
50
|
-
*/
|
|
51
|
-
export const chunk_ssr_add_hit_irradiance_lpv = CodeChunk.from(
|
|
52
|
-
//language=WGSL
|
|
53
|
-
`
|
|
54
|
-
fn ssr_add_hit_irradiance(
|
|
55
|
-
result: ptr<function, vec3f>,
|
|
56
|
-
confidence: f32,
|
|
57
|
-
position_ws: vec3f,
|
|
58
|
-
hit_position_vs: vec3f,
|
|
59
|
-
hit_normal_ws: vec3f,
|
|
60
|
-
hit_coord: vec2u,
|
|
61
|
-
) {
|
|
62
|
-
if (confidence > 0.05) {
|
|
63
|
-
let hit_position_ws = v3_matrix4_project(hit_position_vs, camera.view_matrix_inverse);
|
|
64
|
-
let hit_direction_ws = normalize(hit_position_ws - position_ws);
|
|
65
|
-
let hit_irradiance = lpv_sample_irradiance(hit_position_ws, hit_normal_ws, hit_direction_ws);
|
|
66
|
-
let hit_albedo = textureLoad(tAlbedoAO, hit_coord, 0).rgb;
|
|
67
|
-
*result += hit_albedo * hit_irradiance * RECIPROCAL_PI;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
`, [
|
|
71
|
-
chunk_lpv_sample_irradiance,
|
|
72
|
-
chunk_v3_matrix4_project,
|
|
73
|
-
RECIPROCAL_PI_DECLARATION,
|
|
74
|
-
]);
|
|
75
|
-
|
|
76
|
-
chunk_ssr_add_hit_irradiance_lpv.requireResource(CAMERA_RESOURCE);
|
|
77
|
-
chunk_ssr_add_hit_irradiance_lpv.requireResource(GBUFFER_ALBEDO_AO_RESOURCE);
|
|
78
|
-
|
|
79
44
|
/**
|
|
80
45
|
* {@link chunk_ssr_add_hit_irradiance} from the probe clipmap (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.5): the
|
|
81
46
|
* light the deferred pass gave the hit's own texel, reflected by its albedo, so a reflection shows the
|
|
@@ -112,8 +77,8 @@ chunk_ssr_add_hit_irradiance_probe_clipmap.requireResource(GBUFFER_ALBEDO_AO_RES
|
|
|
112
77
|
|
|
113
78
|
/**
|
|
114
79
|
* The indirect light SSR's resolve adds to an on-screen hit, by the renderer's indirect lighting mode
|
|
115
|
-
* ({@link INDIRECT_LIGHTING}): one diffuse bounce, from the
|
|
116
|
-
*
|
|
80
|
+
* ({@link INDIRECT_LIGHTING}): one diffuse bounce, from the deferred pass's indirect diffuse at the hit
|
|
81
|
+
* under the probe clipmap; nothing under the others.
|
|
117
82
|
*
|
|
118
83
|
* ```wgsl
|
|
119
84
|
* fn ssr_add_hit_irradiance(result: ptr<function, vec3f>, confidence, position_ws, hit_position_vs,
|
|
@@ -126,7 +91,6 @@ export const chunk_ssr_add_hit_irradiance = CodeChunkChoice.from(INDIRECT_LIGHTI
|
|
|
126
91
|
|
|
127
92
|
chunk_ssr_add_hit_irradiance.add(ShadeIndirectLightingMode.IBL, chunk_ssr_add_hit_irradiance_none);
|
|
128
93
|
chunk_ssr_add_hit_irradiance.add(ShadeIndirectLightingMode.Brick4, chunk_ssr_add_hit_irradiance_none);
|
|
129
|
-
chunk_ssr_add_hit_irradiance.add(ShadeIndirectLightingMode.LPV, chunk_ssr_add_hit_irradiance_lpv);
|
|
130
94
|
chunk_ssr_add_hit_irradiance.add(ShadeIndirectLightingMode.ProbeClipmap, chunk_ssr_add_hit_irradiance_probe_clipmap);
|
|
131
95
|
// the screen probes light only the deferred opaque surfaces: every other reader takes the world-space probes
|
|
132
96
|
chunk_ssr_add_hit_irradiance.add(ShadeIndirectLightingMode.ScreenProbes, chunk_ssr_add_hit_irradiance_probe_clipmap);
|
|
@@ -9,11 +9,6 @@ export const chunk_ssr_sample_radiance_ibl: CodeChunk;
|
|
|
9
9
|
* @type {CodeChunk}
|
|
10
10
|
*/
|
|
11
11
|
export const chunk_ssr_sample_radiance_brick4: CodeChunk;
|
|
12
|
-
/**
|
|
13
|
-
* {@link chunk_ssr_sample_radiance} from the light probe volume. Reads the LPV's buffers and its atlas.
|
|
14
|
-
* @type {CodeChunk}
|
|
15
|
-
*/
|
|
16
|
-
export const chunk_ssr_sample_radiance_lpv: CodeChunk;
|
|
17
12
|
/**
|
|
18
13
|
* {@link chunk_ssr_sample_radiance} from the probe clipmap (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.5): the probes'
|
|
19
14
|
* specular at the point, picked by its normal and view with STBN at the pixel and the resolve's frame index, as
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_ssr_sample_radiance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_ssr_sample_radiance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js"],"names":[],"mappings":"AAWA;;;GAGG;AACH,4CAFU,SAAS,CAUc;AAEjC;;;;GAIG;AACH,+CAFU,SAAS,CAUoB;AAEvC;;;;;;GAMG;AACH,sDAFU,SAAS,CAiB2E;AAE9F;;;;;;;;;;GAUG;AACH,wCAFU,eAAe,CAEwD;0BAnEvD,uCAAuC;gCACjC,6CAA6C"}
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
} from "../../../global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js";
|
|
6
6
|
import { INDIRECT_LIGHTING } from "../../../INDIRECT_LIGHTING.js";
|
|
7
7
|
import { ShadeIndirectLightingMode } from "../../../ShadeIndirectLightingMode.js";
|
|
8
|
-
import { chunk_lpv_sample_radiance } from "../../../shader/chunk/light/lpv/chunk_lpv_sample_radiance.js";
|
|
9
8
|
import { chunk_stbn_sample_vec2 } from "../../../shader/chunk/noise/chunk_stbn_sample_vec2.js";
|
|
10
9
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
11
10
|
import { CodeChunkChoice } from "../../../shader/compiler/CodeChunkChoice.js";
|
|
@@ -39,20 +38,6 @@ fn ssr_sample_radiance(
|
|
|
39
38
|
}
|
|
40
39
|
`, [chunk_brick4_sample_specular]);
|
|
41
40
|
|
|
42
|
-
/**
|
|
43
|
-
* {@link chunk_ssr_sample_radiance} from the light probe volume. Reads the LPV's buffers and its atlas.
|
|
44
|
-
* @type {CodeChunk}
|
|
45
|
-
*/
|
|
46
|
-
export const chunk_ssr_sample_radiance_lpv = CodeChunk.from(
|
|
47
|
-
//language=WGSL
|
|
48
|
-
`
|
|
49
|
-
fn ssr_sample_radiance(
|
|
50
|
-
position_ws: vec3f, normal_ws: vec3f, view_direction_ws: vec3f, roughness: f32, coord: vec2u,
|
|
51
|
-
) -> vec3f {
|
|
52
|
-
return lpv_sample_radiance(position_ws, normal_ws, view_direction_ws, roughness);
|
|
53
|
-
}
|
|
54
|
-
`, [chunk_lpv_sample_radiance]);
|
|
55
|
-
|
|
56
41
|
/**
|
|
57
42
|
* {@link chunk_ssr_sample_radiance} from the probe clipmap (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.5): the probes'
|
|
58
43
|
* specular at the point, picked by its normal and view with STBN at the pixel and the resolve's frame index, as
|
|
@@ -92,7 +77,6 @@ export const chunk_ssr_sample_radiance = CodeChunkChoice.from(INDIRECT_LIGHTING)
|
|
|
92
77
|
|
|
93
78
|
chunk_ssr_sample_radiance.add(ShadeIndirectLightingMode.IBL, chunk_ssr_sample_radiance_ibl);
|
|
94
79
|
chunk_ssr_sample_radiance.add(ShadeIndirectLightingMode.Brick4, chunk_ssr_sample_radiance_brick4);
|
|
95
|
-
chunk_ssr_sample_radiance.add(ShadeIndirectLightingMode.LPV, chunk_ssr_sample_radiance_lpv);
|
|
96
80
|
chunk_ssr_sample_radiance.add(ShadeIndirectLightingMode.ProbeClipmap, chunk_ssr_sample_radiance_probe_clipmap);
|
|
97
81
|
// the screen probes light only the deferred opaque surfaces: every other reader takes the world-space probes
|
|
98
82
|
chunk_ssr_sample_radiance.add(ShadeIndirectLightingMode.ScreenProbes, chunk_ssr_sample_radiance_probe_clipmap);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssr_resolve_shader.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ssr_resolve_shader.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.js"],"names":[],"mappings":"AAqWA;;;;;;;GAOG;AACH,iCAFU,WAAW,CAgBlB;4BAvWyB,gCAAgC"}
|