@woosh/meep-engine 3.78.3 → 3.78.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -13
- package/editor/view/node-graph/NodeGraphView.d.ts +1 -1
- package/editor/view/node-graph/NodeGraphView.js +1 -1
- package/package.json +1 -1
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts +2 -1
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts.map +1 -1
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.js +2 -1
- package/src/core/math/snap_to_integer.d.ts +13 -0
- package/src/core/math/snap_to_integer.d.ts.map +1 -0
- package/src/core/math/snap_to_integer.js +20 -0
- package/src/core/model/node-graph/NodeGraph.d.ts +0 -1
- package/src/core/model/node-graph/NodeGraph.d.ts.map +1 -1
- package/src/core/model/node-graph/NodeGraph.js +0 -1
- package/src/engine/graphics/hair/groom_bind_to_mesh.d.ts +1 -1
- package/src/engine/graphics/hair/groom_bind_to_mesh.js +1 -1
- package/src/engine/graphics/hair/groom_build_guides.d.ts +1 -1
- package/src/engine/graphics/hair/groom_build_guides.js +1 -1
- package/src/engine/graphics/impostors/voxel/README.md +11 -11
- package/src/engine/physics/cloth/collider/ClothColliderKind.js +1 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +1 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +2 -3
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +2 -3
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts +0 -2
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.js +0 -5
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.js +5 -3
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js +5 -3
- package/src/generation/grid/coords/grid_to_texel.d.ts +7 -1
- package/src/generation/grid/coords/grid_to_texel.d.ts.map +1 -1
- package/src/generation/grid/coords/grid_to_texel.js +11 -1
- package/src/generation/grid/coords/grid_to_texel_span.d.ts +15 -0
- package/src/generation/grid/coords/grid_to_texel_span.d.ts.map +1 -0
- package/src/generation/grid/coords/grid_to_texel_span.js +38 -0
- package/src/generation/grid/coords/texel_to_grid.d.ts +2 -1
- package/src/generation/grid/coords/texel_to_grid.d.ts.map +1 -1
- package/src/generation/grid/coords/texel_to_grid.js +6 -1
- package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts +32 -1
- package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.js +114 -9
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts +8 -0
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +91 -29
- package/src/generation/grid/layers/GridDataLayer.d.ts +21 -2
- package/src/generation/grid/layers/GridDataLayer.d.ts.map +1 -1
- package/src/generation/grid/layers/GridDataLayer.js +43 -4
- package/src/generation/placement/action/GridCellActionPlaceTags.d.ts +7 -1
- package/src/generation/placement/action/GridCellActionPlaceTags.d.ts.map +1 -1
- package/src/generation/placement/action/GridCellActionPlaceTags.js +42 -16
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts +5 -0
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts.map +1 -1
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.js +32 -9
- package/src/generation/rules/CellMatcherLayerBitMaskTest.d.ts.map +1 -1
- package/src/generation/rules/CellMatcherLayerBitMaskTest.js +6 -2
- package/src/generation/wfc/GridWFCCompiledTileSet.d.ts +4 -2
- package/src/generation/wfc/GridWFCCompiledTileSet.d.ts.map +1 -1
- package/src/generation/wfc/GridWFCCompiledTileSet.js +2 -2
- package/src/generation/wfc/GridWFCTileSet.d.ts +16 -7
- package/src/generation/wfc/GridWFCTileSet.d.ts.map +1 -1
- package/src/generation/wfc/GridWFCTileSet.js +32 -8
- package/src/shade/playground/contact_shadows/shader_contact_lab_composite.js +2 -2
- package/src/shade/playground/particle_editor/README.md +2 -2
- package/src/shade/playground/probe_clipmap/index.html +1 -1
- package/src/shade/playground/screen_probes/README.md +5 -5
- package/src/shade/playground/screen_probes/main.js +1 -1
- package/src/shade/playground/tonemap_sdr/README.md +3 -2
- package/src/shade/playground/vgeo_scene/README.md +1 -3
- package/src/shade/playground/vgeo_scene/main.js +3 -3
- package/src/shade/renderer/Renderer.d.ts +3 -3
- package/src/shade/renderer/Renderer.js +4 -4
- package/src/shade/renderer/ShadeIndirectLightingMode.js +1 -1
- package/src/shade/renderer/camera/PerspectiveCamera.js +1 -1
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts +11 -13
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/ColorGrade.js +11 -13
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.js +6 -7
- package/src/shade/renderer/deferred/tonemap/ToneMapper.d.ts +1 -1
- package/src/shade/renderer/deferred/tonemap/ToneMapper.js +1 -1
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts +6 -8
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.js +7 -10
- package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/MESH_SDF.js +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts +1 -2
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.js +1 -2
- package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.js +2 -1
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster_graph.js +1 -1
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +4 -4
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.d.ts +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.js +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +3 -3
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +3 -3
- package/src/shade/renderer/global_illumination/brick4/README.md +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +4 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +4 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.js +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +28 -35
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +28 -35
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +21 -24
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +21 -24
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts +8 -8
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +8 -8
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.js +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts +3 -5
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js +3 -5
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.js +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts +2 -3
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js +2 -3
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.js +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.js +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.js +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +13 -17
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +13 -17
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts +11 -14
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.js +11 -14
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.d.ts +2 -2
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.js +2 -2
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.d.ts +9 -9
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.js +9 -9
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +15 -18
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +16 -19
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts +10 -11
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.js +11 -12
- package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts +9 -8
- package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts.map +1 -1
- package/src/shade/renderer/hair/chunk_hair_bsdf.js +10 -9
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts +5 -6
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts.map +1 -1
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.js +5 -6
- package/src/shade/renderer/hair/hair_lighting.d.ts +3 -3
- package/src/shade/renderer/hair/hair_lighting.d.ts.map +1 -1
- package/src/shade/renderer/hair/hair_lighting.js +4 -5
- package/src/shade/renderer/hair/hair_scattering_lut.d.ts +5 -5
- package/src/shade/renderer/hair/hair_scattering_lut.js +5 -5
- package/src/shade/renderer/hair/shader_hair_roots.d.ts +2 -2
- package/src/shade/renderer/hair/shader_hair_roots.js +2 -2
- package/src/shade/renderer/light/environment/DEFINES.d.ts +1 -1
- package/src/shade/renderer/light/environment/DEFINES.js +1 -1
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.js +2 -2
- package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts +1 -2
- package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts.map +1 -1
- package/src/shade/renderer/material/dispatch/MaterialDispatch.js +1 -2
- package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts.map +1 -1
- package/src/shade/renderer/material/standard/fragment_gbuffer.js +2 -1
- package/src/shade/renderer/material/util/dielectric_specular_color.d.ts +1 -1
- package/src/shade/renderer/material/util/dielectric_specular_color.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_PRESETS.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts +3 -4
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js +3 -4
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.js +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +1 -1
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +2 -3
- package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts +1 -2
- package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.js +1 -2
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts +2 -3
- 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 +2 -3
- package/src/shade/renderer/postprocess/taa/filter_blackman_harris.d.ts +1 -1
- package/src/shade/renderer/postprocess/taa/filter_blackman_harris.js +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.js +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.js +1 -1
- package/src/shade/renderer/restir/di/ReSTIRDI.d.ts +3 -3
- package/src/shade/renderer/restir/di/ReSTIRDI.js +3 -3
- package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.d.ts +1 -1
- package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.js +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.js +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts +1 -2
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js +1 -2
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts +4 -5
- 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 +4 -5
- package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.js +2 -2
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +2 -2
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +2 -2
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +14 -17
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +18 -21
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.js +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.js +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +3 -4
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +3 -4
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +3 -3
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts +6 -8
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.js +8 -10
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts +5 -7
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.js +5 -7
- package/src/shade/renderer/texture/virtual/README.md +257 -257
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CodeChunk } from "../shader/compiler/CodeChunk.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* `B` of Chiang et al.'s colour mapping, the azimuthal roughness it is fitted at
|
|
4
|
+
* `B` of Chiang et al.'s colour mapping, the azimuthal roughness it is fitted at.
|
|
5
5
|
* @type {number}
|
|
6
6
|
*/
|
|
7
7
|
const B = 0.3;
|
|
@@ -24,7 +24,8 @@ const D = 5.969 - 0.215 * B + 2.532 * B ** 2 - 10.73 * B ** 3 + 5.574 * B ** 4 +
|
|
|
24
24
|
*
|
|
25
25
|
* `melanin` from 0 (none) to 1 (black), `redness` the share of it that is pheomelanin, `dye` a colour whose
|
|
26
26
|
* absorption adds to the pigments' (white adds none). The two mappings are each other's inverse: the colour is what
|
|
27
|
-
* the hair looks after multiple scattering, at {@link B}.
|
|
27
|
+
* the hair looks after multiple scattering, at {@link B}. `hair_absorption` gives the pigments' absorption, not
|
|
28
|
+
* the colour it maps to.
|
|
28
29
|
*
|
|
29
30
|
* @type {CodeChunk}
|
|
30
31
|
*/
|
|
@@ -54,8 +55,9 @@ fn hair_absorption(melanin: f32, redness: f32, dye: vec3<f32>) -> vec3<f32> {
|
|
|
54
55
|
`);
|
|
55
56
|
|
|
56
57
|
/**
|
|
57
|
-
* Light scattered by a hair fibre, single scattering:
|
|
58
|
-
*
|
|
58
|
+
* Light scattered by a hair fibre, single scattering: Marschner et al.'s three lobes in Karis's closed forms
|
|
59
|
+
* (Marschner et al. 2003; Karis 2016, "Physically Based Hair Shading in Unreal", SIGGRAPH course notes; Pekelis et
|
|
60
|
+
* al. 2015 for the shapes):
|
|
59
61
|
*
|
|
60
62
|
* ```wgsl
|
|
61
63
|
* fn hair_shading(l: vec3<f32>, v: vec3<f32>, t: vec3<f32>, absorption: vec3<f32>, roughness: f32,
|
|
@@ -66,12 +68,11 @@ fn hair_absorption(melanin: f32, redness: f32, dye: vec3<f32>) -> vec3<f32> {
|
|
|
66
68
|
* longitudinal roughness; `area` widens every lobe, for light from a solid angle (0 for a point light); `backlit`
|
|
67
69
|
* scales the transmission and the back of the reflection, 1 for a light behind the hair to show through it.
|
|
68
70
|
*
|
|
69
|
-
* R reflects at the cuticle, its shift the cuticle's tilt and its azimuthal width separable
|
|
70
|
-
*
|
|
71
|
-
*
|
|
71
|
+
* R reflects at the cuticle, its shift the cuticle's tilt and its azimuthal width separable; TT passes through the
|
|
72
|
+
* fibre, attenuated by `absorption` over its path; TRT reflects once inside. The result is what multiplies a light's
|
|
73
|
+
* radiance: no cosine is left to apply. Never negative.
|
|
72
74
|
*
|
|
73
|
-
*
|
|
74
|
-
* scattering is dual scattering's to add.
|
|
75
|
+
* No Kajiya-Kay diffuse term stands in for multiple scattering: multiple scattering is dual scattering's to add.
|
|
75
76
|
*
|
|
76
77
|
* @type {CodeChunk}
|
|
77
78
|
*/
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
export const HAIR_SCATTERING_LUT_RESOURCE: ShaderResourceDescriptor;
|
|
8
8
|
/**
|
|
9
9
|
* Light scattered by hair with multiple scattering: dual scattering (Zinke et al. 2008) over the single-scattering
|
|
10
|
-
* BSDF, as
|
|
11
|
-
* HairShading's `GlobalScattering * (Fs + LocalScattering)`):
|
|
10
|
+
* BSDF, composed as `global * (single + local)`:
|
|
12
11
|
*
|
|
13
12
|
* ```wgsl
|
|
14
13
|
* fn hair_scattering(l: vec3<f32>, v: vec3<f32>, t: vec3<f32>, absorption: vec3<f32>, roughness: f32,
|
|
@@ -21,10 +20,10 @@ export const HAIR_SCATTERING_LUT_RESOURCE: ShaderResourceDescriptor;
|
|
|
21
20
|
* off it for the strand's own. The global term passes the light through them, attenuated by the average front
|
|
22
21
|
* scattering to the power of their count and spread by their roughness; the local term adds what scatters back
|
|
23
22
|
* from the strands around the point. The average scatterings come from the table at the light's angle to the fibre,
|
|
24
|
-
* the roughness and the colour.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
23
|
+
* the roughness and the colour. The table is read at the fibre's roughness and the lobes' spreads take it clamped to
|
|
24
|
+
* [0.18, 0.6]: the spreads are Gaussians, and a narrower one would let a single smooth strand in front block all but
|
|
25
|
+
* the light along its own cone (at roughness 0.1 one strand passes a fortieth of what the clamp passes).
|
|
26
|
+
* No Kajiya-Kay term is added: this is the multiple scattering such a term stands in for.
|
|
28
27
|
*
|
|
29
28
|
* `hair_forward_transmittance` is the global term's energy alone, the average front scattering to the power of the
|
|
30
29
|
* strands passed: what reaches the point from a source as wide as the sky, over which the spread integrates to one.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_hair_dual_scattering.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/chunk_hair_dual_scattering.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,2CAFU,wBAAwB,CAE6E;AAE/G
|
|
1
|
+
{"version":3,"file":"chunk_hair_dual_scattering.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/chunk_hair_dual_scattering.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,2CAFU,wBAAwB,CAE6E;AAE/G;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,yCAFU,SAAS,CAqHhB;yCAxJsC,gDAAgD;0BAD/D,iCAAiC"}
|
|
@@ -13,8 +13,7 @@ export const HAIR_SCATTERING_LUT_RESOURCE = ShaderResourceDescriptor.texture("tH
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Light scattered by hair with multiple scattering: dual scattering (Zinke et al. 2008) over the single-scattering
|
|
16
|
-
* BSDF, as
|
|
17
|
-
* HairShading's `GlobalScattering * (Fs + LocalScattering)`):
|
|
16
|
+
* BSDF, composed as `global * (single + local)`:
|
|
18
17
|
*
|
|
19
18
|
* ```wgsl
|
|
20
19
|
* fn hair_scattering(l: vec3<f32>, v: vec3<f32>, t: vec3<f32>, absorption: vec3<f32>, roughness: f32,
|
|
@@ -27,10 +26,10 @@ export const HAIR_SCATTERING_LUT_RESOURCE = ShaderResourceDescriptor.texture("tH
|
|
|
27
26
|
* off it for the strand's own. The global term passes the light through them, attenuated by the average front
|
|
28
27
|
* scattering to the power of their count and spread by their roughness; the local term adds what scatters back
|
|
29
28
|
* from the strands around the point. The average scatterings come from the table at the light's angle to the fibre,
|
|
30
|
-
* the roughness and the colour.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
29
|
+
* the roughness and the colour. The table is read at the fibre's roughness and the lobes' spreads take it clamped to
|
|
30
|
+
* [0.18, 0.6]: the spreads are Gaussians, and a narrower one would let a single smooth strand in front block all but
|
|
31
|
+
* the light along its own cone (at roughness 0.1 one strand passes a fortieth of what the clamp passes).
|
|
32
|
+
* No Kajiya-Kay term is added: this is the multiple scattering such a term stands in for.
|
|
34
33
|
*
|
|
35
34
|
* `hair_forward_transmittance` is the global term's energy alone, the average front scattering to the power of the
|
|
36
35
|
* strands passed: what reaches the point from a source as wide as the sky, over which the spread integrates to one.
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* rectangle (4 vertices, a triangle strip). One pipeline per switch set, which picks the shadow technique and the
|
|
4
4
|
* indirect lighting the fragment links, and per format of the scene colour.
|
|
5
5
|
*
|
|
6
|
-
* A pixel's strand is lit by the shared light loop (`chunk_shade_direct_lights`) with the hair's lobe:
|
|
6
|
+
* A pixel's strand is lit by the shared light loop (`chunk_shade_direct_lights`) with the hair's lobe: the hair
|
|
7
7
|
* BSDF with dual scattering (`chunk_hair_dual_scattering`), the strands between the point and each light counted
|
|
8
8
|
* by a march through the instance's density volume (`chunk_hair_count_along`), each light's shadow taken from the
|
|
9
9
|
* scene's maps at the strand point with the light's own way as the normal. Indirect light is the renderer's mode's
|
|
10
|
-
* irradiance about the strand's normal, through the BSDF seen from the eye with every lobe widened (
|
|
11
|
-
*
|
|
10
|
+
* irradiance about the strand's normal, through the BSDF seen from the eye with every lobe widened (`area` 0.2) and
|
|
11
|
+
* dual scattering over the strands counted along the normal, which occludes the sky.
|
|
12
12
|
* The marches' taps are jittered by the frame's blue noise.
|
|
13
13
|
* The strand's colour is its instance's melanin, moved by the strand's variation byte, its redness and its dye.
|
|
14
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hair_lighting.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/hair_lighting.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hair_lighting.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hair/hair_lighting.js"],"names":[],"mappings":"AAiOA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iDAJW,OAAO,uCAAuC,EAAE,eAAe,6BAE7D,wBAAwB,CA+BpC;AArPD;;;GAGG;AACH,uCAFU,6BAA6B,CAM8B;AAErE;;;;GAIG;AACH,uCAFU,6BAA6B,CAaA;AAYvC;;;;;GAKG;AACH,sCAFU,2BAA2B,CAEY;AAwIjD;;;;GAIG;AACH,qCAFU,gBAAgB,CAEgC;yCAvNjB,8DAA8D;8CAYzD,qDAAqD;4CACvD,mDAAmD;iCAC9D,+BAA+B"}
|
|
@@ -170,8 +170,7 @@ fn fs_main(in: HairQuadVertex) -> @location(0) vec4<f32> {
|
|
|
170
170
|
|
|
171
171
|
shade_direct_lights(&context, position, view_direction, coord, view_depth);
|
|
172
172
|
|
|
173
|
-
// the light around the strand's normal, through the fibre seen from the eye with every lobe widened
|
|
174
|
-
// strands take it from Lumen
|
|
173
|
+
// the light around the strand's normal, through the fibre seen from the eye with every lobe widened
|
|
175
174
|
let normal = hair_normal(-towards_root, view_direction);
|
|
176
175
|
|
|
177
176
|
var radiance: vec3<f32>;
|
|
@@ -229,12 +228,12 @@ const pipelines = new Map();
|
|
|
229
228
|
* rectangle (4 vertices, a triangle strip). One pipeline per switch set, which picks the shadow technique and the
|
|
230
229
|
* indirect lighting the fragment links, and per format of the scene colour.
|
|
231
230
|
*
|
|
232
|
-
* A pixel's strand is lit by the shared light loop (`chunk_shade_direct_lights`) with the hair's lobe:
|
|
231
|
+
* A pixel's strand is lit by the shared light loop (`chunk_shade_direct_lights`) with the hair's lobe: the hair
|
|
233
232
|
* BSDF with dual scattering (`chunk_hair_dual_scattering`), the strands between the point and each light counted
|
|
234
233
|
* by a march through the instance's density volume (`chunk_hair_count_along`), each light's shadow taken from the
|
|
235
234
|
* scene's maps at the strand point with the light's own way as the normal. Indirect light is the renderer's mode's
|
|
236
|
-
* irradiance about the strand's normal, through the BSDF seen from the eye with every lobe widened (
|
|
237
|
-
*
|
|
235
|
+
* irradiance about the strand's normal, through the BSDF seen from the eye with every lobe widened (`area` 0.2) and
|
|
236
|
+
* dual scattering over the strands counted along the normal, which occludes the sky.
|
|
238
237
|
* The marches' taps are jittered by the frame's blue noise.
|
|
239
238
|
* The strand's colour is its instance's melanin, moved by the strand's variation byte, its redness and its dye.
|
|
240
239
|
*
|
|
@@ -51,12 +51,12 @@ export function hair_scattering_lut_generate({ phi_steps }?: {
|
|
|
51
51
|
phi_steps?: number;
|
|
52
52
|
}): Float32Array;
|
|
53
53
|
/**
|
|
54
|
-
* The hair's average scattering table, which dual scattering reads (Zinke et al. 2008
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
54
|
+
* The hair's average scattering table, which dual scattering reads (Zinke et al. 2008): for a fibre seen at
|
|
55
|
+
* `sin θ_v = |V·T|`, of longitudinal roughness `r` and colour `C`, the single-scattering BSDF integrated over the
|
|
56
|
+
* hemisphere of directions in front of the view (`A_front`, what passes through) and behind it (`A_back`, what comes
|
|
57
|
+
* back), no cosine, each clamped to [0, 1].
|
|
58
58
|
*
|
|
59
|
-
* Laid out
|
|
59
|
+
* Laid out with x `sin θ_v`, y `r`, z `sqrt(C)`, each at texel centres; two channels, front then back.
|
|
60
60
|
* The BSDF is `chunk_hair_shading` at area 0 and backlit 1, here as a lobe-wise twin that `hair_scattering_lut.spec.js`
|
|
61
61
|
* holds to the shader.
|
|
62
62
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The hair's average scattering table, which dual scattering reads (Zinke et al. 2008
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* The hair's average scattering table, which dual scattering reads (Zinke et al. 2008): for a fibre seen at
|
|
3
|
+
* `sin θ_v = |V·T|`, of longitudinal roughness `r` and colour `C`, the single-scattering BSDF integrated over the
|
|
4
|
+
* hemisphere of directions in front of the view (`A_front`, what passes through) and behind it (`A_back`, what comes
|
|
5
|
+
* back), no cosine, each clamped to [0, 1].
|
|
6
6
|
*
|
|
7
|
-
* Laid out
|
|
7
|
+
* Laid out with x `sin θ_v`, y `r`, z `sqrt(C)`, each at texel centres; two channels, front then back.
|
|
8
8
|
* The BSDF is `chunk_hair_shading` at area 0 and backlit 1, here as a lobe-wise twin that `hair_scattering_lut.spec.js`
|
|
9
9
|
* holds to the shader.
|
|
10
10
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const HAIR_ROOTS_SETTINGS: WebGPUStruct;
|
|
2
2
|
/**
|
|
3
|
-
* A triangle's frame
|
|
4
|
-
*
|
|
3
|
+
* A triangle's frame: the tangent along its first edge, the normal of its face, the bitangent the normal across the
|
|
4
|
+
* tangent, as the columns of a rotation:
|
|
5
5
|
*
|
|
6
6
|
* ```wgsl
|
|
7
7
|
* fn hair_triangle_frame(a: vec3<f32>, b: vec3<f32>, c: vec3<f32>) -> mat3x3<f32>
|
|
@@ -42,8 +42,8 @@ resources.createGroup()
|
|
|
42
42
|
.addStorageBuffer("hair_guide_bounds", WebGPUArray.from(atomic_u32), true);
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* A triangle's frame
|
|
46
|
-
*
|
|
45
|
+
* A triangle's frame: the tangent along its first edge, the normal of its face, the bitangent the normal across the
|
|
46
|
+
* tangent, as the columns of a rotation:
|
|
47
47
|
*
|
|
48
48
|
* ```wgsl
|
|
49
49
|
* fn hair_triangle_frame(a: vec3<f32>, b: vec3<f32>, c: vec3<f32>) -> mat3x3<f32>
|
|
@@ -14,7 +14,7 @@ export const BSDF_ROUGHNESS_MINIMUM: 0.02;
|
|
|
14
14
|
/**
|
|
15
15
|
* Specifies minimal reflectance for dielectrics (when metalness is zero)
|
|
16
16
|
* Nothing has lower reflectance than 2%.
|
|
17
|
-
* Popular engines use 4
|
|
17
|
+
* Popular engines use 4%, such as Frostbite, et al.
|
|
18
18
|
* @see "Physics and Math of Shading" by Natty Hoffman ( https://www.youtube.com/watch?v=j-A0mwsJRmk )
|
|
19
19
|
* @type {number}
|
|
20
20
|
*/
|
|
@@ -16,7 +16,7 @@ export const BSDF_ROUGHNESS_MINIMUM = 0.02
|
|
|
16
16
|
/**
|
|
17
17
|
* Specifies minimal reflectance for dielectrics (when metalness is zero)
|
|
18
18
|
* Nothing has lower reflectance than 2%.
|
|
19
|
-
* Popular engines use 4
|
|
19
|
+
* Popular engines use 4%, such as Frostbite, et al.
|
|
20
20
|
* @see "Physics and Math of Shading" by Natty Hoffman ( https://www.youtube.com/watch?v=j-A0mwsJRmk )
|
|
21
21
|
* @type {number}
|
|
22
22
|
*/
|
|
@@ -46,8 +46,8 @@ resources.createGroup()
|
|
|
46
46
|
* texel lands in level 1 once, whatever the sample pattern. The blur and the lobe are both Gaussians,
|
|
47
47
|
* so the lobe narrows by the blur's variance and level 1 comes out the lobe it is asked for.
|
|
48
48
|
*
|
|
49
|
-
* Samples are uniform in the cone, so each stands for the same solid angle.
|
|
50
|
-
*
|
|
49
|
+
* Samples are uniform in the cone, so each stands for the same solid angle. Importance sampling
|
|
50
|
+
* instead reads a coarser average in the lobe's tail than in its core; here the sun came out in blocks.
|
|
51
51
|
*
|
|
52
52
|
* Level 1 only. The levels after it read the level above, already smooth at their sample spacing
|
|
53
53
|
* (see shader_convolve_reflection_map).
|
|
@@ -14,8 +14,7 @@ export const MaterialDispatch: Readonly<{
|
|
|
14
14
|
/**
|
|
15
15
|
* The default, and the main path. A fullscreen triangle per material, masked to the material's
|
|
16
16
|
* pixels by a depth-equal test against a material-id depth buffer written from the visibility
|
|
17
|
-
* buffer first — the material-depth trick of [Doghramachi17]
|
|
18
|
-
* materials. The rasterizer finds each material's pixels, once per material, over the whole
|
|
17
|
+
* buffer first — the material-depth trick of [Doghramachi17]. The rasterizer finds each material's pixels, once per material, over the whole
|
|
19
18
|
* screen.
|
|
20
19
|
*/
|
|
21
20
|
Quad: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialDispatch.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/material/dispatch/MaterialDispatch.js"],"names":[],"mappings":";;;;+BAKU,MAAM;AALhB;;;;;;GAMG;AACH;IACI
|
|
1
|
+
{"version":3,"file":"MaterialDispatch.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/material/dispatch/MaterialDispatch.js"],"names":[],"mappings":";;;;+BAKU,MAAM;AALhB;;;;;;GAMG;AACH;IACI;;;;;OAKG;;IAEH;;;;;;;;;;;;OAYG;;GAEJ"}
|
|
@@ -9,8 +9,7 @@ export const MaterialDispatch = Object.freeze({
|
|
|
9
9
|
/**
|
|
10
10
|
* The default, and the main path. A fullscreen triangle per material, masked to the material's
|
|
11
11
|
* pixels by a depth-equal test against a material-id depth buffer written from the visibility
|
|
12
|
-
* buffer first — the material-depth trick of [Doghramachi17]
|
|
13
|
-
* materials. The rasterizer finds each material's pixels, once per material, over the whole
|
|
12
|
+
* buffer first — the material-depth trick of [Doghramachi17]. The rasterizer finds each material's pixels, once per material, over the whole
|
|
14
13
|
* screen.
|
|
15
14
|
*/
|
|
16
15
|
Quad: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragment_gbuffer.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/material/standard/fragment_gbuffer.js"],"names":[],"mappings":"AA0FA;;;;;;GAMG;AACH,kDAHW,6BAA6B,GAC3B,6BAA6B,CASzC;AAoBD;;;;;;;;GAQG;AACH,+DAHW,6BAA6B,GAC3B,2BAA2B,CAUvC;AASD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,+CALW,SAAS,eACT,SAAS,GAEP,SAAS,CAqOrB;AAgBD;;;;;;GAMG;AACH,qDAHW,SAAS,GACP,SAAS,CAerB;AAED;;;;;;;;;GASG;AACH;IAL2B,KAAK,EAArB,MAAM;IACiC,cAAc,EAArD,6BAA6B;IACV,OAAO,EAA1B,SAAS;IACP,wBAAwB,CAUpC;AAED;;;;;;;GAOG;AACH,8DAJW,MAAM,UACN,gBAAgB,GACd,wBAAwB,
|
|
1
|
+
{"version":3,"file":"fragment_gbuffer.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/material/standard/fragment_gbuffer.js"],"names":[],"mappings":"AA0FA;;;;;;GAMG;AACH,kDAHW,6BAA6B,GAC3B,6BAA6B,CASzC;AAoBD;;;;;;;;GAQG;AACH,+DAHW,6BAA6B,GAC3B,2BAA2B,CAUvC;AASD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,+CALW,SAAS,eACT,SAAS,GAEP,SAAS,CAqOrB;AAgBD;;;;;;GAMG;AACH,qDAHW,SAAS,GACP,SAAS,CAerB;AAED;;;;;;;;;GASG;AACH;IAL2B,KAAK,EAArB,MAAM;IACiC,cAAc,EAArD,6BAA6B;IACV,OAAO,EAA1B,SAAS;IACP,wBAAwB,CAUpC;AAED;;;;;;;GAOG;AACH,8DAJW,MAAM,UACN,gBAAgB,GACd,wBAAwB,CA6BpC;AApbD;;;GAGG;AAGH;;;;;;;;;GASG;AACH,qCAFU,6BAA6B,CAEmC;AA8B1E;;;;GAIG;AACH,uCAFU,6BAA6B,CAEqC;AAgC5E;;;;GAIG;AACH,wCAFU,2BAA2B,CAEoE;AAiQzG;;;;;GAKG;AACH,4CAFU,SAAS,CAQhB;AAiFH;;;;GAIG;AACH,6BAFU,gBAAgB,CAMvB;8CAzc2C,wDAAwD;4CAC1D,sDAAsD;0BAFxE,oCAAoC;yCA/CrB,iEAAiE;iCAkDzE,kCAAkC"}
|
|
@@ -483,7 +483,8 @@ export function gbuffer_pipeline_descriptor_for_shader(label, shader) {
|
|
|
483
483
|
targets: G_BUFFER_COLOR_TARGETS
|
|
484
484
|
},
|
|
485
485
|
depthStencil: {
|
|
486
|
-
// depth is actually a material mask
|
|
486
|
+
// depth is actually a material mask (`MATERIAL_MASK_FORMAT`): an `equal` test against the material's
|
|
487
|
+
// place, written as depth, keeps only that material's pixels
|
|
487
488
|
depthCompare: 'equal',
|
|
488
489
|
format: MATERIAL_MASK_FORMAT,
|
|
489
490
|
depthWriteEnabled: false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Specifies minimal reflectance for dielectrics (when metalness is zero)
|
|
3
|
-
* Nothing has lower reflectance than 2%, but we use 4% to have consistent results with
|
|
3
|
+
* Nothing has lower reflectance than 2%, but we use 4% to have consistent results with Frostbite, et al.
|
|
4
4
|
* @type {Readonly<Color>}
|
|
5
5
|
*/
|
|
6
6
|
export const dielectric_specular_color: Readonly<Color>;
|
|
@@ -2,7 +2,7 @@ import { Color } from "../../../../core/color/Color.js";
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Specifies minimal reflectance for dielectrics (when metalness is zero)
|
|
5
|
-
* Nothing has lower reflectance than 2%, but we use 4% to have consistent results with
|
|
5
|
+
* Nothing has lower reflectance than 2%, but we use 4% to have consistent results with Frostbite, et al.
|
|
6
6
|
* @type {Readonly<Color>}
|
|
7
7
|
*/
|
|
8
8
|
export const dielectric_specular_color = Object.freeze(new Color(0.04, 0.04, 0.04));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tuning constants for the
|
|
2
|
+
* Tuning constants for the gather-based (diaphragm / cinematic) DoF.
|
|
3
3
|
*
|
|
4
4
|
* Unlike the ray-march path (which marches `sample_count × step_count` taps
|
|
5
5
|
* at full resolution), this is a scatter-as-gather over a half-resolution
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DOF_MAX_COC_RADIUS } from "../DOF_CONFIG.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Tuning constants for the
|
|
4
|
+
* Tuning constants for the gather-based (diaphragm / cinematic) DoF.
|
|
5
5
|
*
|
|
6
6
|
* Unlike the ray-march path (which marches `sample_count × step_count` taps
|
|
7
7
|
* at full resolution), this is a scatter-as-gather over a half-resolution
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Named DoF looks for the
|
|
2
|
+
* Named DoF looks for the gather path. The front-end fields a
|
|
3
3
|
* preset writes (`f_number`, `physical_gain`, `focus_region`, `blade_count`,
|
|
4
4
|
* `blade_rotation`, `highlight_boost`) are identical to the ray-march path's,
|
|
5
5
|
* so the presets are shared verbatim — a thin re-export of {@link DOF_PRESETS}.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Per-frame parameters for the
|
|
2
|
+
* Per-frame parameters for the gather-based DoF — everything *except*
|
|
3
3
|
* the focus distance, which is GPU-resident in {@link DOF_FOCUS_STATE_STRUCT}
|
|
4
4
|
* (written by the shared autofocus compute pass). The physical fields mirror
|
|
5
5
|
* the ray-march {@link DOF_SETTINGS_STRUCT}; the gather replaces the march
|
|
@@ -2,7 +2,7 @@ import { f32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
|
2
2
|
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Per-frame parameters for the
|
|
5
|
+
* Per-frame parameters for the gather-based DoF — everything *except*
|
|
6
6
|
* the focus distance, which is GPU-resident in {@link DOF_FOCUS_STATE_STRUCT}
|
|
7
7
|
* (written by the shared autofocus compute pass). The physical fields mirror
|
|
8
8
|
* the ray-march {@link DOF_SETTINGS_STRUCT}; the gather replaces the march
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Texture formats for the
|
|
2
|
+
* Texture formats for the gather-based (diaphragm / cinematic) DoF.
|
|
3
3
|
*
|
|
4
4
|
* The setup pass emits two HDR fields and the gathers write HDR colour, so
|
|
5
5
|
* rgba16float is required throughout: the blur averages scene radiance in
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Texture formats for the
|
|
2
|
+
* Texture formats for the gather-based (diaphragm / cinematic) DoF.
|
|
3
3
|
*
|
|
4
4
|
* The setup pass emits two HDR fields and the gathers write HDR colour, so
|
|
5
5
|
* rgba16float is required throughout: the blur averages scene radiance in
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
* @typedef {import("../../../camera/PerspectiveCamera.js").PerspectiveCamera} PerspectiveCamera
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Gather-based (diaphragm / cinematic) depth of field — a half-resolution
|
|
7
7
|
* scatter-as-gather with separate near/far fields, a near-field coverage alpha
|
|
8
|
-
* (the foreground bleeds over in-focus geometry), and a full-res recombine
|
|
9
|
-
*
|
|
10
|
-
* foreground spilling past its silhouette.
|
|
8
|
+
* (the foreground bleeds over in-focus geometry), and a full-res recombine:
|
|
9
|
+
* true bokeh discs and out-of-focus foreground spilling past its silhouette.
|
|
11
10
|
*
|
|
12
11
|
* A drop-in alternative to {@link DepthOfField} (the ray-march path): the same
|
|
13
12
|
* construction (a device), the same public parameters and focus helpers, and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepthOfFieldU.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js"],"names":[],"mappings":"AAUA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"DepthOfFieldU.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js"],"names":[],"mappings":"AAUA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IA0GI;;OAEG;IACH,+BAEC;IAhGD;;;;OAIG;IACH,SAFU,KAAK,GAAC,QAAQ,GAAC,MAAM,GAAC,OAAO,CAEpB;IAEnB;;;OAGG;IACH,QAFU,MAAM,GAAC,IAAI,CAEP;IAEd;;;;;;;;;;OAUG;IACH,OAFU,MAAM,CAES;IAEzB;;;;OAIG;IACH,iBAFU,MAAM,CAEO;IAEvB;;;;OAIG;IACH,cAFU,MAAM,CAEG;IAEnB;;;;OAIG;IACH,UAFU,MAAM,CAED;IAEf;;;;OAIG;IACH,iBAFU,MAAM,GAAC,IAAI,CAEE;IAEvB;;;OAGG;IACH,kBAFU,MAAM,CAEQ;IAExB;;;OAGG;IACH,eAFU,MAAM,CAEI;IAEpB;;;;OAIG;IACH,aAFU,MAAM,CAEA;IAEhB,qEAAqE;IACrE,gBAD2D,MAAM,CAC5C;IAErB;;;;OAIG;IACH,iBAFU,MAAM,CAEM;IAEtB;;;;;OAKG;IACH,gBAFU,MAAM,CAEK;IASrB,6DAA6D;IAC7D,kBAA8C;IAE9C,0DAA0D;IAC1D,qCAAwE;IAExE,uEAAuE;IACvE,gDAAqF;IAErF,kEAAkE;IAClE,yCAA0E;IAE1E,4EAA4E;IAC5E,uBAAsD;IAEtD;;;;OAIG;IACH,oBAFW,MAAM,QAahB;IAED;;;;OAIG;IACH,kBAFW,MAAM,QAehB;IAWD;;;;OAIG;IACH,0BAFW,OAAO,gDAAgD,EAAE,eAAe,QAIlF;IAkBD;;;;;;;;;;;;;OAaG;IACH;QAR4B,KAAK,EAAtB,UAAU;QACG,WAAW,EAAxB,MAAM;QACO,KAAK,EAAlB,MAAM;QACkB,MAAM,EAA9B,iBAAiB;QACD,aAAa;QACd,UAAU,EAAzB,MAAM,EAAE;QACN,MAAM,CAmDlB;IAED,uDAAuD;IACvD,gBAKC;;CACJ;yBArSY,OAAO,iEAAiE,EAAE,UAAU;gCACpF,OAAO,sCAAsC,EAAE,iBAAiB"}
|
|
@@ -14,11 +14,10 @@ import { enquire_postprocess_dof2_pipelines, graph_postprocess_dof2 } from "./gr
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Gather-based (diaphragm / cinematic) depth of field — a half-resolution
|
|
18
18
|
* scatter-as-gather with separate near/far fields, a near-field coverage alpha
|
|
19
|
-
* (the foreground bleeds over in-focus geometry), and a full-res recombine
|
|
20
|
-
*
|
|
21
|
-
* foreground spilling past its silhouette.
|
|
19
|
+
* (the foreground bleeds over in-focus geometry), and a full-res recombine:
|
|
20
|
+
* true bokeh discs and out-of-focus foreground spilling past its silhouette.
|
|
22
21
|
*
|
|
23
22
|
* A drop-in alternative to {@link DepthOfField} (the ray-march path): the same
|
|
24
23
|
* construction (a device), the same public parameters and focus helpers, and
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export function enquire_postprocess_dof2_pipelines(enquiry: import("../../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry, fill: boolean): void;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Gather-based (diaphragm / cinematic) depth of field. Passes:
|
|
10
10
|
*
|
|
11
11
|
* 0. **Autofocus** (compute, 1 thread — REUSED from the ray-march path) —
|
|
12
12
|
* reads the depth buffer (or a CPU explicit target), eases the
|
|
@@ -33,7 +33,7 @@ export function enquire_postprocess_dof2_pipelines(enquiry, fill) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Gather-based (diaphragm / cinematic) depth of field. Passes:
|
|
37
37
|
*
|
|
38
38
|
* 0. **Autofocus** (compute, 1 thread — REUSED from the ray-march path) —
|
|
39
39
|
* reads the depth buffer (or a CPU explicit target), eases the
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The factor lives in one buffer for the manager's life, {@link multiplier}, which a frame's {@link update} or
|
|
6
6
|
* {@link unadapted} writes over. A pass recorded ahead of that write in the frame reads the factor the last frame was
|
|
7
|
-
* shown with: the exposure of the image on screen,
|
|
7
|
+
* shown with: the exposure of the image on screen, the frame's pre-exposure.
|
|
8
8
|
*
|
|
9
9
|
* Beside it, {@link adaptation}: the luminance the view is adapted to, cd/m², written by the same pass. Adapted, it is
|
|
10
10
|
* the luminance the eye has adapted to, without {@link exposure_compensation}; unadapted, it is the luminance the
|
|
@@ -33,7 +33,7 @@ const TARGET_LUMINANCE_DESCRIPTOR = BufferResourceDescriptor.from(
|
|
|
33
33
|
*
|
|
34
34
|
* The factor lives in one buffer for the manager's life, {@link multiplier}, which a frame's {@link update} or
|
|
35
35
|
* {@link unadapted} writes over. A pass recorded ahead of that write in the frame reads the factor the last frame was
|
|
36
|
-
* shown with: the exposure of the image on screen,
|
|
36
|
+
* shown with: the exposure of the image on screen, the frame's pre-exposure.
|
|
37
37
|
*
|
|
38
38
|
* Beside it, {@link adaptation}: the luminance the view is adapted to, cd/m², written by the same pass. Adapted, it is
|
|
39
39
|
* the luminance the eye has adapted to, without {@link exposure_compensation}; unadapted, it is the luminance the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ao_reproject_shader.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/gtao/ao_reproject_shader.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ao_reproject_shader.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/gtao/ao_reproject_shader.js"],"names":[],"mappings":"AA4RA;;;;;;;;;;;;;GAaG;AACH,kCAFU,WAAW,CAqBnB;4BA/S0B,6BAA6B"}
|
|
@@ -100,9 +100,8 @@ fn compute_center_statistics(
|
|
|
100
100
|
return NeighbourhoodStatistics(moments * rcp_divider, bend * rcp_divider, bend_square * rcp_divider);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
// A face this far from another is another surface: half a right angle
|
|
104
|
-
//
|
|
105
|
-
// crease's well outside.
|
|
103
|
+
// A face this far from another is another surface: half a right angle. A tessellated curve's faces sit well inside
|
|
104
|
+
// it, a crease's well outside.
|
|
106
105
|
const SAME_SURFACE_COS = 0.70710678;
|
|
107
106
|
|
|
108
107
|
// 1 where the history texel at tap was written on this texel's surface, by its face normal: last frame's
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* NeighborMax 3×3 neighborhood only reaches 3K pixels — fast-
|
|
14
14
|
* moving content can outpace its tile's expansion.
|
|
15
15
|
*
|
|
16
|
-
* Jimenez 2014 uses 20; 16 is the next power-of-two below that
|
|
17
|
-
* what UE / most modern engines settle on.
|
|
16
|
+
* Jimenez 2014 uses 20; 16 is the next power-of-two below that.
|
|
18
17
|
*
|
|
19
18
|
* @type {number}
|
|
20
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MOTION_BLUR_CONFIG.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"MOTION_BLUR_CONFIG.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,oCAFU,MAAM,CAEwB;AAExC;;;;;;;;;;GAUG;AACH,uCAFU,MAAM,CAE2B;AAE3C;;;;;;;GAOG;AACH,+CAFU,MAAM,CAEoC;AAEpD;;;;;;;;;GASG;AACH,wCAFU,MAAM,CAE8B"}
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
* NeighborMax 3×3 neighborhood only reaches 3K pixels — fast-
|
|
14
14
|
* moving content can outpace its tile's expansion.
|
|
15
15
|
*
|
|
16
|
-
* Jimenez 2014 uses 20; 16 is the next power-of-two below that
|
|
17
|
-
* what UE / most modern engines settle on.
|
|
16
|
+
* Jimenez 2014 uses 20; 16 is the next power-of-two below that.
|
|
18
17
|
*
|
|
19
18
|
* @type {number}
|
|
20
19
|
*/
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `depth_motion` is the view depth the point moved through since last frame, the velocity buffer's z
|
|
5
5
|
* (`VELOCITY_FORMAT`). Last frame's depth is weighed against the point's depth then, its depth now
|
|
6
|
-
* less that
|
|
7
|
-
*
|
|
8
|
-
* as a disocclusion.
|
|
6
|
+
* less that. FSR2 has no depth in its motion and weighs against the depth now, which reads a surface
|
|
7
|
+
* moving away from the camera as a disocclusion.
|
|
9
8
|
*
|
|
10
9
|
* NOTE: deliberately uses a 2x2 *min*-gather over inverted-depth prev samples (= farthest
|
|
11
10
|
* in view space), which is the OPPOSITE of FSR2's "closest reconstructed prev depth"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_fsr2_compute_depth_clip.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"chunk_fsr2_compute_depth_clip.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,4CAFU,SAAS,CAoGjB;0BArIwB,oCAAoC"}
|
|
@@ -11,9 +11,8 @@ import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
|
11
11
|
*
|
|
12
12
|
* `depth_motion` is the view depth the point moved through since last frame, the velocity buffer's z
|
|
13
13
|
* (`VELOCITY_FORMAT`). Last frame's depth is weighed against the point's depth then, its depth now
|
|
14
|
-
* less that
|
|
15
|
-
*
|
|
16
|
-
* as a disocclusion.
|
|
14
|
+
* less that. FSR2 has no depth in its motion and weighs against the depth now, which reads a surface
|
|
15
|
+
* moving away from the camera as a disocclusion.
|
|
17
16
|
*
|
|
18
17
|
* NOTE: deliberately uses a 2x2 *min*-gather over inverted-depth prev samples (= farthest
|
|
19
18
|
* in view space), which is the OPPOSITE of FSR2's "closest reconstructed prev depth"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Based on
|
|
2
|
+
* Based on Karis 2014, "High Quality Temporal Supersampling", SIGGRAPH 2014 Advances in Real-Time Rendering course
|
|
3
3
|
* @see https://github.com/TheRealMJP/MSAAFilter/blob/cfc1c19411e24dc07f74272c17f423330ac96941/MSAAFilter/Resolve.hlsl#L133* @param {number} x
|
|
4
4
|
* @returns {number}
|
|
5
5
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { clamp01 } from "../../../../core/math/clamp01.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Based on
|
|
4
|
+
* Based on Karis 2014, "High Quality Temporal Supersampling", SIGGRAPH 2014 Advances in Real-Time Rendering course
|
|
5
5
|
* @see https://github.com/TheRealMJP/MSAAFilter/blob/cfc1c19411e24dc07f74272c17f423330ac96941/MSAAFilter/Resolve.hlsl#L133* @param {number} x
|
|
6
6
|
* @returns {number}
|
|
7
7
|
*/
|
package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export const DEPTH_STENCIL_STATE_SHADOW_CASCADE: Readonly<DepthStencilState>;
|
|
7
7
|
/**
|
|
8
8
|
* The opaque casters of a directional light's cascades, into the shadow atlas: the shadow pass
|
|
9
|
-
* (`shadow_rasterization_pass_descriptor`) with
|
|
9
|
+
* (`shadow_rasterization_pass_descriptor`) with the cascade caster bias in the vertex stage,
|
|
10
10
|
* {@link chunk_shadow_cascade_caster_position}, in place of the rasterizer's.
|
|
11
11
|
*
|
|
12
12
|
* Orthographic views only: the vertex stage reads the light's direction and the texel's world size off the
|
package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.js
CHANGED
|
@@ -113,7 +113,7 @@ fn main(
|
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* The opaque casters of a directional light's cascades, into the shadow atlas: the shadow pass
|
|
116
|
-
* (`shadow_rasterization_pass_descriptor`) with
|
|
116
|
+
* (`shadow_rasterization_pass_descriptor`) with the cascade caster bias in the vertex stage,
|
|
117
117
|
* {@link chunk_shadow_cascade_caster_position}, in place of the rasterizer's.
|
|
118
118
|
*
|
|
119
119
|
* Orthographic views only: the vertex stage reads the light's direction and the texel's world size off the
|
|
@@ -98,7 +98,7 @@ fn alpha_tested_caster_position(node_global: mat4x4f, header: ${MESHLET_METADATA
|
|
|
98
98
|
`, [MESHLET_METADATA_STRUCT.declaration_chunk]);
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* The same for a cascade: pushed by
|
|
101
|
+
* The same for a cascade: pushed by the cascade caster bias, {@link chunk_shadow_cascade_caster_position}.
|
|
102
102
|
*/
|
|
103
103
|
const chunk_caster_position_cascade = CodeChunk.from(
|
|
104
104
|
//language=WGSL
|