@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
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicsEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/GraphicsEngine.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GraphicsEngine.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/GraphicsEngine.js"],"names":[],"mappings":"AA0DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IACI;;;;;OAKG;IACH,gCAEC;IAUD;;;;OAIG;IACH,yBAEC;IAmEG;;;;;;OAMG;IACH,QAFU,kBAAkB,CAEsB;IAElD;QACI;;;;;;;;WAQG;mBADO,MAAM;QAIhB;;;;;WAKG;oBADO,MAAM;QAIhB;;;;WAIG;qBADO,MAAM;QAIhB;;;;;;;WAOG;;QAGH;;;;;WAKG;;MAEN;IAID;;;;;OAKG;IACH,4BAFU,OAAO,CAEyB;IAE1C;;;;;;OAMG;IACH,UAFU,SAAS,CAEY;IAG/B;;OAEG;IACH,YAFU,iBAAiB,GAAC,IAAI,CAEV;IAEtB;;;;;OAKG;IACH,UAFU,OAAO,CAEG;IAEpB;;;;;OAKG;IACH,UAFU,OAAO,CAEG;IAEpB;;OAEG;IACH,YAFU,MAAM,CAEG;IAoBvB;;;;;;;;;;;;OAYG;IACH,mDAEC;IAED;;;;;;;;OAQG;IACH,iBAFW,KAAK,QAgBf;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,6BAFW,YAAY,QAStB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,yBAHW,eAAe,GACb,eAAe,CAa3B;IAED;;;;;;;;;;OAUG;IACH,uBAHW,UAAU,GACR,MAAM,CAclB;IAED;;;;;;OAMG;IACH,4BAHW,eAAe,GACb,OAAO,CAgBnB;IAED;;;;;;;;;;;;;OAaG;IACH,kCAHW,iBAAiB,GACf,iBAAiB,CAqB7B;IAED;;;;;;OAMG;IACH,8BAFa,MAAM,CAIlB;IAED;;;;;OAKG;IACH,qCAHW,iBAAiB,GACf,OAAO,CAgBnB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,qBALW,KAAK,GACH,eAAe,GAAC,IAAI,CAehC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,yBARW,KAAK,UACL,MAAM,SACN,MAAM,UACN,MAAM,GACJ,QAAQ,SAAS,CAAC,CAwD9B;IAED;;;;OAIG;IACH,0BAEC;IAED;;;;;;;;;;OAUG;IACH,SAFa,QAAQ,IAAI,CAAC,CAuDzB;IAED;;;;;;;;;;;;;;;OAeG;IACH,qBAFW,iBAAiB,QAc3B;IAED;;;;;OAKG;IACH,aAiBC;IASD;;;;;;;;OAQG;IACH,8BAHW,OAAO,GAAC,OAAO,UACf,OAAO,GAAC,OAAO,QAQzB;IAED;;;;;;;;;;;;;;;OAeG;IACH,yBALW,MAAM,KACN,MAAM,UACN,OAAO,aACP,OAAO,QAIjB;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,mBAyBC;IAED;;;;;;;;;OASG;IACH,4BAPW,MAAM,GAKJ,OAAO,CA2DnB;;CACJ;sBAz4BY,OAAO,4BAA4B,EAAE,OAAO;yBAC5C,OAAO,8CAA8C,EAAE,UAAU;8BACjE,OAAO,mDAAmD,EAAE,eAAe;gCAC3E,OAAO,mEAAmE,EAAE,iBAAiB;8BAC7F,OAAO,+CAA+C,EAAE,eAAe;2BACvE,OAAO,8CAA8C,EAAE,YAAY;qBACnE,OAAO,kCAAkC,EAAE,MAAM;yBAdrC,kCAAkC;mCAKxB,yBAAyB;mBAXzC,oCAAoC;wBAC/B,4BAA4B;sBAQ9B,kCAAkC;yCAJf,kDAAkD;sBAErE,qCAAqC;0BACjC,0CAA0C"}
|
|
@@ -9,7 +9,6 @@ import { Renderer } from "../../shade/renderer/Renderer.js";
|
|
|
9
9
|
import { Scene } from "../../shade/renderer/scene/Scene.js";
|
|
10
10
|
import { Sampler2D } from "../graphics/texture/sampler/Sampler2D.js";
|
|
11
11
|
import EmptyView from "../../view/elements/EmptyView.js";
|
|
12
|
-
import { make_default_environment } from "./make_default_environment.js";
|
|
13
12
|
import { shade_camera_projection_ray } from "./shade_camera_projection_ray.js";
|
|
14
13
|
import { ShadeCameraAdapter } from "./ShadeCameraAdapter.js";
|
|
15
14
|
|
|
@@ -334,16 +333,12 @@ export class GraphicsEngine {
|
|
|
334
333
|
this.#scene = scene;
|
|
335
334
|
|
|
336
335
|
/*
|
|
337
|
-
Shade lights with indirect by default and a scene
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
A scene that arrives with an environment keeps it: the scene owns its lighting and this only
|
|
342
|
-
fills in what is missing. Otherwise handing over a scene would silently discard the
|
|
343
|
-
environment it was built with, and the fix would be to call things in a particular order.
|
|
336
|
+
Shade lights with indirect by default and a scene with neither an authored environment nor
|
|
337
|
+
an active procedural atmosphere renders unlit, so the engine enables Hillaire sky/IBL on
|
|
338
|
+
scenes that arrive without an explicit environment or explicit `atmosphere.enabled = false`.
|
|
344
339
|
*/
|
|
345
340
|
if (scene.lights.environment === undefined) {
|
|
346
|
-
scene.
|
|
341
|
+
scene.atmosphere.enable_by_default();
|
|
347
342
|
}
|
|
348
343
|
}
|
|
349
344
|
|
|
@@ -12,9 +12,9 @@ import { ShadeTexture } from "../../shade/renderer/texture/ShadeTexture.js";
|
|
|
12
12
|
import { ShadeImage } from "../../shade/renderer/texture/source/ShadeImage.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Resolution of the octahedral map
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Resolution of the octahedral map: it is convolved into irradiance and a handful of roughness mips
|
|
16
|
+
* before anything samples it, so what matters is that it is smooth and correctly oriented rather
|
|
17
|
+
* than detailed.
|
|
18
18
|
*
|
|
19
19
|
* @type {number}
|
|
20
20
|
*/
|
|
@@ -66,11 +66,11 @@ export class FluidObstacleSystem extends System<any> {
|
|
|
66
66
|
/**
|
|
67
67
|
* @param {FluidComponent} fluid
|
|
68
68
|
*/
|
|
69
|
-
static "__#
|
|
69
|
+
static "__#500@#refresh_masks"(fluid: FluidComponent): void;
|
|
70
70
|
/**
|
|
71
71
|
* @param {FluidComponent} fluid
|
|
72
72
|
*/
|
|
73
|
-
static "__#
|
|
73
|
+
static "__#500@#clear_field"(fluid: FluidComponent): void;
|
|
74
74
|
/**
|
|
75
75
|
* Mark every cell of `fluid` whose centre lies within `inflation` of the
|
|
76
76
|
* posed shape as solid. Iteration is clipped to the shape's world AABB
|
|
@@ -82,7 +82,7 @@ export class FluidObstacleSystem extends System<any> {
|
|
|
82
82
|
* @param {number} inflation world-units SDF threshold
|
|
83
83
|
* @param {Float64Array} point length-3 scratch
|
|
84
84
|
*/
|
|
85
|
-
static "__#
|
|
85
|
+
static "__#500@#voxelize"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array): void;
|
|
86
86
|
/**
|
|
87
87
|
* Write the obstacle's translation velocity onto every face of every cell
|
|
88
88
|
* it voxelized — the moving-wall boundary condition. Runs AFTER the mask
|
|
@@ -102,7 +102,7 @@ export class FluidObstacleSystem extends System<any> {
|
|
|
102
102
|
* @param {number} wvy
|
|
103
103
|
* @param {number} wvz
|
|
104
104
|
*/
|
|
105
|
-
static "__#
|
|
105
|
+
static "__#500@#stamp_wall_velocity"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array, wvx: number, wvy: number, wvz: number): void;
|
|
106
106
|
constructor();
|
|
107
107
|
dependencies: (typeof FluidObstacle)[];
|
|
108
108
|
components_used: (ResourceAccessSpecification<typeof Transform64> | ResourceAccessSpecification<typeof FluidObstacle> | ResourceAccessSpecification<typeof Collider> | ResourceAccessSpecification<typeof RigidBody> | ResourceAccessSpecification<typeof FluidComponent>)[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A 3D lookup table as a `.cube` file holds it — what {@link cube_read } returns and {@link cube_write } takes.
|
|
3
|
+
*
|
|
4
|
+
* Entry `r + g·size + b·size²` holds the output for the input at lattice point (r, g, b): the input whose channel c
|
|
5
|
+
* is `domain_min[c] + (domain_max[c] - domain_min[c]) · i / (size - 1)` for that channel's index i. Red runs
|
|
6
|
+
* fastest, then green, then blue, as the format lays the entries out.
|
|
7
|
+
*
|
|
8
|
+
* The format carries numbers only. What the input and output mean — their primaries, transfer curves and units — is
|
|
9
|
+
* a contract between the writer and the reader, stated outside the table; a `.cube` file conventionally says it in
|
|
10
|
+
* its comments.
|
|
11
|
+
*/
|
|
12
|
+
type CubeLut = {
|
|
13
|
+
/**
|
|
14
|
+
* the `TITLE`, `""` when the file has none
|
|
15
|
+
*/
|
|
16
|
+
title: string;
|
|
17
|
+
/**
|
|
18
|
+
* the comment lines in file order, each without its `#` and the space after it
|
|
19
|
+
*/
|
|
20
|
+
comments: string[];
|
|
21
|
+
/**
|
|
22
|
+
* entries along each edge, at least 2
|
|
23
|
+
*/
|
|
24
|
+
size: number;
|
|
25
|
+
/**
|
|
26
|
+
* the input at lattice index 0, per channel
|
|
27
|
+
*/
|
|
28
|
+
domain_min: number[];
|
|
29
|
+
/**
|
|
30
|
+
* the input at lattice index `size - 1`, per channel
|
|
31
|
+
*/
|
|
32
|
+
domain_max: number[];
|
|
33
|
+
/**
|
|
34
|
+
* `size³` RGB triples
|
|
35
|
+
*/
|
|
36
|
+
data: Float32Array;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=CubeLut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeLut.d.ts","sourceRoot":"","sources":["../../../../../src/format/lut/cube/CubeLut.js"],"names":[],"mappings":";;;;;;;;;;;;;;;WAYc,MAAM;;;;cACN,MAAM,EAAE;;;;UACR,MAAM;;;;gBACN,MAAM,EAAE;;;;gBACR,MAAM,EAAE;;;;UACR,YAAY"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A 3D lookup table as a `.cube` file holds it — what {@link cube_read} returns and {@link cube_write} takes.
|
|
3
|
+
*
|
|
4
|
+
* Entry `r + g·size + b·size²` holds the output for the input at lattice point (r, g, b): the input whose channel c
|
|
5
|
+
* is `domain_min[c] + (domain_max[c] - domain_min[c]) · i / (size - 1)` for that channel's index i. Red runs
|
|
6
|
+
* fastest, then green, then blue, as the format lays the entries out.
|
|
7
|
+
*
|
|
8
|
+
* The format carries numbers only. What the input and output mean — their primaries, transfer curves and units — is
|
|
9
|
+
* a contract between the writer and the reader, stated outside the table; a `.cube` file conventionally says it in
|
|
10
|
+
* its comments.
|
|
11
|
+
*
|
|
12
|
+
* @typedef {object} CubeLut
|
|
13
|
+
* @property {string} title the `TITLE`, `""` when the file has none
|
|
14
|
+
* @property {string[]} comments the comment lines in file order, each without its `#` and the space after it
|
|
15
|
+
* @property {number} size entries along each edge, at least 2
|
|
16
|
+
* @property {number[]} domain_min the input at lattice index 0, per channel
|
|
17
|
+
* @property {number[]} domain_max the input at lattice index `size - 1`, per channel
|
|
18
|
+
* @property {Float32Array} data `size³` RGB triples
|
|
19
|
+
*
|
|
20
|
+
* @see Adobe Systems, "Cube LUT Specification", version 1.0, 2013
|
|
21
|
+
* @author Alex Goldring
|
|
22
|
+
* @copyright Company Named Limited (c) 2026
|
|
23
|
+
*/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read a 3D LUT in the `.cube` format.
|
|
3
|
+
*
|
|
4
|
+
* **What it reads**: `TITLE`, `LUT_3D_SIZE`, `DOMAIN_MIN`, `DOMAIN_MAX` and comment lines, in any order ahead of the
|
|
5
|
+
* table, then the table: one entry per line, three decimal numbers apart by spaces or tabs, red fastest. Blank lines
|
|
6
|
+
* are skipped anywhere and comments are kept wherever they are. `DOMAIN_MIN` and `DOMAIN_MAX` default to 0 and 1,
|
|
7
|
+
* as the format defines.
|
|
8
|
+
*
|
|
9
|
+
* **What it refuses**, by name: a 1D LUT (`LUT_1D_SIZE`), any other keyword, a keyword after the table has begun, a
|
|
10
|
+
* size under 2, a table with more or fewer than `size³` entries, an entry that is not three decimal numbers, and a
|
|
11
|
+
* domain whose minimum is not under its maximum in every channel. A size is checked against what the text could hold
|
|
12
|
+
* before anything is allocated for the table, so a file cannot claim more entries than its own length allows.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} text the whole file
|
|
15
|
+
* @returns {CubeLut}
|
|
16
|
+
* @throws {Error} naming the line and what is wrong with it
|
|
17
|
+
*
|
|
18
|
+
* @see cube_write
|
|
19
|
+
* @author Alex Goldring
|
|
20
|
+
* @copyright Company Named Limited (c) 2026
|
|
21
|
+
*/
|
|
22
|
+
export function cube_read(text: string): CubeLut;
|
|
23
|
+
//# sourceMappingURL=cube_read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cube_read.d.ts","sourceRoot":"","sources":["../../../../../src/format/lut/cube/cube_read.js"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,gCARW,MAAM,GACJ,OAAO,CAmJnB"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A decimal number as a `.cube` file writes one: optional sign, digits with an optional point, optional exponent.
|
|
3
|
+
* Narrower than `Number()`, which also takes hexadecimal, `Infinity` and the empty string.
|
|
4
|
+
* @type {RegExp}
|
|
5
|
+
*/
|
|
6
|
+
const DECIMAL = /^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param {string} token
|
|
10
|
+
* @param {number} line_number
|
|
11
|
+
* @returns {number}
|
|
12
|
+
*/
|
|
13
|
+
function parse_number(token, line_number) {
|
|
14
|
+
if (!DECIMAL.test(token)) {
|
|
15
|
+
throw new Error(`CUBE: line ${line_number}: '${token}' is not a number`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return Number(token);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param {string[]} tokens the keyword and its three values
|
|
23
|
+
* @param {number} line_number
|
|
24
|
+
* @returns {number[]}
|
|
25
|
+
*/
|
|
26
|
+
function parse_triple(tokens, line_number) {
|
|
27
|
+
if (tokens.length !== 4) {
|
|
28
|
+
throw new Error(`CUBE: line ${line_number}: ${tokens[0]} takes three numbers, found ${tokens.length - 1}`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return [
|
|
32
|
+
parse_number(tokens[1], line_number),
|
|
33
|
+
parse_number(tokens[2], line_number),
|
|
34
|
+
parse_number(tokens[3], line_number),
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Read a 3D LUT in the `.cube` format.
|
|
40
|
+
*
|
|
41
|
+
* **What it reads**: `TITLE`, `LUT_3D_SIZE`, `DOMAIN_MIN`, `DOMAIN_MAX` and comment lines, in any order ahead of the
|
|
42
|
+
* table, then the table: one entry per line, three decimal numbers apart by spaces or tabs, red fastest. Blank lines
|
|
43
|
+
* are skipped anywhere and comments are kept wherever they are. `DOMAIN_MIN` and `DOMAIN_MAX` default to 0 and 1,
|
|
44
|
+
* as the format defines.
|
|
45
|
+
*
|
|
46
|
+
* **What it refuses**, by name: a 1D LUT (`LUT_1D_SIZE`), any other keyword, a keyword after the table has begun, a
|
|
47
|
+
* size under 2, a table with more or fewer than `size³` entries, an entry that is not three decimal numbers, and a
|
|
48
|
+
* domain whose minimum is not under its maximum in every channel. A size is checked against what the text could hold
|
|
49
|
+
* before anything is allocated for the table, so a file cannot claim more entries than its own length allows.
|
|
50
|
+
*
|
|
51
|
+
* @param {string} text the whole file
|
|
52
|
+
* @returns {CubeLut}
|
|
53
|
+
* @throws {Error} naming the line and what is wrong with it
|
|
54
|
+
*
|
|
55
|
+
* @see cube_write
|
|
56
|
+
* @author Alex Goldring
|
|
57
|
+
* @copyright Company Named Limited (c) 2026
|
|
58
|
+
*/
|
|
59
|
+
export function cube_read(text) {
|
|
60
|
+
const lines = text.split(/\r\n|\n|\r/);
|
|
61
|
+
const line_count = lines.length;
|
|
62
|
+
|
|
63
|
+
let title = "";
|
|
64
|
+
const comments = [];
|
|
65
|
+
let size = 0;
|
|
66
|
+
const domain_min = [0, 0, 0];
|
|
67
|
+
const domain_max = [1, 1, 1];
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @type {Float32Array|null}
|
|
71
|
+
*/
|
|
72
|
+
let data = null;
|
|
73
|
+
let entries = 0;
|
|
74
|
+
let entry_count = 0;
|
|
75
|
+
|
|
76
|
+
for (let i = 0; i < line_count; i++) {
|
|
77
|
+
const line_number = i + 1;
|
|
78
|
+
const line = lines[i].trim();
|
|
79
|
+
|
|
80
|
+
if (line.length === 0) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (line.charCodeAt(0) === 35 /* # */) {
|
|
85
|
+
// the text after `# ` as it stands, trailing spaces and all
|
|
86
|
+
comments.push(lines[i].trimStart().substring(1).replace(/^ /, ""));
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const tokens = line.split(/[ \t]+/);
|
|
91
|
+
const head = tokens[0];
|
|
92
|
+
|
|
93
|
+
if (/^[A-Za-z_]/.test(head)) {
|
|
94
|
+
if (entries > 0) {
|
|
95
|
+
throw new Error(`CUBE: line ${line_number}: keyword ${head} after the table has begun`);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
switch (head) {
|
|
99
|
+
case "TITLE": {
|
|
100
|
+
const match = /^TITLE[ \t]+"([^"]*)"$/.exec(line);
|
|
101
|
+
|
|
102
|
+
if (match === null) {
|
|
103
|
+
throw new Error(`CUBE: line ${line_number}: TITLE takes one quoted string`);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
title = match[1];
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
case "LUT_3D_SIZE": {
|
|
111
|
+
if (tokens.length !== 2 || !/^\d+$/.test(tokens[1])) {
|
|
112
|
+
throw new Error(`CUBE: line ${line_number}: LUT_3D_SIZE takes one whole number`);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
size = Number(tokens[1]);
|
|
116
|
+
|
|
117
|
+
if (size < 2) {
|
|
118
|
+
throw new Error(`CUBE: line ${line_number}: LUT_3D_SIZE is ${size}, under the format's 2`);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
case "DOMAIN_MIN": {
|
|
125
|
+
const values = parse_triple(tokens, line_number);
|
|
126
|
+
domain_min[0] = values[0];
|
|
127
|
+
domain_min[1] = values[1];
|
|
128
|
+
domain_min[2] = values[2];
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
case "DOMAIN_MAX": {
|
|
133
|
+
const values = parse_triple(tokens, line_number);
|
|
134
|
+
domain_max[0] = values[0];
|
|
135
|
+
domain_max[1] = values[1];
|
|
136
|
+
domain_max[2] = values[2];
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
case "LUT_1D_SIZE":
|
|
141
|
+
throw new Error(`CUBE: line ${line_number}: a 1D LUT, where a 3D LUT was expected`);
|
|
142
|
+
|
|
143
|
+
default:
|
|
144
|
+
throw new Error(`CUBE: line ${line_number}: unsupported keyword ${head}`);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// the table
|
|
151
|
+
if (data === null) {
|
|
152
|
+
if (size === 0) {
|
|
153
|
+
throw new Error(`CUBE: line ${line_number}: table entry before LUT_3D_SIZE`);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
entry_count = size * size * size;
|
|
157
|
+
|
|
158
|
+
// every entry is at least three one-digit numbers and two separators, five characters, and each but the
|
|
159
|
+
// last ends its line
|
|
160
|
+
if (entry_count * 6 - 1 > text.length) {
|
|
161
|
+
throw new Error(`CUBE: LUT_3D_SIZE ${size} needs ${entry_count} entries, more than a file of ${text.length} characters can hold`);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
data = new Float32Array(entry_count * 3);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (tokens.length !== 3) {
|
|
168
|
+
throw new Error(`CUBE: line ${line_number}: an entry is three numbers, found ${tokens.length}`);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (entries >= entry_count) {
|
|
172
|
+
throw new Error(`CUBE: line ${line_number}: more than the ${entry_count} entries of LUT_3D_SIZE ${size}`);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const at = entries * 3;
|
|
176
|
+
|
|
177
|
+
data[at] = parse_number(tokens[0], line_number);
|
|
178
|
+
data[at + 1] = parse_number(tokens[1], line_number);
|
|
179
|
+
data[at + 2] = parse_number(tokens[2], line_number);
|
|
180
|
+
|
|
181
|
+
entries++;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (size === 0) {
|
|
185
|
+
throw new Error("CUBE: no LUT_3D_SIZE");
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (entries !== size * size * size) {
|
|
189
|
+
throw new Error(`CUBE: ${entries} entries, where LUT_3D_SIZE ${size} needs ${size * size * size}`);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
for (let c = 0; c < 3; c++) {
|
|
193
|
+
if (!(domain_min[c] < domain_max[c])) {
|
|
194
|
+
throw new Error(`CUBE: the domain of channel ${c} runs from ${domain_min[c]} to ${domain_max[c]}`);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return { title, comments, size, domain_min, domain_max, data };
|
|
199
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write a 3D LUT in the `.cube` format: the comments, `TITLE` where there is one, `LUT_3D_SIZE`, `DOMAIN_MIN`,
|
|
3
|
+
* `DOMAIN_MAX`, then one entry per line, red fastest. Each number is the shortest decimal that reads back as the same
|
|
4
|
+
* 32-bit float, so {@link cube_read} returns exactly the values written.
|
|
5
|
+
*
|
|
6
|
+
* @param {CubeLut} lut
|
|
7
|
+
* @returns {string} the file, lines ending in `\n`
|
|
8
|
+
* @throws {Error} where a value is not finite, or the title or a comment cannot be written on one line
|
|
9
|
+
*
|
|
10
|
+
* @see cube_read
|
|
11
|
+
* @author Alex Goldring
|
|
12
|
+
* @copyright Company Named Limited (c) 2026
|
|
13
|
+
*/
|
|
14
|
+
export function cube_write({ title, comments, size, domain_min, domain_max, data }: CubeLut): string;
|
|
15
|
+
//# sourceMappingURL=cube_write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cube_write.d.ts","sourceRoot":"","sources":["../../../../../src/format/lut/cube/cube_write.js"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;GAYG;AACH,oFARW,OAAO,GACL,MAAM,CAsDlB"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { assert } from "../../../core/assert.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The shortest decimal that reads back as the same 32-bit float.
|
|
5
|
+
*
|
|
6
|
+
* @param {number} value a float32 value, finite
|
|
7
|
+
* @returns {string}
|
|
8
|
+
*/
|
|
9
|
+
function format_f32(value) {
|
|
10
|
+
for (let precision = 1; precision < 9; precision++) {
|
|
11
|
+
const text = value.toPrecision(precision);
|
|
12
|
+
|
|
13
|
+
if (Math.fround(Number(text)) === value) {
|
|
14
|
+
return text;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// nine significant digits always identify a float32
|
|
19
|
+
return value.toPrecision(9);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {number[]} triple
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
26
|
+
function format_triple(triple) {
|
|
27
|
+
return `${format_f32(Math.fround(triple[0]))} ${format_f32(Math.fround(triple[1]))} ${format_f32(Math.fround(triple[2]))}`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Write a 3D LUT in the `.cube` format: the comments, `TITLE` where there is one, `LUT_3D_SIZE`, `DOMAIN_MIN`,
|
|
32
|
+
* `DOMAIN_MAX`, then one entry per line, red fastest. Each number is the shortest decimal that reads back as the same
|
|
33
|
+
* 32-bit float, so {@link cube_read} returns exactly the values written.
|
|
34
|
+
*
|
|
35
|
+
* @param {CubeLut} lut
|
|
36
|
+
* @returns {string} the file, lines ending in `\n`
|
|
37
|
+
* @throws {Error} where a value is not finite, or the title or a comment cannot be written on one line
|
|
38
|
+
*
|
|
39
|
+
* @see cube_read
|
|
40
|
+
* @author Alex Goldring
|
|
41
|
+
* @copyright Company Named Limited (c) 2026
|
|
42
|
+
*/
|
|
43
|
+
export function cube_write({ title, comments, size, domain_min, domain_max, data }) {
|
|
44
|
+
assert.isString(title, 'title');
|
|
45
|
+
assert.isArray(comments, 'comments');
|
|
46
|
+
assert.isNonNegativeInteger(size, 'size');
|
|
47
|
+
assert.greaterThanOrEqual(size, 2, 'size');
|
|
48
|
+
assert.isInstanceOf(data, Float32Array, 'data', 'Float32Array');
|
|
49
|
+
assert.equal(data.length, size * size * size * 3, 'data.length !== size³ × 3');
|
|
50
|
+
|
|
51
|
+
if (/["\r\n]/.test(title)) {
|
|
52
|
+
throw new Error(`CUBE: a title cannot hold a quote or a line break, '${title}'`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const lines = [];
|
|
56
|
+
|
|
57
|
+
for (const comment of comments) {
|
|
58
|
+
assert.isString(comment, 'comment');
|
|
59
|
+
|
|
60
|
+
if (/[\r\n]/.test(comment)) {
|
|
61
|
+
throw new Error(`CUBE: a comment cannot hold a line break, '${comment}'`);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
lines.push(`# ${comment}`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (title.length > 0) {
|
|
68
|
+
lines.push(`TITLE "${title}"`);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
lines.push(`LUT_3D_SIZE ${size}`);
|
|
72
|
+
lines.push(`DOMAIN_MIN ${format_triple(domain_min)}`);
|
|
73
|
+
lines.push(`DOMAIN_MAX ${format_triple(domain_max)}`);
|
|
74
|
+
|
|
75
|
+
const value_count = data.length;
|
|
76
|
+
|
|
77
|
+
for (let i = 0; i < value_count; i++) {
|
|
78
|
+
if (!Number.isFinite(data[i])) {
|
|
79
|
+
throw new Error(`CUBE: entry ${Math.floor(i / 3)} holds ${data[i]}, which the format cannot write`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
for (let i = 0; i < value_count; i += 3) {
|
|
84
|
+
lines.push(`${format_f32(data[i])} ${format_f32(data[i + 1])} ${format_f32(data[i + 2])}`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
lines.push("");
|
|
88
|
+
|
|
89
|
+
return lines.join("\n");
|
|
90
|
+
}
|
|
@@ -28,6 +28,7 @@ has the two lines that put it there. Another scene loads with `?scene=/some/othe
|
|
|
28
28
|
| Sun height, Sun turn | where the sun stands |
|
|
29
29
|
| Point lights | eight shadowed point lights along the scene's long axis, which the probes' hits take as local lights |
|
|
30
30
|
| TAA | the resolve the probe pick's noise is meant for |
|
|
31
|
+
| Auto exposure | the exposure metered from the frame and adapted to it; off, the factor is 2^compensation, 1 on this page |
|
|
31
32
|
| Bake budget | mesh SDF bricks baked a frame while the caches fill; the page starts above the engine's default so Sponza bakes in seconds |
|
|
32
33
|
|
|
33
34
|
Drag to orbit, wheel to zoom, WASD to move. The stats line reads the frame time and the mesh SDF bake's
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
<span>Indirect light</span>
|
|
90
90
|
<select id="indirect">
|
|
91
91
|
<option value="ProbeClipmap" selected>Probe clipmap</option>
|
|
92
|
+
<option value="ScreenProbes">Screen probes — Lumen's gather over the clipmap's world</option>
|
|
92
93
|
<option value="IBL">IBL</option>
|
|
93
94
|
</select>
|
|
94
95
|
</label>
|
|
@@ -124,6 +125,48 @@
|
|
|
124
125
|
|
|
125
126
|
<hr>
|
|
126
127
|
|
|
128
|
+
<label>
|
|
129
|
+
<span>Screen probes</span>
|
|
130
|
+
<select id="screen_probe_debug_view">
|
|
131
|
+
<option value="None" selected>Debug: none</option>
|
|
132
|
+
<option value="IndirectDiffuse">Indirect diffuse — irradiance / π, before the material</option>
|
|
133
|
+
<option value="ProbePlacement">Probe placement — uniform green, adaptive red, uncovered blue</option>
|
|
134
|
+
<option value="TraceKinds">Trace kinds — screen red, bricks green, world probes blue</option>
|
|
135
|
+
</select>
|
|
136
|
+
</label>
|
|
137
|
+
|
|
138
|
+
<label>
|
|
139
|
+
<span>Downsample</span>
|
|
140
|
+
<select id="screen_probe_downsample">
|
|
141
|
+
<option value="2">1 probe / 2×2 pixels</option>
|
|
142
|
+
<option value="4">1 probe / 4×4 pixels</option>
|
|
143
|
+
<option value="8">1 probe / 8×8 pixels</option>
|
|
144
|
+
<option value="16" selected>1 probe / 16×16 pixels</option>
|
|
145
|
+
<option value="32">1 probe / 32×32 pixels</option>
|
|
146
|
+
</select>
|
|
147
|
+
</label>
|
|
148
|
+
|
|
149
|
+
<label>
|
|
150
|
+
<span>Octahedron</span>
|
|
151
|
+
<select id="screen_probe_octahedron">
|
|
152
|
+
<option value="4">4×4 rays a probe</option>
|
|
153
|
+
<option value="8" selected>8×8 rays a probe</option>
|
|
154
|
+
<option value="16">16×16 rays a probe</option>
|
|
155
|
+
</select>
|
|
156
|
+
</label>
|
|
157
|
+
|
|
158
|
+
<label>
|
|
159
|
+
<input type="checkbox" id="screen_probe_importance" checked>
|
|
160
|
+
<span>Importance sampling <span class="hint">— rays follow the BRDF and last frame's light</span></span>
|
|
161
|
+
</label>
|
|
162
|
+
|
|
163
|
+
<label>
|
|
164
|
+
<input type="checkbox" id="screen_probe_screen_traces" checked>
|
|
165
|
+
<span>Screen traces <span class="hint">— the depth buffer before the SDF bricks</span></span>
|
|
166
|
+
</label>
|
|
167
|
+
|
|
168
|
+
<hr>
|
|
169
|
+
|
|
127
170
|
<label>
|
|
128
171
|
<input type="checkbox" id="sun" checked>
|
|
129
172
|
<span>Sun <span class="hint">— the directional light; L flips it</span></span>
|
|
@@ -151,6 +194,11 @@
|
|
|
151
194
|
<span>TAA <span class="hint">— resolves the probe pick's noise</span></span>
|
|
152
195
|
</label>
|
|
153
196
|
|
|
197
|
+
<label>
|
|
198
|
+
<input type="checkbox" id="auto_exposure" checked>
|
|
199
|
+
<span>Auto exposure <span class="hint">— off, the exposure is 1</span></span>
|
|
200
|
+
</label>
|
|
201
|
+
|
|
154
202
|
<hr>
|
|
155
203
|
|
|
156
204
|
<label>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/probe_clipmap/main.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../src/shade/playground/probe_clipmap/main.js"],"names":[],"mappings":"AA0FA;;;;;GAKG;AACH,yBAFa,QAAQ,IAAI,CAAC,CA0WzB"}
|
|
@@ -12,6 +12,7 @@ import { OrbitalCameraController } from "../../renderer/camera/orbital/OrbitalCa
|
|
|
12
12
|
import { PerspectiveCamera } from "../../renderer/camera/PerspectiveCamera.js";
|
|
13
13
|
import { create_frame_loop } from "../../renderer/create_frame_loop.js";
|
|
14
14
|
import { ProbeClipmapDebugView } from "../../renderer/global_illumination/probe_clipmap/debug/ProbeClipmapDebugView.js";
|
|
15
|
+
import { ScreenProbeDebugView } from "../../renderer/global_illumination/screen_probe/ScreenProbeDebugView.js";
|
|
15
16
|
import { make_sunlight } from "../../renderer/light/make_sunlight.js";
|
|
16
17
|
import { PointLight } from "../../renderer/light/model/PointLight.js";
|
|
17
18
|
import { place_light } from "../../renderer/light/place_light.js";
|
|
@@ -272,6 +273,34 @@ export async function start() {
|
|
|
272
273
|
renderer.probe_clipmap.debug_view = ProbeClipmapDebugView[event.target.value];
|
|
273
274
|
});
|
|
274
275
|
|
|
276
|
+
element('screen_probe_debug_view').addEventListener('change', event => {
|
|
277
|
+
renderer.screen_probes.debug_view = ScreenProbeDebugView[event.target.value];
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
element('screen_probe_downsample').addEventListener('change', event => {
|
|
281
|
+
renderer.screen_probes.downsample_factor = Number(event.target.value);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
element('screen_probe_octahedron').addEventListener('change', event => {
|
|
285
|
+
renderer.screen_probes.octahedron_resolution = Number(event.target.value);
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
element('screen_probe_importance').addEventListener('change', event => {
|
|
289
|
+
renderer.screen_probes.importance_sampling = event.target.checked;
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
element('screen_probe_screen_traces').addEventListener('change', event => {
|
|
293
|
+
renderer.screen_probes.screen_traces = event.target.checked;
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
// ?mode=ScreenProbes starts the page in another mode, as the panel's select would set it
|
|
297
|
+
const mode = new URLSearchParams(location.search).get('mode');
|
|
298
|
+
|
|
299
|
+
if (mode !== null && ShadeIndirectLightingMode[mode] !== undefined) {
|
|
300
|
+
renderer.indirect_lighting_mode = ShadeIndirectLightingMode[mode];
|
|
301
|
+
element('indirect').value = mode;
|
|
302
|
+
}
|
|
303
|
+
|
|
275
304
|
const taa_toggle = element('taa');
|
|
276
305
|
const path_tracing_toggle = element('path_tracing');
|
|
277
306
|
|
|
@@ -279,6 +308,13 @@ export async function start() {
|
|
|
279
308
|
renderer.feature_taa_enabled = event.target.checked;
|
|
280
309
|
});
|
|
281
310
|
|
|
311
|
+
const auto_exposure_toggle = element('auto_exposure');
|
|
312
|
+
|
|
313
|
+
auto_exposure_toggle.checked = renderer.feature_automatic_exposure_enabled;
|
|
314
|
+
auto_exposure_toggle.addEventListener('change', event => {
|
|
315
|
+
renderer.feature_automatic_exposure_enabled = event.target.checked;
|
|
316
|
+
});
|
|
317
|
+
|
|
282
318
|
/**
|
|
283
319
|
* What TAA was before the tracer turned it off, to give it back when the tracer goes.
|
|
284
320
|
* @type {boolean}
|