@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
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @typedef {import("../../view/GPUViewContext.js").GPUViewContext} GPUViewContext
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* Orchestrator for the ReSTIR DI subsystem (
|
|
8
|
-
*
|
|
7
|
+
* Orchestrator for the ReSTIR DI subsystem (stochastic direct shadowing for
|
|
8
|
+
* local point/spot lights, resolved in screen bounds).
|
|
9
9
|
*
|
|
10
10
|
* Owns the per-pixel ping-pong reservoir storage buffers used by temporal reuse:
|
|
11
11
|
* each frame the pass reads the previous frame's buffer (reprojected) and writes
|
|
@@ -25,7 +25,7 @@ export class ReSTIRDI {
|
|
|
25
25
|
*/
|
|
26
26
|
m_initial: number;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Hybrid shadows: try a short screen-space contact trace
|
|
29
29
|
* before the ray-traced fallback. false = pure ray-traced visibility.
|
|
30
30
|
* @type {boolean}
|
|
31
31
|
*/
|
|
@@ -8,8 +8,8 @@ import { enquire_restir_di_pipelines, graph_restir_di } from "./graph_restir_di.
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Orchestrator for the ReSTIR DI subsystem (
|
|
12
|
-
*
|
|
11
|
+
* Orchestrator for the ReSTIR DI subsystem (stochastic direct shadowing for
|
|
12
|
+
* local point/spot lights, resolved in screen bounds).
|
|
13
13
|
*
|
|
14
14
|
* Owns the per-pixel ping-pong reservoir storage buffers used by temporal reuse:
|
|
15
15
|
* each frame the pass reads the previous frame's buffer (reprojected) and writes
|
|
@@ -27,7 +27,7 @@ export class ReSTIRDI {
|
|
|
27
27
|
m_initial = 8;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Hybrid shadows: try a short screen-space contact trace
|
|
31
31
|
* before the ray-traced fallback. false = pure ray-traced visibility.
|
|
32
32
|
* @type {boolean}
|
|
33
33
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Hybrid shadow visibility with a screen-space -> ray-tracing
|
|
3
3
|
* hand-off, using the conservative HiZ march for the screen-space portion.
|
|
4
4
|
*
|
|
5
5
|
* The HiZ trace finds the furthest point along the ray it can confirm clear
|
|
@@ -5,7 +5,7 @@ import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
|
5
5
|
import { chunk_restir_ss_trace_hiz } from "./chunk_restir_ss_trace_hiz.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Hybrid shadow visibility with a screen-space -> ray-tracing
|
|
9
9
|
* hand-off, using the conservative HiZ march for the screen-space portion.
|
|
10
10
|
*
|
|
11
11
|
* The HiZ trace finds the furthest point along the ray it can confirm clear
|
|
@@ -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 {CodeChunk}
|
|
5
5
|
*/
|
|
6
6
|
export const chunk_MIN_DIELECTRICS_F0: CodeChunk;
|
|
@@ -3,7 +3,7 @@ import { CodeChunk } from "../../compiler/CodeChunk.js";
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Specifies minimal reflectance for dielectrics (when metalness is zero)
|
|
6
|
-
* Nothing has lower reflectance than 2%, but we use 4% to have consistent results with
|
|
6
|
+
* Nothing has lower reflectance than 2%, but we use 4% to have consistent results with Frostbite, et al.
|
|
7
7
|
* @type {CodeChunk}
|
|
8
8
|
*/
|
|
9
9
|
export const chunk_MIN_DIELECTRICS_F0 = CodeChunk.from(
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* No material reflects less than 2% head-on, so a lower authored F0 is not a material's but an author's way of
|
|
6
6
|
* saying "less specular", down to none at 0: a black metal. Schlick's Fresnel with F90 held at 1 still returns
|
|
7
|
-
* `(1 - VoH)^5` of the light there, so F90 follows F0 down
|
|
8
|
-
* `EnvBRDF` in `BRDF.ush`, `saturate(50 * SpecularColor.g)`), after Schuler, "An Efficient and Physically
|
|
7
|
+
* `(1 - VoH)^5` of the light there, so F90 follows F0 down, after Schuler, "An Efficient and Physically
|
|
9
8
|
* Plausible Real-Time Shading Model", ShaderX7, and Hoffman 2010, "Crafting Physically Motivated Shading Models
|
|
10
9
|
* for Game Development".
|
|
11
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_shadowed_F90.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"chunk_shadowed_F90.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AACH,iCAFU,SAAS,CAcjB;0BA/BwB,6BAA6B"}
|
|
@@ -7,8 +7,7 @@ import { chunk_rgb_to_luminance } from "../color/chunk_rgb_to_luminance.js";
|
|
|
7
7
|
*
|
|
8
8
|
* No material reflects less than 2% head-on, so a lower authored F0 is not a material's but an author's way of
|
|
9
9
|
* saying "less specular", down to none at 0: a black metal. Schlick's Fresnel with F90 held at 1 still returns
|
|
10
|
-
* `(1 - VoH)^5` of the light there, so F90 follows F0 down
|
|
11
|
-
* `EnvBRDF` in `BRDF.ush`, `saturate(50 * SpecularColor.g)`), after Schuler, "An Efficient and Physically
|
|
10
|
+
* `(1 - VoH)^5` of the light there, so F90 follows F0 down, after Schuler, "An Efficient and Physically
|
|
12
11
|
* Plausible Real-Time Shading Model", ShaderX7, and Hoffman 2010, "Crafting Physically Motivated Shading Models
|
|
13
12
|
* for Game Development".
|
|
14
13
|
*
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Linear Rec.709 (D65) to AP1 (ACES white), Bradford-adapted
|
|
3
|
-
* working space. Row-major.
|
|
2
|
+
* Linear Rec.709 (D65) to AP1 (ACES white), Bradford-adapted. Row-major.
|
|
4
3
|
* @type {Float64Array}
|
|
5
4
|
*/
|
|
6
5
|
export const M3_REC709_TO_AP1: Float64Array;
|
|
@@ -10,14 +9,14 @@ export const M3_REC709_TO_AP1: Float64Array;
|
|
|
10
9
|
*/
|
|
11
10
|
export const M3_AP1_TO_REC709: Float64Array;
|
|
12
11
|
/**
|
|
13
|
-
* AP1's contribution of each channel to Y, the row
|
|
14
|
-
* measures AP1 luma on the CPU.
|
|
12
|
+
* AP1's contribution of each channel to Y, the Y row of the AP1-to-XYZ matrix: the shader's `AP1_LUMINANCE`, for code
|
|
13
|
+
* that measures AP1 luma on the CPU.
|
|
15
14
|
* @type {Float64Array}
|
|
16
15
|
*/
|
|
17
16
|
export const AP1_LUMINANCE: Float64Array;
|
|
18
17
|
/**
|
|
19
18
|
* - `CRM_FROM_REC709_TO_AP1` and `CRM_FROM_AP1_TO_REC709`: {@link M3_REC709_TO_AP1} and its inverse.
|
|
20
|
-
* - `AP1_LUMINANCE`: AP1's contribution of each channel to Y, the row
|
|
19
|
+
* - `AP1_LUMINANCE`: AP1's contribution of each channel to Y, the Y row of the AP1-to-XYZ matrix.
|
|
21
20
|
*
|
|
22
21
|
* Derived from the two spaces' chromaticities, so neither matrix is a rounded transcription of the other.
|
|
23
22
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_CRM_REC709_AP1.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.js"],"names":[],"mappings":"AAqBA
|
|
1
|
+
{"version":3,"file":"chunk_CRM_REC709_AP1.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.js"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,+BAFU,YAAY,CAE8B;AAIpD;;;GAGG;AACH,+BAFU,YAAY,CAE8B;AAGpD;;;;GAIG;AACH,4BAFU,YAAY,CAEoE;AAW1F;;;;;;;GAOG;AACH,mCAFU,SAAS,CASjB;0BA/DwB,gCAAgC"}
|
|
@@ -20,8 +20,7 @@ const D65_TO_ACES_WHITE = new Float64Array(9);
|
|
|
20
20
|
m3_chromatic_adaptation_bradford(D65_TO_ACES_WHITE, 0.3127, 0.3290, AP1_WHITE_X, AP1_WHITE_Y);
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Linear Rec.709 (D65) to AP1 (ACES white), Bradford-adapted
|
|
24
|
-
* working space. Row-major.
|
|
23
|
+
* Linear Rec.709 (D65) to AP1 (ACES white), Bradford-adapted. Row-major.
|
|
25
24
|
* @type {Float64Array}
|
|
26
25
|
*/
|
|
27
26
|
export const M3_REC709_TO_AP1 = new Float64Array(9);
|
|
@@ -36,8 +35,8 @@ export const M3_AP1_TO_REC709 = new Float64Array(9);
|
|
|
36
35
|
m3_invert(M3_AP1_TO_REC709, M3_REC709_TO_AP1);
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
|
-
* AP1's contribution of each channel to Y, the row
|
|
40
|
-
* measures AP1 luma on the CPU.
|
|
38
|
+
* AP1's contribution of each channel to Y, the Y row of the AP1-to-XYZ matrix: the shader's `AP1_LUMINANCE`, for code
|
|
39
|
+
* that measures AP1 luma on the CPU.
|
|
41
40
|
* @type {Float64Array}
|
|
42
41
|
*/
|
|
43
42
|
export const AP1_LUMINANCE = Float64Array.of(AP1_TO_XYZ[3], AP1_TO_XYZ[4], AP1_TO_XYZ[5]);
|
|
@@ -53,7 +52,7 @@ function wgsl_mat3(m) {
|
|
|
53
52
|
|
|
54
53
|
/**
|
|
55
54
|
* - `CRM_FROM_REC709_TO_AP1` and `CRM_FROM_AP1_TO_REC709`: {@link M3_REC709_TO_AP1} and its inverse.
|
|
56
|
-
* - `AP1_LUMINANCE`: AP1's contribution of each channel to Y, the row
|
|
55
|
+
* - `AP1_LUMINANCE`: AP1's contribution of each channel to Y, the Y row of the AP1-to-XYZ matrix.
|
|
57
56
|
*
|
|
58
57
|
* Derived from the two spaces' chromaticities, so neither matrix is a rounded transcription of the other.
|
|
59
58
|
*
|
|
@@ -20,7 +20,7 @@ import { chunk_oklab_to_linear_srgb } from "../oklab/chunk_oklab_to_linear_srgb.
|
|
|
20
20
|
export const chunk_color_grade = CodeChunk.from(
|
|
21
21
|
//language=WGSL
|
|
22
22
|
`
|
|
23
|
-
//
|
|
23
|
+
// one zone's grade, in AP1: saturation about the luma, contrast about 0.18, gamma, gain, offset
|
|
24
24
|
fn color_grade_correct(
|
|
25
25
|
color: vec3<f32>,
|
|
26
26
|
saturation: vec3<f32>,
|
|
@@ -38,7 +38,7 @@ fn color_grade_correct(
|
|
|
38
38
|
return c * gain + offset;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//
|
|
41
|
+
// the primaries: the three zones, blended by luma
|
|
42
42
|
fn color_grade_primaries(ap1: vec3<f32>, grade: ${COLOR_GRADE_STRUCT.wgsl_ref}) -> vec3<f32> {
|
|
43
43
|
let luma = dot(ap1, AP1_LUMINANCE);
|
|
44
44
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The colour matrices of
|
|
2
|
+
* The colour matrices of the filmic ACES tone mapping, each the product of the standard colour-space
|
|
3
3
|
* transforms, taken in float64 and written out.
|
|
4
4
|
*
|
|
5
|
-
* - `UE_REC709_TO_AP1`, `UE_AP1_TO_REC709`:
|
|
5
|
+
* - `UE_REC709_TO_AP1`, `UE_AP1_TO_REC709`: the working space (sRGB primaries, D65) to ACEScg and back,
|
|
6
6
|
* through XYZ with Bradford D65/D60 adaptation.
|
|
7
7
|
* - `UE_AP1_TO_AP0`, `UE_AP0_TO_AP1`: ACEScg (AP1) to ACES2065-1 (AP0) and back.
|
|
8
8
|
* - `UE_EXPAND_GAMUT`: gamut expansion matrix from sRGB toward wide primaries,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CodeChunk } from "../../../../compiler/CodeChunk.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The colour matrices of
|
|
4
|
+
* The colour matrices of the filmic ACES tone mapping, each the product of the standard colour-space
|
|
5
5
|
* transforms, taken in float64 and written out.
|
|
6
6
|
*
|
|
7
|
-
* - `UE_REC709_TO_AP1`, `UE_AP1_TO_REC709`:
|
|
7
|
+
* - `UE_REC709_TO_AP1`, `UE_AP1_TO_REC709`: the working space (sRGB primaries, D65) to ACEScg and back,
|
|
8
8
|
* through XYZ with Bradford D65/D60 adaptation.
|
|
9
9
|
* - `UE_AP1_TO_AP0`, `UE_AP0_TO_AP1`: ACEScg (AP1) to ACES2065-1 (AP0) and back.
|
|
10
10
|
* - `UE_EXPAND_GAMUT`: gamut expansion matrix from sRGB toward wide primaries,
|
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Filmic SDR tone mapping on ACES, at fixed settings.
|
|
3
3
|
*
|
|
4
|
-
* Evaluates
|
|
5
|
-
* as UE evaluates them into its colour grading LUT, here evaluated per pixel:
|
|
4
|
+
* Evaluates a colour-grading and filmic tone-mapping pipeline per pixel:
|
|
6
5
|
*
|
|
7
|
-
* 1. into ACEScg (AP1) from
|
|
8
|
-
* 2.
|
|
9
|
-
* 3. the colour corrections at
|
|
10
|
-
* 4.
|
|
6
|
+
* 1. into ACEScg (AP1) from the sRGB/Rec.709 working space;
|
|
7
|
+
* 2. gamut expansion at 1.0, which pushes bright saturated colours toward wider primaries;
|
|
8
|
+
* 3. the colour corrections at identity, which only clamp AP1 at zero;
|
|
9
|
+
* 4. blue correction at 0.6, a matrix that turns bright blue toward cyan rather than violet, before the
|
|
11
10
|
* curve, and its inverse after;
|
|
12
|
-
* 5.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* 0.93 desaturation;
|
|
11
|
+
* 5. the filmic curve with slope 0.88, toe 0.55, shoulder 0.26, black clip 0 and white clip 0.04. It is the ACES
|
|
12
|
+
* reference rendering's glow and red modifier and its 0.96 desaturation, then a parametric toe-straight-shoulder
|
|
13
|
+
* curve on log10 of each AP1 channel, solved so that 0.18 comes out at 0.18, then a 0.93 desaturation;
|
|
16
14
|
* 6. back to the working space, clamped at zero, and clipped at 1 as the sRGB target clips it.
|
|
17
15
|
*
|
|
18
|
-
*
|
|
19
|
-
* shader_tonemap_HDR_aces.
|
|
16
|
+
* What an HDR display shows is in shader_tonemap_HDR_aces.
|
|
20
17
|
*
|
|
21
|
-
* Where
|
|
22
|
-
*
|
|
23
|
-
* highlights over 43.7 by a few codes.
|
|
18
|
+
* Where gamut expansion of black would divide 0 by 0, or the curve take log10(0), this takes the limit, so black
|
|
19
|
+
* stays black. The input has no upper limit.
|
|
24
20
|
*
|
|
25
21
|
* Input: exposed linear Rec.709. Output: display-linear Rec.709 in [0, 1].
|
|
26
22
|
*
|
|
27
|
-
* @see "Color Grading and the Filmic Tonemapper in Unreal Engine", Epic Games
|
|
23
|
+
* @see "Color Grading and the Filmic Tonemapper in Unreal Engine", Epic Games: the public documentation of the
|
|
24
|
+
* curve's slope, toe, shoulder, black clip and white clip parameterisation
|
|
28
25
|
* @type {CodeChunk}
|
|
29
26
|
*/
|
|
30
27
|
export const chunk_tonemap_ue_filmic: CodeChunk;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_tonemap_ue_filmic.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"chunk_tonemap_ue_filmic.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,sCAFU,SAAS,CAoIjB;0BA/JwB,mCAAmC"}
|
|
@@ -2,32 +2,29 @@ import { CodeChunk } from "../../../../compiler/CodeChunk.js";
|
|
|
2
2
|
import { chunk_aces_ue_matrices } from "./chunk_aces_ue_matrices.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Filmic SDR tone mapping on ACES, at fixed settings.
|
|
6
6
|
*
|
|
7
|
-
* Evaluates
|
|
8
|
-
* as UE evaluates them into its colour grading LUT, here evaluated per pixel:
|
|
7
|
+
* Evaluates a colour-grading and filmic tone-mapping pipeline per pixel:
|
|
9
8
|
*
|
|
10
|
-
* 1. into ACEScg (AP1) from
|
|
11
|
-
* 2.
|
|
12
|
-
* 3. the colour corrections at
|
|
13
|
-
* 4.
|
|
9
|
+
* 1. into ACEScg (AP1) from the sRGB/Rec.709 working space;
|
|
10
|
+
* 2. gamut expansion at 1.0, which pushes bright saturated colours toward wider primaries;
|
|
11
|
+
* 3. the colour corrections at identity, which only clamp AP1 at zero;
|
|
12
|
+
* 4. blue correction at 0.6, a matrix that turns bright blue toward cyan rather than violet, before the
|
|
14
13
|
* curve, and its inverse after;
|
|
15
|
-
* 5.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* 0.93 desaturation;
|
|
14
|
+
* 5. the filmic curve with slope 0.88, toe 0.55, shoulder 0.26, black clip 0 and white clip 0.04. It is the ACES
|
|
15
|
+
* reference rendering's glow and red modifier and its 0.96 desaturation, then a parametric toe-straight-shoulder
|
|
16
|
+
* curve on log10 of each AP1 channel, solved so that 0.18 comes out at 0.18, then a 0.93 desaturation;
|
|
19
17
|
* 6. back to the working space, clamped at zero, and clipped at 1 as the sRGB target clips it.
|
|
20
18
|
*
|
|
21
|
-
*
|
|
22
|
-
* shader_tonemap_HDR_aces.
|
|
19
|
+
* What an HDR display shows is in shader_tonemap_HDR_aces.
|
|
23
20
|
*
|
|
24
|
-
* Where
|
|
25
|
-
*
|
|
26
|
-
* highlights over 43.7 by a few codes.
|
|
21
|
+
* Where gamut expansion of black would divide 0 by 0, or the curve take log10(0), this takes the limit, so black
|
|
22
|
+
* stays black. The input has no upper limit.
|
|
27
23
|
*
|
|
28
24
|
* Input: exposed linear Rec.709. Output: display-linear Rec.709 in [0, 1].
|
|
29
25
|
*
|
|
30
|
-
* @see "Color Grading and the Filmic Tonemapper in Unreal Engine", Epic Games
|
|
26
|
+
* @see "Color Grading and the Filmic Tonemapper in Unreal Engine", Epic Games: the public documentation of the
|
|
27
|
+
* curve's slope, toe, shoulder, black clip and white clip parameterisation
|
|
31
28
|
* @type {CodeChunk}
|
|
32
29
|
*/
|
|
33
30
|
export const chunk_tonemap_ue_filmic = CodeChunk.from(
|
|
@@ -80,7 +77,7 @@ fn ue_film_hue(rgb: vec3<f32>) -> f32 {
|
|
|
80
77
|
return clamp(hue, 0.0, 360.0);
|
|
81
78
|
}
|
|
82
79
|
|
|
83
|
-
//
|
|
80
|
+
// the filmic curve: AP1 in, AP1 out
|
|
84
81
|
fn ue_film_tone_map(color_ap1: vec3<f32>) -> vec3<f32> {
|
|
85
82
|
var aces = UE_AP1_TO_AP0 * color_ap1;
|
|
86
83
|
|
|
@@ -138,10 +135,10 @@ fn ue_film_tone_map(color_ap1: vec3<f32>) -> vec3<f32> {
|
|
|
138
135
|
}
|
|
139
136
|
|
|
140
137
|
fn tonemap_ue_filmic(color_rec709: vec3<f32>) -> vec3<f32> {
|
|
141
|
-
// the scene from zero up
|
|
138
|
+
// the scene from zero up
|
|
142
139
|
var color = UE_REC709_TO_AP1 * max(color_rec709, vec3<f32>(0.0));
|
|
143
140
|
|
|
144
|
-
//
|
|
141
|
+
// gamut expansion. Black has no chroma to expand, so it stays black
|
|
145
142
|
let luma = dot(color, UE_AP1_LUMINANCE);
|
|
146
143
|
if (luma > 0.0) {
|
|
147
144
|
let chroma = color / luma - 1.0;
|
|
@@ -149,7 +146,7 @@ fn tonemap_ue_filmic(color_rec709: vec3<f32>) -> vec3<f32> {
|
|
|
149
146
|
color = mix(color, UE_EXPAND_GAMUT * color, amount);
|
|
150
147
|
}
|
|
151
148
|
|
|
152
|
-
// the colour corrections at
|
|
149
|
+
// the colour corrections at identity
|
|
153
150
|
color = max(color, vec3<f32>(0.0));
|
|
154
151
|
|
|
155
152
|
color = mix(color, UE_BLUE_CORRECT * color, UE_BLUE_CORRECTION);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Based on
|
|
2
|
+
* Based on Karis 2014, "High Quality Temporal Supersampling", SIGGRAPH Advances in Real-Time Rendering
|
|
3
3
|
*
|
|
4
4
|
* @see https://github.com/Kabinet0/Halogen-Pathtracer/blob/b8f035991779a6fcc6583e8f631704cddc4c58f5/Assets/Scripts/Halogen%20Shaders/HalogenRandom.hlsl#L314
|
|
5
5
|
* @see https://github.com/TheRealMJP/MSAAFilter/blob/cfc1c19411e24dc07f74272c17f423330ac96941/MSAAFilter/Resolve.hlsl#L133
|
|
@@ -2,7 +2,7 @@ import { CodeChunk } from "../../compiler/CodeChunk.js";
|
|
|
2
2
|
import { PI_DECLARATION } from "../math/PI_DECLARATION.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Based on
|
|
5
|
+
* Based on Karis 2014, "High Quality Temporal Supersampling", SIGGRAPH Advances in Real-Time Rendering
|
|
6
6
|
*
|
|
7
7
|
* @see https://github.com/Kabinet0/Halogen-Pathtracer/blob/b8f035991779a6fcc6583e8f631704cddc4c58f5/Assets/Scripts/Halogen%20Shaders/HalogenRandom.hlsl#L314
|
|
8
8
|
* @see https://github.com/TheRealMJP/MSAAFilter/blob/cfc1c19411e24dc07f74272c17f423330ac96941/MSAAFilter/Resolve.hlsl#L133
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Blackman-Harris 3.3 approximation: W(x) = exp(-2.29 * x * x)
|
|
3
|
-
* Suggested by
|
|
3
|
+
* Suggested by Karis 2014, "High Quality Temporal Supersampling", SIGGRAPH Advances in Real-Time Rendering
|
|
4
4
|
* @type {CodeChunk}
|
|
5
5
|
*/
|
|
6
6
|
export const chunk_filter_blackman_harris229: CodeChunk;
|
|
@@ -2,7 +2,7 @@ import { CodeChunk } from "../../compiler/CodeChunk.js";
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Blackman-Harris 3.3 approximation: W(x) = exp(-2.29 * x * x)
|
|
5
|
-
* Suggested by
|
|
5
|
+
* Suggested by Karis 2014, "High Quality Temporal Supersampling", SIGGRAPH Advances in Real-Time Rendering
|
|
6
6
|
* @type {CodeChunk}
|
|
7
7
|
*/
|
|
8
8
|
export const chunk_filter_blackman_harris229 = CodeChunk.from(
|
|
@@ -20,10 +20,9 @@
|
|
|
20
20
|
*
|
|
21
21
|
* `MultiscaleMean` is {@link MULTISCALE_MEAN_STRUCT}.
|
|
22
22
|
*
|
|
23
|
-
* - **Exposure**: the factor the display multiplies the samples by ahead of its tone curve,
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* OneOverPreExposure`): over a stream scaled by 1/E at an exposure of E the estimator does what it does over
|
|
23
|
+
* - **Exposure**: the factor the display multiplies the samples by ahead of its tone curve, the pre-exposure.
|
|
24
|
+
* The reference's two absolute constants, its variance floor of 1e-5 and its firefly offset of 0.1, are in
|
|
25
|
+
* exposed units: over a stream scaled by 1/E at an exposure of E the estimator does what it does over
|
|
27
26
|
* the stream at an exposure of one, so it tells a change from noise as far as the display shows it. Held to the
|
|
28
27
|
* positive normal f32 range, where neither constant overflows or vanishes.
|
|
29
28
|
* - **Deviation floor**: the least deviation the estimator divides by, √1e-5 / exposure, and never under one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_multiscale_mean.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"chunk_multiscale_mean.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,oCAFU,SAAS,CAiEZ;0BAjImB,6BAA6B"}
|
|
@@ -28,10 +28,9 @@ const EXPOSURE_MAX = '1.70141183e38';
|
|
|
28
28
|
*
|
|
29
29
|
* `MultiscaleMean` is {@link MULTISCALE_MEAN_STRUCT}.
|
|
30
30
|
*
|
|
31
|
-
* - **Exposure**: the factor the display multiplies the samples by ahead of its tone curve,
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* OneOverPreExposure`): over a stream scaled by 1/E at an exposure of E the estimator does what it does over
|
|
31
|
+
* - **Exposure**: the factor the display multiplies the samples by ahead of its tone curve, the pre-exposure.
|
|
32
|
+
* The reference's two absolute constants, its variance floor of 1e-5 and its firefly offset of 0.1, are in
|
|
33
|
+
* exposed units: over a stream scaled by 1/E at an exposure of E the estimator does what it does over
|
|
35
34
|
* the stream at an exposure of one, so it tells a change from noise as far as the display shows it. Held to the
|
|
36
35
|
* positive normal f32 range, where neither constant overflows or vanishes.
|
|
37
36
|
* - **Deviation floor**: the least deviation the estimator divides by, √1e-5 / exposure, and never under one
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* `re_direct_physical` also adds its diffuse on top of the specular, and a white dielectric returned up to 1.4
|
|
14
14
|
* of a uniform sky that way. The diffuse is scaled here by 1 − the dielectric's specular albedo at N·V, from the
|
|
15
|
-
* same fetch: the indirect path's factor, and what
|
|
15
|
+
* same fetch: the indirect path's factor, and what EEVEE and OpenPBR apply ("albedo scaling"). It is
|
|
16
16
|
* the view's side of the interface only; the light's (Kulla–Conty's 1 − E(N·L)) would cost a fetch per light.
|
|
17
17
|
*
|
|
18
18
|
* Requires `tSplitSum` and `sLinear` in the shader's resources. See `MULTISCATTER.md` beside this chunk.
|
|
@@ -20,7 +20,7 @@ import { SAMPLER_LINEAR_RESOURCE } from "../../../texture/SAMPLER_LINEAR_RESOURC
|
|
|
20
20
|
*
|
|
21
21
|
* `re_direct_physical` also adds its diffuse on top of the specular, and a white dielectric returned up to 1.4
|
|
22
22
|
* of a uniform sky that way. The diffuse is scaled here by 1 − the dielectric's specular albedo at N·V, from the
|
|
23
|
-
* same fetch: the indirect path's factor, and what
|
|
23
|
+
* same fetch: the indirect path's factor, and what EEVEE and OpenPBR apply ("albedo scaling"). It is
|
|
24
24
|
* the view's side of the interface only; the light's (Kulla–Conty's 1 − E(N·L)) would cost a fetch per light.
|
|
25
25
|
*
|
|
26
26
|
* Requires `tSplitSum` and `sLinear` in the shader's resources. See `MULTISCATTER.md` beside this chunk.
|
|
@@ -145,7 +145,7 @@ const VSM_LEVEL_COUNT = 12;
|
|
|
145
145
|
const VSM_PAGES_PER_LEVEL = 64;
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* Texels on a side of a virtual shadow map page — the reference's
|
|
148
|
+
* Texels on a side of a virtual shadow map page — the reference's 128 — and of the pool
|
|
149
149
|
* the map claims in the atlas for them, 30 × 30 slots of 128 plus {@link SHADOWMAP_ATLAS_BORDER}
|
|
150
150
|
* each side. A device whose atlas is smaller gets a pool of what fits.
|
|
151
151
|
*/
|
|
@@ -1643,8 +1643,8 @@ export class GPUSceneShadowmapContext {
|
|
|
1643
1643
|
view_ctx.update();
|
|
1644
1644
|
|
|
1645
1645
|
const job = new RasterizationJob();
|
|
1646
|
-
// a directional light's cascades are biased
|
|
1647
|
-
//
|
|
1646
|
+
// a directional light's cascades are biased in the vertex stage of an orthographic view; a spot
|
|
1647
|
+
// light keeps the rasterizer's bias
|
|
1648
1648
|
const cascade = map.light.isDirectionalLight === true;
|
|
1649
1649
|
job.opaque_pass = cascade ? shadow_cascade_rasterization_pass_descriptor : shadow_rasterization_pass_descriptor;
|
|
1650
1650
|
job.alpha_tested_pass = cascade ? shadow_cascade_alpha_tested_pass_descriptor : shadow_rasterization_alpha_tested_pass_descriptor;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Visibility of a point in one of a directional light's cascades:
|
|
3
|
-
*
|
|
4
|
-
* defaults, the receiver half of the scheme whose caster half is {@link chunk_shadow_caster_depth_bias}.
|
|
2
|
+
* Visibility of a point in one of a directional light's cascades: a cascaded shadow receiver with a soft
|
|
3
|
+
* 5×5 PCF, the receiver half of the scheme whose caster half is {@link chunk_shadow_caster_depth_bias}.
|
|
5
4
|
*
|
|
6
5
|
* ```wgsl
|
|
7
6
|
* fn sample_shadowmap_cascade(
|
|
@@ -16,11 +15,10 @@
|
|
|
16
15
|
* The point is projected as it is, with no offset. Each of the 6×6 texels around it is compared softly,
|
|
17
16
|
* `saturate((receiver − texel) / transition + 1)` in reverse-Z depth: a texel nearer the light by the
|
|
18
17
|
* transition or more shadows the point fully, one level with it not at all. The transition is 2.5 texels
|
|
19
|
-
* along the light (the caster bias's constant, `
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* squared, Unreal's `ApplyPCFOverBlurCorrection`.
|
|
18
|
+
* along the light (the caster bias's constant), widened by `1 / lerp(1 − b, 1, N·L)` with the receiver
|
|
19
|
+
* bias `b` 0.9: tenfold where the surface meets the light edge-on. The 36 results are weighted as a 5×5
|
|
20
|
+
* box filter at the point's sub-texel position, the edge rows and columns by the fraction that falls
|
|
21
|
+
* inside it, and the filtered value is squared, which corrects the box filter's over-blur.
|
|
24
22
|
*
|
|
25
23
|
* A receiver past the far plane, depth at or below 0, is shadowed only by what was drawn in front of it:
|
|
26
24
|
* against a texel nothing was drawn into, depth 0, it is level and lit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_sample_shadowmap_cascade.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.js"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"chunk_sample_shadowmap_cascade.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,6CAFU,SAAS,CAqEjB;0BAnGwB,uCAAuC"}
|
|
@@ -4,9 +4,8 @@ import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
|
4
4
|
import { SHADOWMAP_ATLAS_RESOURCE } from "../SHADOWMAP_RESOURCES.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Visibility of a point in one of a directional light's cascades:
|
|
8
|
-
*
|
|
9
|
-
* defaults, the receiver half of the scheme whose caster half is {@link chunk_shadow_caster_depth_bias}.
|
|
7
|
+
* Visibility of a point in one of a directional light's cascades: a cascaded shadow receiver with a soft
|
|
8
|
+
* 5×5 PCF, the receiver half of the scheme whose caster half is {@link chunk_shadow_caster_depth_bias}.
|
|
10
9
|
*
|
|
11
10
|
* ```wgsl
|
|
12
11
|
* fn sample_shadowmap_cascade(
|
|
@@ -21,11 +20,10 @@ import { SHADOWMAP_ATLAS_RESOURCE } from "../SHADOWMAP_RESOURCES.js";
|
|
|
21
20
|
* The point is projected as it is, with no offset. Each of the 6×6 texels around it is compared softly,
|
|
22
21
|
* `saturate((receiver − texel) / transition + 1)` in reverse-Z depth: a texel nearer the light by the
|
|
23
22
|
* transition or more shadows the point fully, one level with it not at all. The transition is 2.5 texels
|
|
24
|
-
* along the light (the caster bias's constant, `
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* squared, Unreal's `ApplyPCFOverBlurCorrection`.
|
|
23
|
+
* along the light (the caster bias's constant), widened by `1 / lerp(1 − b, 1, N·L)` with the receiver
|
|
24
|
+
* bias `b` 0.9: tenfold where the surface meets the light edge-on. The 36 results are weighted as a 5×5
|
|
25
|
+
* box filter at the point's sub-texel position, the edge rows and columns by the fraction that falls
|
|
26
|
+
* inside it, and the filtered value is squared, which corrects the box filter's over-blur.
|
|
29
27
|
*
|
|
30
28
|
* A receiver past the far plane, depth at or below 0, is shadowed only by what was drawn in front of it:
|
|
31
29
|
* against a texel nothing was drawn into, depth 0, it is level and lit.
|
|
@@ -55,7 +53,7 @@ fn sample_shadowmap_cascade(
|
|
|
55
53
|
let texel_world_size = max(2.0 / (length(row_x) * atlas_aabb.z), 2.0 / (length(row_y) * atlas_aabb.w));
|
|
56
54
|
|
|
57
55
|
// the transition in depth units: an orthographic depth changes by |row_z| a world unit along the light
|
|
58
|
-
// never zero,
|
|
56
|
+
// never zero, so a degenerate projection cannot make inf × 0
|
|
59
57
|
let transition = max(TRANSITION_TEXELS * texel_world_size * length(row_z), 1e-5);
|
|
60
58
|
|
|
61
59
|
let n_dot_l = saturate(dot(surface_normal, light.direction));
|
|
@@ -94,7 +92,7 @@ fn sample_shadowmap_cascade(
|
|
|
94
92
|
|
|
95
93
|
let filtered = sum * (1.0 / 25.0);
|
|
96
94
|
|
|
97
|
-
//
|
|
95
|
+
// over-blur correction
|
|
98
96
|
return filtered * filtered;
|
|
99
97
|
}
|
|
100
98
|
`, [
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* How far a cascade's caster vertex is pushed away from the light, in world units:
|
|
3
|
-
* shadow map
|
|
4
|
-
* at its defaults, in texels of the cascade.
|
|
2
|
+
* How far a cascade's caster vertex is pushed away from the light, in world units: the caster bias of
|
|
3
|
+
* the cascaded shadow map scheme, set in texels of the cascade.
|
|
5
4
|
*
|
|
6
5
|
* ```wgsl
|
|
7
6
|
* fn shadow_caster_depth_bias(normal_ws: vec3f, light_direction_ws: vec3f, texel_world_size: f32) -> f32
|
|
8
7
|
* ```
|
|
9
8
|
*
|
|
10
9
|
* `2.5 texels × (1 + 1.5 × min(tan θ, 1))`, θ the angle between the vertex normal and the light, either
|
|
11
|
-
* facing. The constant is
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* slope clamped at `r.Shadow.ShadowMaxSlopeScaleDepthBias` (1, 45°).
|
|
10
|
+
* facing. The constant push is 2.5 texels, whatever the slope. The slope term adds 1.5 times the
|
|
11
|
+
* constant per unit of `tan θ`, with the slope clamped at 1 (45°), so no caster is pushed further than a
|
|
12
|
+
* 45° one.
|
|
15
13
|
*
|
|
16
14
|
* It is the caster half of one scheme: the rasterizer adds no bias of its own, and the receiver
|
|
17
15
|
* ({@link chunk_sample_shadowmap_cascade}) takes no offset and compares softly instead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_shadow_caster_depth_bias.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"chunk_shadow_caster_depth_bias.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,6CAFU,SAAS,CAmBhB;0BAvCuB,uCAAuC"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* How far a cascade's caster vertex is pushed away from the light, in world units:
|
|
5
|
-
* shadow map
|
|
6
|
-
* at its defaults, in texels of the cascade.
|
|
4
|
+
* How far a cascade's caster vertex is pushed away from the light, in world units: the caster bias of
|
|
5
|
+
* the cascaded shadow map scheme, set in texels of the cascade.
|
|
7
6
|
*
|
|
8
7
|
* ```wgsl
|
|
9
8
|
* fn shadow_caster_depth_bias(normal_ws: vec3f, light_direction_ws: vec3f, texel_world_size: f32) -> f32
|
|
10
9
|
* ```
|
|
11
10
|
*
|
|
12
11
|
* `2.5 texels × (1 + 1.5 × min(tan θ, 1))`, θ the angle between the vertex normal and the light, either
|
|
13
|
-
* facing. The constant is
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* slope clamped at `r.Shadow.ShadowMaxSlopeScaleDepthBias` (1, 45°).
|
|
12
|
+
* facing. The constant push is 2.5 texels, whatever the slope. The slope term adds 1.5 times the
|
|
13
|
+
* constant per unit of `tan θ`, with the slope clamped at 1 (45°), so no caster is pushed further than a
|
|
14
|
+
* 45° one.
|
|
17
15
|
*
|
|
18
16
|
* It is the caster half of one scheme: the rasterizer adds no bias of its own, and the receiver
|
|
19
17
|
* ({@link chunk_sample_shadowmap_cascade}) takes no offset and compares softly instead.
|