@woosh/meep-engine 3.65.0 → 3.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics3/GraphicsEngine.js +4 -9
- package/src/engine/graphics3/load_cube_environment.js +3 -3
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/format/lut/cube/CubeLut.d.ts +38 -0
- package/src/format/lut/cube/CubeLut.d.ts.map +1 -0
- package/src/format/lut/cube/CubeLut.js +23 -0
- package/src/format/lut/cube/cube_read.d.ts +23 -0
- package/src/format/lut/cube/cube_read.d.ts.map +1 -0
- package/src/format/lut/cube/cube_read.js +199 -0
- package/src/format/lut/cube/cube_write.d.ts +15 -0
- package/src/format/lut/cube/cube_write.d.ts.map +1 -0
- package/src/format/lut/cube/cube_write.js +90 -0
- package/src/shade/playground/probe_clipmap/README.md +1 -0
- package/src/shade/playground/probe_clipmap/index.html +48 -0
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +36 -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 +225 -27
- package/src/shade/renderer/ShadeIndirectLightingMode.d.ts +1 -0
- package/src/shade/renderer/ShadeIndirectLightingMode.js +9 -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 +73 -4
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/ColorGrade.js +113 -7
- package/src/shade/renderer/deferred/tonemap/TONEMAP_PURKINJE_SHIFT.d.ts +12 -0
- package/src/shade/renderer/deferred/tonemap/TONEMAP_PURKINJE_SHIFT.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/TONEMAP_PURKINJE_SHIFT.js +12 -0
- package/src/shade/renderer/deferred/tonemap/ToneMapper.d.ts +15 -1
- package/src/shade/renderer/deferred/tonemap/ToneMapper.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/ToneMapper.js +31 -3
- package/src/shade/renderer/deferred/tonemap/chunk_tonemap_purkinje.d.ts +26 -0
- package/src/shade/renderer/deferred/tonemap/chunk_tonemap_purkinje.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/chunk_tonemap_purkinje.js +55 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_lut.d.ts +2 -2
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_lut.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_lut.js +6 -3
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_lut.d.ts +3 -2
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_lut.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_lut.js +7 -3
- 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/GPUFluidForcing.d.ts +6 -6
- 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/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/eye/GPUCameraExposureManager.d.ts +35 -9
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +81 -11
- package/src/shade/renderer/postprocess/eye/shader_autoexposure_adapt.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/eye/shader_autoexposure_adapt.js +4 -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/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/conversion/chunk_CRM_REC709_AP1.d.ts +6 -0
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.js +7 -0
- package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.d.ts +4 -4
- package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.js +86 -5
- package/src/shade/renderer/shader/chunk/color/tonemap/purkinje/chunk_apply_purkinje_shift.d.ts +73 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/purkinje/chunk_apply_purkinje_shift.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/purkinje/chunk_apply_purkinje_shift.js +139 -0
- 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/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/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/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/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/color/tonemap/purkinjie/chunk_apply_purkinjie_shift.d.ts +0 -11
- package/src/shade/renderer/shader/chunk/color/tonemap/purkinjie/chunk_apply_purkinjie_shift.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/purkinjie/chunk_apply_purkinjie_shift.js +0 -56
- 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,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {number} downsample_factor
|
|
3
|
+
* @param {number} adaptive_min_downsample_factor
|
|
4
|
+
* @returns {number} levels of adaptive placement: at half the downsample factor, a quarter, and so on while the spacing
|
|
5
|
+
* is at least the minimum
|
|
6
|
+
*/
|
|
7
|
+
export function screen_probe_adaptive_levels(downsample_factor: number, adaptive_min_downsample_factor: number): number;
|
|
8
|
+
/**
|
|
9
|
+
* @param {number} levels of adaptive placement
|
|
10
|
+
* @returns {number} the most adaptive probes a tile can hold: each level's grid points in the tile that no coarser
|
|
11
|
+
* level holds, 3·4^(l−1) at level l, 4^levels − 1 over them all
|
|
12
|
+
*/
|
|
13
|
+
export function screen_probe_adaptive_tile_capacity(levels: number): number;
|
|
14
|
+
/**
|
|
15
|
+
* @param {number} uniform_count uniform probes
|
|
16
|
+
* @param {number} levels of adaptive placement
|
|
17
|
+
* @returns {number} adaptive probe slots: as many as the uniform probes, Lumen's `AdaptiveProbeAllocationFraction` at
|
|
18
|
+
* one (half there), so a frame's probes are never more than twice the uniform ones however finely the view's depth
|
|
19
|
+
* breaks up; none without adaptive levels
|
|
20
|
+
*/
|
|
21
|
+
export function screen_probe_adaptive_capacity(uniform_count: number, levels: number): number;
|
|
22
|
+
/**
|
|
23
|
+
* Threads of a pass that runs a thread an item: a probe, a ray, a texel.
|
|
24
|
+
* @type {number}
|
|
25
|
+
*/
|
|
26
|
+
export const SCREEN_PROBE_THREAD_WORKGROUP_SIZE: number;
|
|
27
|
+
/**
|
|
28
|
+
* Side of a 2-D pass's workgroup, in tiles or pixels: 8 × 8 of them.
|
|
29
|
+
* @type {number}
|
|
30
|
+
*/
|
|
31
|
+
export const SCREEN_PROBE_TILE_WORKGROUP_SIZE: number;
|
|
32
|
+
/**
|
|
33
|
+
* Bits of a ray's id that hold its slot among its probe's rays; the rest hold the probe. A probe casts n² rays, so
|
|
34
|
+
* n² is at most 2⁸.
|
|
35
|
+
* @type {number}
|
|
36
|
+
*/
|
|
37
|
+
export const SCREEN_PROBE_RAY_SLOT_BITS: number;
|
|
38
|
+
/**
|
|
39
|
+
* The largest octahedron a probe can have, n = 16: n² is the ray slots {@link SCREEN_PROBE_RAY_SLOT_BITS} name, and
|
|
40
|
+
* one probe's texels are what a workgroup sorts and accumulates in its memory. At 16, the ray sort holds 2·n² pairs of
|
|
41
|
+
* words (4 KiB) and the composite five words a texel (5 KiB), inside WebGPU's guaranteed 16 KiB of workgroup storage
|
|
42
|
+
* with the rest of either pass; 32 would need 20 KiB for the composite alone.
|
|
43
|
+
* @type {number}
|
|
44
|
+
*/
|
|
45
|
+
export const SCREEN_PROBE_OCTAHEDRON_LIMIT: number;
|
|
46
|
+
/**
|
|
47
|
+
* The smallest octahedron a probe can have, n = 4, the bottom of Lumen's range for it (4 to 16).
|
|
48
|
+
* @type {number}
|
|
49
|
+
*/
|
|
50
|
+
export const SCREEN_PROBE_OCTAHEDRON_MINIMUM: number;
|
|
51
|
+
/**
|
|
52
|
+
* The plane weight's scale, Lumen's: a probe weighs `exp2(−k·r²)`, r its distance from the receiver's plane over the
|
|
53
|
+
* receiver's depth. ½ at r = 1%, 0.01 at r ≈ 2.6%.
|
|
54
|
+
* @type {number}
|
|
55
|
+
*/
|
|
56
|
+
export const SCREEN_PROBE_PLANE_WEIGHT_SCALE: number;
|
|
57
|
+
/**
|
|
58
|
+
* A corner weighing no more than this is no corner, Lumen's: interpolation looks for an adaptive probe in its place,
|
|
59
|
+
* and a sum of weights under this is no light (the pixel is the temporal filter's to fill).
|
|
60
|
+
* @type {number}
|
|
61
|
+
*/
|
|
62
|
+
export const SCREEN_PROBE_WEIGHT_EPSILON: number;
|
|
63
|
+
/**
|
|
64
|
+
* Lumen's plane weight scale for the integration's jitter: a pixel's lookup moves only onto a pixel this coplanar
|
|
65
|
+
* with it, weight 0.01 at r ≈ 0.26%.
|
|
66
|
+
* @type {number}
|
|
67
|
+
*/
|
|
68
|
+
export const SCREEN_PROBE_JITTER_PLANE_WEIGHT_SCALE: number;
|
|
69
|
+
/**
|
|
70
|
+
* A pixel around a probe adds its cosine lobe to the probe's BRDF while the probe's plane weight from it is past
|
|
71
|
+
* this, Lumen's: r under 1.8% of the probe's depth.
|
|
72
|
+
* @type {number}
|
|
73
|
+
*/
|
|
74
|
+
export const SCREEN_PROBE_BRDF_PIXEL_WEIGHT: number;
|
|
75
|
+
/**
|
|
76
|
+
* Lumen's `MinPDFToTrace`. A texel whose density, its BRDF's times its light's (times n²), is under this gives its ray
|
|
77
|
+
* away. One any of whose directions the BRDF density reaches this is held at it (`screen_probe_brdf_keeps`), so the
|
|
78
|
+
* light ranks what the pixels' lobes keep and culls none of it; a texel the lobes do not keep stays where its light is
|
|
79
|
+
* bright enough to lift it.
|
|
80
|
+
* @type {number}
|
|
81
|
+
*/
|
|
82
|
+
export const SCREEN_PROBE_MIN_PDF: number;
|
|
83
|
+
/**
|
|
84
|
+
* Frames the uniform probes' place in their tiles cycles over, a Hammersley set of points across the tile, as
|
|
85
|
+
* Lumen's `GetScreenTileJitter` does.
|
|
86
|
+
* @type {number}
|
|
87
|
+
*/
|
|
88
|
+
export const SCREEN_PROBE_JITTER_PERIOD: number;
|
|
89
|
+
/**
|
|
90
|
+
* The most a ray's radiance may hold, in the display's units (radiance times the exposure it was last shown at),
|
|
91
|
+
* Lumen's `MaxRayIntensity`: the composite holds each ray to it, the fireflies of a sun glint or an emissive seen
|
|
92
|
+
* through a crack, and its fixed-point sums are scaled by it.
|
|
93
|
+
* @type {number}
|
|
94
|
+
*/
|
|
95
|
+
export const SCREEN_PROBE_MAX_RAY_INTENSITY: number;
|
|
96
|
+
/**
|
|
97
|
+
* Steps of a screen trace through the depth buffer's hierarchy, Lumen's `HZBTraversal.MaxIterations`: a budget for
|
|
98
|
+
* one thread. A ray that spends them is a miss of the screen, which the bricks take on from where it got.
|
|
99
|
+
* @type {number}
|
|
100
|
+
*/
|
|
101
|
+
export const SCREEN_PROBE_SCREEN_TRACE_STEPS: number;
|
|
102
|
+
/**
|
|
103
|
+
* How far behind the depth buffer a screen trace still counts as on the surface, as a share of the surface's depth,
|
|
104
|
+
* Lumen's `HZBTraversal.RelativeDepthThickness`.
|
|
105
|
+
* @type {number}
|
|
106
|
+
*/
|
|
107
|
+
export const SCREEN_PROBE_SCREEN_THICKNESS: number;
|
|
108
|
+
/**
|
|
109
|
+
* The share of the screen, along each side, over which a screen hit fades to a miss, Lumen's: from 80% of the way
|
|
110
|
+
* from the centre to the edge, in screen position.
|
|
111
|
+
* @type {number}
|
|
112
|
+
*/
|
|
113
|
+
export const SCREEN_PROBE_SCREEN_EDGE: number;
|
|
114
|
+
/**
|
|
115
|
+
* How far past its probe a ray is traced before the world-space probes answer for the rest, in spacings of the
|
|
116
|
+
* cascade the probe reads them from: the furthest a corner probe of its cage stands from the point it serves,
|
|
117
|
+
* relocation included, `PROBE_DEPTH_LIMIT`. Past it the ray has left every corner's cage, as Lumen's rays leave a
|
|
118
|
+
* cell's diagonal before its radiance cache takes them.
|
|
119
|
+
* @type {number}
|
|
120
|
+
*/
|
|
121
|
+
export const SCREEN_PROBE_REACH_SPACINGS: number;
|
|
122
|
+
/**
|
|
123
|
+
* Pushes along the bricks' field a probe's brick origin takes at most, as the probe clipmap's relocation takes three:
|
|
124
|
+
* on a plane the first lands at the clearance, and the others carry it past a corner's second face or a curved field.
|
|
125
|
+
* @type {number}
|
|
126
|
+
*/
|
|
127
|
+
export const SCREEN_PROBE_ORIGIN_STEPS: number;
|
|
128
|
+
/**
|
|
129
|
+
* A ray hit something moving when the speeds of its hit and its probe differ by more than this share of the probe's
|
|
130
|
+
* depth, held to a metre from below, Lumen's `RelativeSpeedDifferenceToConsiderLightingMoving`.
|
|
131
|
+
* @type {number}
|
|
132
|
+
*/
|
|
133
|
+
export const SCREEN_PROBE_MOVING_SPEED: number;
|
|
134
|
+
/**
|
|
135
|
+
* The temporal filter's history at a pixel is another surface when its depth differs from the one reprojected there
|
|
136
|
+
* by this share of the depth, dithered over ×½ to ×1½ and widened at grazing angles, Lumen's
|
|
137
|
+
* `Temporal.DistanceThreshold`.
|
|
138
|
+
* @type {number}
|
|
139
|
+
*/
|
|
140
|
+
export const SCREEN_PROBE_TEMPORAL_DISTANCE: number;
|
|
141
|
+
/**
|
|
142
|
+
* Lumen's fast update: the share of a pixel's light seen moving at which it takes its new light whole, and the most of
|
|
143
|
+
* its history the fast update ever drops.
|
|
144
|
+
* @type {number}
|
|
145
|
+
*/
|
|
146
|
+
export const SCREEN_PROBE_FAST_UPDATE_MOVING: number;
|
|
147
|
+
export const SCREEN_PROBE_FAST_UPDATE_LIMIT: 0.9;
|
|
148
|
+
/**
|
|
149
|
+
* How a probe's ray ended, the low bits of its hit word.
|
|
150
|
+
* - PENDING: the screen could not answer; the bricks will.
|
|
151
|
+
* - SCREEN: a hit in the screen, lit by the last frame's colour.
|
|
152
|
+
* - HIT: a front face in the bricks.
|
|
153
|
+
* - BACK: a back face in the bricks: inside a solid.
|
|
154
|
+
* - FAR: nothing within its reach; the world-space probes' radiance past it.
|
|
155
|
+
* - SKY: nothing within the world, or no world probe around: the environment.
|
|
156
|
+
* - UNRESOLVED: the bricks' march spent its steps; no light.
|
|
157
|
+
* - NONE: no ray: the probe stands on no surface.
|
|
158
|
+
*/
|
|
159
|
+
export const SCREEN_PROBE_TRACE_PENDING: 0;
|
|
160
|
+
export const SCREEN_PROBE_TRACE_SCREEN: 1;
|
|
161
|
+
export const SCREEN_PROBE_TRACE_HIT: 2;
|
|
162
|
+
export const SCREEN_PROBE_TRACE_BACK: 3;
|
|
163
|
+
export const SCREEN_PROBE_TRACE_FAR: 4;
|
|
164
|
+
export const SCREEN_PROBE_TRACE_SKY: 5;
|
|
165
|
+
export const SCREEN_PROBE_TRACE_UNRESOLVED: 6;
|
|
166
|
+
export const SCREEN_PROBE_TRACE_NONE: 7;
|
|
167
|
+
export const SCREEN_PROBE_TRACE_KIND_MASK: 7;
|
|
168
|
+
/**
|
|
169
|
+
* Set in a hit word when the ray hit something moving relative to its probe.
|
|
170
|
+
* @type {number}
|
|
171
|
+
*/
|
|
172
|
+
export const SCREEN_PROBE_TRACE_MOVING: number;
|
|
173
|
+
/**
|
|
174
|
+
* Word offsets of the commands and counts one pass writes for the passes after it, `screen_probe_dispatch`: a
|
|
175
|
+
* workgroup a probe, a thread a probe, a thread a ray, a thread a ray left to the bricks, each three words of a
|
|
176
|
+
* folded dispatch; then the frame's probes, and its rays left to the bricks.
|
|
177
|
+
*/
|
|
178
|
+
export const SCREEN_PROBE_DISPATCH_PROBES: 0;
|
|
179
|
+
export const SCREEN_PROBE_DISPATCH_THREADS: 3;
|
|
180
|
+
export const SCREEN_PROBE_DISPATCH_RAYS: 6;
|
|
181
|
+
export const SCREEN_PROBE_DISPATCH_BRICK_RAYS: 9;
|
|
182
|
+
export const SCREEN_PROBE_DISPATCH_PROBE_COUNT: 12;
|
|
183
|
+
export const SCREEN_PROBE_DISPATCH_BRICK_RAY_COUNT: 13;
|
|
184
|
+
export const SCREEN_PROBE_DISPATCH_WORDS: 16;
|
|
185
|
+
/**
|
|
186
|
+
* Word offsets of the frame's atomic counters, `screen_probe_counters`: adaptive probes placed, which may run past
|
|
187
|
+
* their slots and is held to them where read; rays left to the bricks.
|
|
188
|
+
*/
|
|
189
|
+
export const SCREEN_PROBE_COUNTER_ADAPTIVE: 0;
|
|
190
|
+
export const SCREEN_PROBE_COUNTER_BRICK_RAYS: 1;
|
|
191
|
+
export const SCREEN_PROBE_COUNTER_WORDS: 4;
|
|
192
|
+
//# sourceMappingURL=SCREEN_PROBE.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SCREEN_PROBE.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js"],"names":[],"mappings":"AAoMA;;;;;GAKG;AACH,gEALW,MAAM,kCACN,MAAM,GACJ,MAAM,CAWlB;AAED;;;;GAIG;AACH,4DAJW,MAAM,GACJ,MAAM,CAKlB;AAED;;;;;;GAMG;AACH,8DANW,MAAM,UACN,MAAM,GACJ,MAAM,CAMlB;AApOD;;;GAGG;AACH,iDAFU,MAAM,CAEqC;AAErD;;;GAGG;AACH,+CAFU,MAAM,CAEkC;AAElD;;;;GAIG;AACH,yCAFU,MAAM,CAE4B;AAE5C;;;;;;GAMG;AACH,4CAFU,MAAM,CAEgC;AAEhD;;;GAGG;AACH,8CAFU,MAAM,CAEiC;AAEjD;;;;GAIG;AACH,8CAFU,MAAM,CAEqC;AAErD;;;;GAIG;AACH,0CAFU,MAAM,CAEgC;AAEhD;;;;GAIG;AACH,qDAFU,MAAM,CAE8C;AAE9D;;;;GAIG;AACH,6CAFU,MAAM,CAEkC;AAElD;;;;;;GAMG;AACH,mCAFU,MAAM,CAEwB;AAExC;;;;GAIG;AACH,yCAFU,MAAM,CAE4B;AAE5C;;;;;GAKG;AACH,6CAFU,MAAM,CAEiC;AAEjD;;;;GAIG;AACH,8CAFU,MAAM,CAEkC;AAElD;;;;GAIG;AACH,4CAFU,MAAM,CAEkC;AAElD;;;;GAIG;AACH,uCAFU,MAAM,CAE4B;AAE5C;;;;;;GAMG;AACH,0CAFU,MAAM,CAE6C;AAE7D;;;;GAIG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;;GAIG;AACH,wCAFU,MAAM,CAE+B;AAE/C;;;;;GAKG;AACH,6CAFU,MAAM,CAEoC;AAEpD;;;;GAIG;AACH,8CAFU,MAAM,CAEmC;AACnD,iDAAkD;AAElD;;;;;;;;;;GAUG;AACH,2CAA4C;AAC5C,0CAA2C;AAC3C,uCAAwC;AACxC,wCAAyC;AACzC,uCAAwC;AACxC,uCAAwC;AACxC,8CAA+C;AAC/C,wCAAyC;AACzC,6CAA8C;AAE9C;;;GAGG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;;GAIG;AACH,6CAA8C;AAC9C,8CAA+C;AAC/C,2CAA4C;AAC5C,iDAAkD;AAClD,mDAAoD;AACpD,uDAAwD;AACxD,6CAA8C;AAE9C;;;GAGG;AACH,8CAA+C;AAC/C,gDAAiD;AACjD,2CAA4C"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { PROBE_DEPTH_LIMIT } from "../probe_clipmap/probe/PROBE_CLIPMAP.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Threads of a pass that runs a thread an item: a probe, a ray, a texel.
|
|
5
|
+
* @type {number}
|
|
6
|
+
*/
|
|
7
|
+
export const SCREEN_PROBE_THREAD_WORKGROUP_SIZE = 64;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Side of a 2-D pass's workgroup, in tiles or pixels: 8 × 8 of them.
|
|
11
|
+
* @type {number}
|
|
12
|
+
*/
|
|
13
|
+
export const SCREEN_PROBE_TILE_WORKGROUP_SIZE = 8;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Bits of a ray's id that hold its slot among its probe's rays; the rest hold the probe. A probe casts n² rays, so
|
|
17
|
+
* n² is at most 2⁸.
|
|
18
|
+
* @type {number}
|
|
19
|
+
*/
|
|
20
|
+
export const SCREEN_PROBE_RAY_SLOT_BITS = 8;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The largest octahedron a probe can have, n = 16: n² is the ray slots {@link SCREEN_PROBE_RAY_SLOT_BITS} name, and
|
|
24
|
+
* one probe's texels are what a workgroup sorts and accumulates in its memory. At 16, the ray sort holds 2·n² pairs of
|
|
25
|
+
* words (4 KiB) and the composite five words a texel (5 KiB), inside WebGPU's guaranteed 16 KiB of workgroup storage
|
|
26
|
+
* with the rest of either pass; 32 would need 20 KiB for the composite alone.
|
|
27
|
+
* @type {number}
|
|
28
|
+
*/
|
|
29
|
+
export const SCREEN_PROBE_OCTAHEDRON_LIMIT = 16;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The smallest octahedron a probe can have, n = 4, the bottom of Lumen's range for it (4 to 16).
|
|
33
|
+
* @type {number}
|
|
34
|
+
*/
|
|
35
|
+
export const SCREEN_PROBE_OCTAHEDRON_MINIMUM = 4;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The plane weight's scale, Lumen's: a probe weighs `exp2(−k·r²)`, r its distance from the receiver's plane over the
|
|
39
|
+
* receiver's depth. ½ at r = 1%, 0.01 at r ≈ 2.6%.
|
|
40
|
+
* @type {number}
|
|
41
|
+
*/
|
|
42
|
+
export const SCREEN_PROBE_PLANE_WEIGHT_SCALE = 10000;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A corner weighing no more than this is no corner, Lumen's: interpolation looks for an adaptive probe in its place,
|
|
46
|
+
* and a sum of weights under this is no light (the pixel is the temporal filter's to fill).
|
|
47
|
+
* @type {number}
|
|
48
|
+
*/
|
|
49
|
+
export const SCREEN_PROBE_WEIGHT_EPSILON = 0.01;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Lumen's plane weight scale for the integration's jitter: a pixel's lookup moves only onto a pixel this coplanar
|
|
53
|
+
* with it, weight 0.01 at r ≈ 0.26%.
|
|
54
|
+
* @type {number}
|
|
55
|
+
*/
|
|
56
|
+
export const SCREEN_PROBE_JITTER_PLANE_WEIGHT_SCALE = 1000000;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* A pixel around a probe adds its cosine lobe to the probe's BRDF while the probe's plane weight from it is past
|
|
60
|
+
* this, Lumen's: r under 1.8% of the probe's depth.
|
|
61
|
+
* @type {number}
|
|
62
|
+
*/
|
|
63
|
+
export const SCREEN_PROBE_BRDF_PIXEL_WEIGHT = 0.1;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Lumen's `MinPDFToTrace`. A texel whose density, its BRDF's times its light's (times n²), is under this gives its ray
|
|
67
|
+
* away. One any of whose directions the BRDF density reaches this is held at it (`screen_probe_brdf_keeps`), so the
|
|
68
|
+
* light ranks what the pixels' lobes keep and culls none of it; a texel the lobes do not keep stays where its light is
|
|
69
|
+
* bright enough to lift it.
|
|
70
|
+
* @type {number}
|
|
71
|
+
*/
|
|
72
|
+
export const SCREEN_PROBE_MIN_PDF = 0.1;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Frames the uniform probes' place in their tiles cycles over, a Hammersley set of points across the tile, as
|
|
76
|
+
* Lumen's `GetScreenTileJitter` does.
|
|
77
|
+
* @type {number}
|
|
78
|
+
*/
|
|
79
|
+
export const SCREEN_PROBE_JITTER_PERIOD = 8;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The most a ray's radiance may hold, in the display's units (radiance times the exposure it was last shown at),
|
|
83
|
+
* Lumen's `MaxRayIntensity`: the composite holds each ray to it, the fireflies of a sun glint or an emissive seen
|
|
84
|
+
* through a crack, and its fixed-point sums are scaled by it.
|
|
85
|
+
* @type {number}
|
|
86
|
+
*/
|
|
87
|
+
export const SCREEN_PROBE_MAX_RAY_INTENSITY = 40;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Steps of a screen trace through the depth buffer's hierarchy, Lumen's `HZBTraversal.MaxIterations`: a budget for
|
|
91
|
+
* one thread. A ray that spends them is a miss of the screen, which the bricks take on from where it got.
|
|
92
|
+
* @type {number}
|
|
93
|
+
*/
|
|
94
|
+
export const SCREEN_PROBE_SCREEN_TRACE_STEPS = 50;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* How far behind the depth buffer a screen trace still counts as on the surface, as a share of the surface's depth,
|
|
98
|
+
* Lumen's `HZBTraversal.RelativeDepthThickness`.
|
|
99
|
+
* @type {number}
|
|
100
|
+
*/
|
|
101
|
+
export const SCREEN_PROBE_SCREEN_THICKNESS = 0.02;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The share of the screen, along each side, over which a screen hit fades to a miss, Lumen's: from 80% of the way
|
|
105
|
+
* from the centre to the edge, in screen position.
|
|
106
|
+
* @type {number}
|
|
107
|
+
*/
|
|
108
|
+
export const SCREEN_PROBE_SCREEN_EDGE = 0.2;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* How far past its probe a ray is traced before the world-space probes answer for the rest, in spacings of the
|
|
112
|
+
* cascade the probe reads them from: the furthest a corner probe of its cage stands from the point it serves,
|
|
113
|
+
* relocation included, `PROBE_DEPTH_LIMIT`. Past it the ray has left every corner's cage, as Lumen's rays leave a
|
|
114
|
+
* cell's diagonal before its radiance cache takes them.
|
|
115
|
+
* @type {number}
|
|
116
|
+
*/
|
|
117
|
+
export const SCREEN_PROBE_REACH_SPACINGS = PROBE_DEPTH_LIMIT;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Pushes along the bricks' field a probe's brick origin takes at most, as the probe clipmap's relocation takes three:
|
|
121
|
+
* on a plane the first lands at the clearance, and the others carry it past a corner's second face or a curved field.
|
|
122
|
+
* @type {number}
|
|
123
|
+
*/
|
|
124
|
+
export const SCREEN_PROBE_ORIGIN_STEPS = 3;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* A ray hit something moving when the speeds of its hit and its probe differ by more than this share of the probe's
|
|
128
|
+
* depth, held to a metre from below, Lumen's `RelativeSpeedDifferenceToConsiderLightingMoving`.
|
|
129
|
+
* @type {number}
|
|
130
|
+
*/
|
|
131
|
+
export const SCREEN_PROBE_MOVING_SPEED = 0.005;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The temporal filter's history at a pixel is another surface when its depth differs from the one reprojected there
|
|
135
|
+
* by this share of the depth, dithered over ×½ to ×1½ and widened at grazing angles, Lumen's
|
|
136
|
+
* `Temporal.DistanceThreshold`.
|
|
137
|
+
* @type {number}
|
|
138
|
+
*/
|
|
139
|
+
export const SCREEN_PROBE_TEMPORAL_DISTANCE = 0.005;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Lumen's fast update: the share of a pixel's light seen moving at which it takes its new light whole, and the most of
|
|
143
|
+
* its history the fast update ever drops.
|
|
144
|
+
* @type {number}
|
|
145
|
+
*/
|
|
146
|
+
export const SCREEN_PROBE_FAST_UPDATE_MOVING = 0.1;
|
|
147
|
+
export const SCREEN_PROBE_FAST_UPDATE_LIMIT = 0.9;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* How a probe's ray ended, the low bits of its hit word.
|
|
151
|
+
* - PENDING: the screen could not answer; the bricks will.
|
|
152
|
+
* - SCREEN: a hit in the screen, lit by the last frame's colour.
|
|
153
|
+
* - HIT: a front face in the bricks.
|
|
154
|
+
* - BACK: a back face in the bricks: inside a solid.
|
|
155
|
+
* - FAR: nothing within its reach; the world-space probes' radiance past it.
|
|
156
|
+
* - SKY: nothing within the world, or no world probe around: the environment.
|
|
157
|
+
* - UNRESOLVED: the bricks' march spent its steps; no light.
|
|
158
|
+
* - NONE: no ray: the probe stands on no surface.
|
|
159
|
+
*/
|
|
160
|
+
export const SCREEN_PROBE_TRACE_PENDING = 0;
|
|
161
|
+
export const SCREEN_PROBE_TRACE_SCREEN = 1;
|
|
162
|
+
export const SCREEN_PROBE_TRACE_HIT = 2;
|
|
163
|
+
export const SCREEN_PROBE_TRACE_BACK = 3;
|
|
164
|
+
export const SCREEN_PROBE_TRACE_FAR = 4;
|
|
165
|
+
export const SCREEN_PROBE_TRACE_SKY = 5;
|
|
166
|
+
export const SCREEN_PROBE_TRACE_UNRESOLVED = 6;
|
|
167
|
+
export const SCREEN_PROBE_TRACE_NONE = 7;
|
|
168
|
+
export const SCREEN_PROBE_TRACE_KIND_MASK = 7;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Set in a hit word when the ray hit something moving relative to its probe.
|
|
172
|
+
* @type {number}
|
|
173
|
+
*/
|
|
174
|
+
export const SCREEN_PROBE_TRACE_MOVING = 8;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Word offsets of the commands and counts one pass writes for the passes after it, `screen_probe_dispatch`: a
|
|
178
|
+
* workgroup a probe, a thread a probe, a thread a ray, a thread a ray left to the bricks, each three words of a
|
|
179
|
+
* folded dispatch; then the frame's probes, and its rays left to the bricks.
|
|
180
|
+
*/
|
|
181
|
+
export const SCREEN_PROBE_DISPATCH_PROBES = 0;
|
|
182
|
+
export const SCREEN_PROBE_DISPATCH_THREADS = 3;
|
|
183
|
+
export const SCREEN_PROBE_DISPATCH_RAYS = 6;
|
|
184
|
+
export const SCREEN_PROBE_DISPATCH_BRICK_RAYS = 9;
|
|
185
|
+
export const SCREEN_PROBE_DISPATCH_PROBE_COUNT = 12;
|
|
186
|
+
export const SCREEN_PROBE_DISPATCH_BRICK_RAY_COUNT = 13;
|
|
187
|
+
export const SCREEN_PROBE_DISPATCH_WORDS = 16;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Word offsets of the frame's atomic counters, `screen_probe_counters`: adaptive probes placed, which may run past
|
|
191
|
+
* their slots and is held to them where read; rays left to the bricks.
|
|
192
|
+
*/
|
|
193
|
+
export const SCREEN_PROBE_COUNTER_ADAPTIVE = 0;
|
|
194
|
+
export const SCREEN_PROBE_COUNTER_BRICK_RAYS = 1;
|
|
195
|
+
export const SCREEN_PROBE_COUNTER_WORDS = 4;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @param {number} downsample_factor
|
|
199
|
+
* @param {number} adaptive_min_downsample_factor
|
|
200
|
+
* @returns {number} levels of adaptive placement: at half the downsample factor, a quarter, and so on while the spacing
|
|
201
|
+
* is at least the minimum
|
|
202
|
+
*/
|
|
203
|
+
export function screen_probe_adaptive_levels(downsample_factor, adaptive_min_downsample_factor) {
|
|
204
|
+
let levels = 0;
|
|
205
|
+
|
|
206
|
+
for (let spacing = downsample_factor >>> 1; spacing >= adaptive_min_downsample_factor && spacing >= 1; spacing >>>= 1) {
|
|
207
|
+
levels++;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return levels;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @param {number} levels of adaptive placement
|
|
215
|
+
* @returns {number} the most adaptive probes a tile can hold: each level's grid points in the tile that no coarser
|
|
216
|
+
* level holds, 3·4^(l−1) at level l, 4^levels − 1 over them all
|
|
217
|
+
*/
|
|
218
|
+
export function screen_probe_adaptive_tile_capacity(levels) {
|
|
219
|
+
return 4 ** levels - 1;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @param {number} uniform_count uniform probes
|
|
224
|
+
* @param {number} levels of adaptive placement
|
|
225
|
+
* @returns {number} adaptive probe slots: as many as the uniform probes, Lumen's `AdaptiveProbeAllocationFraction` at
|
|
226
|
+
* one (half there), so a frame's probes are never more than twice the uniform ones however finely the view's depth
|
|
227
|
+
* breaks up; none without adaptive levels
|
|
228
|
+
*/
|
|
229
|
+
export function screen_probe_adaptive_capacity(uniform_count, levels) {
|
|
230
|
+
return levels > 0 ? uniform_count : 0;
|
|
231
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What {@link ScreenProbeSettingsdebug_view } shows in place of the frame's colour, before TAA.
|
|
3
|
+
*/
|
|
4
|
+
export type ScreenProbeDebugView = number;
|
|
5
|
+
export namespace ScreenProbeDebugView {
|
|
6
|
+
let None: number;
|
|
7
|
+
let IndirectDiffuse: number;
|
|
8
|
+
let ProbePlacement: number;
|
|
9
|
+
let TraceKinds: number;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ScreenProbeDebugView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenProbeDebugView.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.js"],"names":[],"mappings":";;;mCAIU,MAAM"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What {@link ScreenProbeSettings#debug_view} shows in place of the frame's colour, before TAA.
|
|
3
|
+
*
|
|
4
|
+
* @readonly
|
|
5
|
+
* @enum {number}
|
|
6
|
+
*/
|
|
7
|
+
export const ScreenProbeDebugView = {
|
|
8
|
+
/** the frame as rendered */
|
|
9
|
+
None: 0,
|
|
10
|
+
/**
|
|
11
|
+
* the light the screen probes' indirect diffuse is made of, after the temporal filter: their irradiance at the
|
|
12
|
+
* bent normal over π, what a white Lambertian surface would send back, before the surface's albedo and occlusion
|
|
13
|
+
*/
|
|
14
|
+
IndirectDiffuse: 1,
|
|
15
|
+
/**
|
|
16
|
+
* where the frame's probes stand over the indirect diffuse: a uniform probe's pixel green, an adaptive probe's red,
|
|
17
|
+
* and a pixel no probe interpolates to (the temporal filter's to fill) blue
|
|
18
|
+
*/
|
|
19
|
+
ProbePlacement: 2,
|
|
20
|
+
/**
|
|
21
|
+
* how each probe's rays ended, over the probe's footprint: the share resolved in the screen red, by the SDF bricks
|
|
22
|
+
* green, by the world-space probes past the trace blue
|
|
23
|
+
*/
|
|
24
|
+
TraceKinds: 3,
|
|
25
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings of {@link ShadeIndirectLightingMode.ScreenProbes}, held on `Renderer.screen_probes` and read every frame
|
|
3
|
+
* the mode runs. The world the probes trace and the world-space probes past their reach are the probe clipmap's,
|
|
4
|
+
* set by `Renderer.probe_clipmap` (`ProbeClipmapSettings`).
|
|
5
|
+
*
|
|
6
|
+
* Two kinds of field, by what a change costs:
|
|
7
|
+
* - **structure**: {@link downsample_factor} and {@link octahedron_resolution}. A change makes the screen probes'
|
|
8
|
+
* resources again at the next frame, and their history starts from nothing.
|
|
9
|
+
* - **the rest** set the frame's passes and take effect the next frame without a rebuild.
|
|
10
|
+
*
|
|
11
|
+
* Each setter checks what its own value must be; what the device and the probes' layout hold is checked when the
|
|
12
|
+
* screen probes are made.
|
|
13
|
+
*/
|
|
14
|
+
export class ScreenProbeSettings {
|
|
15
|
+
/**
|
|
16
|
+
* @param {number} v a power of two from 1: tiles are found by shifts
|
|
17
|
+
*/
|
|
18
|
+
set downsample_factor(v: number);
|
|
19
|
+
/**
|
|
20
|
+
* Pixels between the uniform probes along each axis: one probe stands on the G-buffer in every square tile of
|
|
21
|
+
* this many pixels a side, Lumen's `ScreenProbeGather.DownsampleFactor`. Adaptive probes fill in between where
|
|
22
|
+
* interpolating the uniform ones would cross an edge ({@link adaptive_min_downsample_factor}). Every ray a probe
|
|
23
|
+
* casts and every pixel's interpolation scale with the count, so the cost goes as the inverse square of this.
|
|
24
|
+
* Structure.
|
|
25
|
+
* @returns {number}
|
|
26
|
+
*/
|
|
27
|
+
get downsample_factor(): number;
|
|
28
|
+
/**
|
|
29
|
+
* @param {number} v 4, 8 or 16: Lumen's range, whose top is what a probe's workgroup sorts and accumulates in its
|
|
30
|
+
* memory (`SCREEN_PROBE_OCTAHEDRON_MINIMUM`, `SCREEN_PROBE_OCTAHEDRON_LIMIT`)
|
|
31
|
+
*/
|
|
32
|
+
set octahedron_resolution(v: number);
|
|
33
|
+
/**
|
|
34
|
+
* Texels a side of a probe's radiance, over the sphere by Clarberg's equal-area map: each probe casts this
|
|
35
|
+
* squared rays a frame, one a texel, Lumen's `TracingOctahedronResolution`. With importance sampling a ray may
|
|
36
|
+
* instead stand in a quarter of a texel at twice this resolution, where the probe's light is brightest.
|
|
37
|
+
* Structure.
|
|
38
|
+
* @returns {number}
|
|
39
|
+
*/
|
|
40
|
+
get octahedron_resolution(): number;
|
|
41
|
+
/**
|
|
42
|
+
* @param {number} v a power of two from 1
|
|
43
|
+
*/
|
|
44
|
+
set adaptive_min_downsample_factor(v: number);
|
|
45
|
+
/**
|
|
46
|
+
* The finest spacing adaptive probes are placed at, in pixels, Lumen's `AdaptiveProbeMinDownsampleFactor`.
|
|
47
|
+
* Placement runs at half the {@link downsample_factor}, then a quarter, while the spacing is at least this:
|
|
48
|
+
* a pixel on that finer grid gets a probe where the probes already placed would not interpolate to it. At or
|
|
49
|
+
* above the downsample factor no adaptive probe is placed.
|
|
50
|
+
* @returns {number}
|
|
51
|
+
*/
|
|
52
|
+
get adaptive_min_downsample_factor(): number;
|
|
53
|
+
/**
|
|
54
|
+
* @param {boolean} v
|
|
55
|
+
*/
|
|
56
|
+
set importance_sampling(v: boolean);
|
|
57
|
+
/**
|
|
58
|
+
* Whether a probe's rays follow where its light comes from (Lumen's structured importance sampling): each texel
|
|
59
|
+
* is weighed by the cosine lobes of the pixels around the probe and by the light the probe's history saw there;
|
|
60
|
+
* the rays of texels the pixels cannot see go, three at a time, to split the brightest texels into four. Off,
|
|
61
|
+
* every texel takes one ray. Takes effect the next frame.
|
|
62
|
+
* @returns {boolean}
|
|
63
|
+
*/
|
|
64
|
+
get importance_sampling(): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* @param {boolean} v
|
|
67
|
+
*/
|
|
68
|
+
set screen_traces(v: boolean);
|
|
69
|
+
/**
|
|
70
|
+
* Whether a probe's rays are traced through the screen first, against the depth buffer's hierarchy, and lit by the
|
|
71
|
+
* last frame's colour where they hit; what the screen cannot answer goes on through the SDF bricks. Off, every
|
|
72
|
+
* ray is traced through the bricks alone. Takes effect the next frame.
|
|
73
|
+
* @returns {boolean}
|
|
74
|
+
*/
|
|
75
|
+
get screen_traces(): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* @param {number} v a non-negative integer
|
|
78
|
+
*/
|
|
79
|
+
set spatial_filter_passes(v: number);
|
|
80
|
+
/**
|
|
81
|
+
* Passes of the filter between neighbouring probes, Lumen's `SpatialFilterNumPasses`: each texel takes its four
|
|
82
|
+
* neighbours' along the same direction where they stand on its surface and saw the same point. Zero records none.
|
|
83
|
+
* Takes effect the next frame.
|
|
84
|
+
* @returns {number}
|
|
85
|
+
*/
|
|
86
|
+
get spatial_filter_passes(): number;
|
|
87
|
+
/**
|
|
88
|
+
* @param {number} v frames, at least 1 and finite
|
|
89
|
+
*/
|
|
90
|
+
set temporal_frames(v: number);
|
|
91
|
+
/**
|
|
92
|
+
* The most frames the temporal filter averages a pixel's diffuse over, Lumen's `Temporal.MaxFramesAccumulated`:
|
|
93
|
+
* a pixel whose history holds blends its new light by 1 / (1 + frames). Where the probes' rays saw something
|
|
94
|
+
* move, it takes fewer. Takes effect the next frame.
|
|
95
|
+
* @returns {number}
|
|
96
|
+
*/
|
|
97
|
+
get temporal_frames(): number;
|
|
98
|
+
/**
|
|
99
|
+
* @param {ScreenProbeDebugView} v
|
|
100
|
+
*/
|
|
101
|
+
set debug_view(v: number);
|
|
102
|
+
/**
|
|
103
|
+
* What the frame shows in place of its colour, before TAA: the frame itself, or one of the mode's debug views.
|
|
104
|
+
* Takes effect the next frame.
|
|
105
|
+
* @returns {ScreenProbeDebugView}
|
|
106
|
+
*/
|
|
107
|
+
get debug_view(): number;
|
|
108
|
+
#private;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=ScreenProbeSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenProbeSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH;IAgBI;;OAEG;IACH,iCAKC;IApBD;;;;;;;OAOG;IACH,gCAEC;IAyBD;;;OAGG;IACH,qCAKC;IApBD;;;;;;OAMG;IACH,oCAEC;IA0BD;;OAEG;IACH,8CAKC;IAnBD;;;;;;OAMG;IACH,6CAEC;IAyBD;;OAEG;IACH,oCAIC;IAlBD;;;;;;OAMG;IACH,mCAEC;IAuBD;;OAEG;IACH,8BAIC;IAjBD;;;;;OAKG;IACH,6BAEC;IAuBD;;OAEG;IACH,qCAIC;IAjBD;;;;;OAKG;IACH,oCAEC;IAuBD;;OAEG;IACH,+BAKC;IAlBD;;;;;OAKG;IACH,8BAEC;IAuBD;;OAEG;IACH,0BAIC;IAhBD;;;;OAIG;IACH,yBAEC;;CAUJ"}
|