@woosh/meep-engine 3.60.3 → 3.60.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/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts +3 -0
- package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts.map +1 -1
- package/editor/ecs/component/editors/ecs/Trail3DEditor.js +6 -0
- package/package.json +1 -1
- package/src/engine/ecs/ik/PLAN.md +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometryFlags.js +1 -2
- package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.d.ts +14 -0
- package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.d.ts.map +1 -0
- package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.js +22 -0
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +19 -3
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.js +31 -4
- package/src/engine/graphics/ecs/trail3d/advance_trail.js +1 -1
- package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts +5 -5
- package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts.map +1 -1
- package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.js +6 -6
- package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts +10 -0
- package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts.map +1 -1
- package/src/engine/graphics3/trail/trail_tube_write_geometry.js +13 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +2 -2
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +2 -2
- package/src/shade/playground/probe_clipmap/README.md +1 -0
- package/src/shade/playground/probe_clipmap/index.html +5 -0
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +16 -2
- package/src/shade/playground/vgeo_scene/README.md +1 -1
- package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.d.ts +4 -6
- package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.js +34 -36
- package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts +1 -1
- package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.js +162 -163
- package/src/shade/renderer/atmosphere/compute_mie_absorption.d.ts +1 -1
- package/src/shade/renderer/atmosphere/compute_mie_absorption.js +1 -1
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.js +1 -1
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.js +1 -1
- package/src/shade/renderer/atmosphere/shader_multiscatter_lut.js +164 -164
- package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.js +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +2 -2
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +2 -2
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +2 -2
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.js +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts +4 -5
- 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 +6 -7
- package/src/shade/renderer/geometry/virtual/ATTRIBUTE_PLAN_2026_09_18.md +1 -1
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +2 -4
- package/src/shade/renderer/geometry/virtual/WEDGE_PLAN_2026_09_18.md +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +3 -10
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md +119 -38
- package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_RAYS_VARIABLE_AND_SORTED_SCOPE_2026_10_30.md +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +12 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +22 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +4 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +50 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +7 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts +13 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js +13 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +17 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +20 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.d.ts +18 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.js +42 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +5 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +4 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +13 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts +52 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.js +250 -0
- package/src/shade/renderer/light/cluster/PROPOSAL_ALGORITHM_2026_10_16.md +7 -7
- package/src/shade/renderer/light/cluster/PROPOSAL_HIERARCHICAL_2026_10_16.md +2 -2
- package/src/shade/renderer/light/environment/environment_level_1_blur_plan.d.ts +39 -0
- package/src/shade/renderer/light/environment/environment_level_1_blur_plan.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/environment_level_1_blur_plan.js +119 -0
- package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts +15 -7
- package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/execute_filter_environment_map.js +66 -83
- package/src/shade/renderer/light/environment/graph_filter_environment_map.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/graph_filter_environment_map.js +15 -6
- package/src/shade/renderer/light/environment/shader_blur_environment_map.d.ts +3 -0
- package/src/shade/renderer/light/environment/shader_blur_environment_map.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/shader_blur_environment_map.js +111 -0
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.d.ts +3 -0
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.js +128 -0
- package/src/shade/renderer/light/environment/shader_downsample_environment_map.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/shader_downsample_environment_map.js +0 -1
- package/src/shade/renderer/particles/EMITTER_GLOBAL_STATE_PLAN_2026_10_29.md +1 -4
- package/src/shade/renderer/particles/ORIENTATION_PLAN_2026_10_15.md +2 -2
- package/src/shade/renderer/postprocess/nss/NOTES.md +14 -21
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -3
- package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.js +1 -3
- package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.d.ts +5 -6
- package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.js +9 -10
- package/src/shade/renderer/postprocess/nss/shader_nss_extract_feedback.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/shader_nss_extract_feedback.js +48 -49
- package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.js +12 -16
- package/src/shade/renderer/postprocess/nss/shader_nss_preprocess.js +246 -246
- package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts +1 -2
- package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.js +34 -35
- package/src/shade/renderer/shader/chunk/atmosphere/C_MIE_SCATTERING_DECLARATION.d.ts +2 -2
- package/src/shade/renderer/shader/chunk/atmosphere/C_MIE_SCATTERING_DECLARATION.js +2 -2
- package/src/shade/renderer/shader/chunk/atmosphere/NOTES.md +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_compute_extinction.js +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.js +1 -1
- package/src/shade/renderer/shader/chunk/brdf/FRESNEL_BRIEF_2026_10_16.md +4 -7
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.d.ts +3 -3
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.js +3 -3
- package/src/shade/renderer/shader/chunk/color/tonemap/ACES_TONE_MAPPING_BRIEF_2026_10_17.md +12 -19
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +9 -10
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +9 -10
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +4 -4
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +5 -5
- package/src/shade/renderer/shader/chunk/material/MULTISCATTER.md +1 -1
- package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts +1 -2
- package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.js +1 -2
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.d.ts +14 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.js +19 -6
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.d.ts +10 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.js +14 -6
- package/src/shade/renderer/shader/chunk/random/murmur/chunk_murmur3_vec3u.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/random/murmur/chunk_murmur3_vec3u.js +1 -1
- package/src/shade/renderer/shader/compiler/SHADER_SWITCH_PROPOSAL_2026_10_16.md +9 -14
- package/src/shade/renderer/shadow/contact/FINDINGS.md +5 -5
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.d.ts +2 -3
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.d.ts.map +1 -1
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.js +7 -8
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_LOAD_FACTOR.d.ts +1 -1
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_LOAD_FACTOR.js +12 -12
- package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts +2 -2
- package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts.map +1 -1
- package/src/shade/renderer/shadow/vsm/VSMPageManager.js +3 -4
- package/src/shade/renderer/texture/mipmaps/NOTES.md +1 -2
- package/src/shade/renderer/volumetrics/VOLUMETRIC_NOISE_PLAN_2026_10_15.md +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +0 -19
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.js +2 -52
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts +0 -13
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts.map +0 -1
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.js +0 -198
- package/src/view/elements/progress/segmented/segment_frame_transform.d.ts +0 -15
- package/src/view/elements/progress/segmented/segment_frame_transform.d.ts.map +0 -1
- package/src/view/elements/progress/segmented/segment_frame_transform.js +0 -69
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default high-watermark pool demand ratio `(wants + requests_dropped) / slots.capacity` above
|
|
3
|
-
* which a virtual shadow map steps its dynamic LOD bias up to coarsen requested pages and prevent
|
|
4
|
-
* hard page-pool overflow
|
|
5
|
-
*
|
|
6
|
-
* Paired with {@link DEFAULT_VSM_LOW_LOAD_FACTOR} to form a hysteresis deadband so demand hovering
|
|
7
|
-
* near capacity does not oscillate between adjacent clipmap levels. Setting `0` disables dynamic
|
|
8
|
-
* resolution throttling.
|
|
9
|
-
*
|
|
10
|
-
* @type {number}
|
|
11
|
-
*/
|
|
12
|
-
export const DEFAULT_VSM_MAX_LOAD_FACTOR = 0.85;
|
|
1
|
+
/**
|
|
2
|
+
* Default high-watermark pool demand ratio `(wants + requests_dropped) / slots.capacity` above
|
|
3
|
+
* which a virtual shadow map steps its dynamic LOD bias up to coarsen requested pages and prevent
|
|
4
|
+
* hard page-pool overflow.
|
|
5
|
+
*
|
|
6
|
+
* Paired with {@link DEFAULT_VSM_LOW_LOAD_FACTOR} to form a hysteresis deadband so demand hovering
|
|
7
|
+
* near capacity does not oscillate between adjacent clipmap levels. Setting `0` disables dynamic
|
|
8
|
+
* resolution throttling.
|
|
9
|
+
*
|
|
10
|
+
* @type {number}
|
|
11
|
+
*/
|
|
12
|
+
export const DEFAULT_VSM_MAX_LOAD_FACTOR = 0.85;
|
|
@@ -146,7 +146,7 @@ export class VSMPageManager {
|
|
|
146
146
|
set max_load_factor(v: number);
|
|
147
147
|
/**
|
|
148
148
|
* High-watermark pool demand ratio `(wants + requests_dropped) / slots.capacity` above which
|
|
149
|
-
* {@link dynamic_lod_bias} steps up to coarsen requested pages
|
|
149
|
+
* {@link dynamic_lod_bias} steps up to coarsen requested pages.
|
|
150
150
|
* `0` disables dynamic resolution throttling.
|
|
151
151
|
* @returns {number}
|
|
152
152
|
*/
|
|
@@ -166,7 +166,7 @@ export class VSMPageManager {
|
|
|
166
166
|
*/
|
|
167
167
|
set max_lod_bias(v: number);
|
|
168
168
|
/**
|
|
169
|
-
* Ceiling on {@link dynamic_lod_bias}
|
|
169
|
+
* Ceiling on {@link dynamic_lod_bias}. `0` disables dynamic
|
|
170
170
|
* resolution throttling.
|
|
171
171
|
* @returns {number}
|
|
172
172
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VSMPageManager.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shadow/vsm/VSMPageManager.js"],"names":[],"mappings":"AA0GA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH;
|
|
1
|
+
{"version":3,"file":"VSMPageManager.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shadow/vsm/VSMPageManager.js"],"names":[],"mappings":"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"}
|
|
@@ -327,8 +327,7 @@ export class VSMPageManager {
|
|
|
327
327
|
#levels_dirty = false;
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
|
-
* Dynamic resolution throttling (
|
|
331
|
-
* hysteresis deadband and readback-latency gating).
|
|
330
|
+
* Dynamic resolution throttling (with hysteresis deadband and readback-latency gating).
|
|
332
331
|
*/
|
|
333
332
|
#max_load_factor = DEFAULT_VSM_MAX_LOAD_FACTOR;
|
|
334
333
|
#low_load_factor = DEFAULT_VSM_LOW_LOAD_FACTOR;
|
|
@@ -486,7 +485,7 @@ export class VSMPageManager {
|
|
|
486
485
|
|
|
487
486
|
/**
|
|
488
487
|
* High-watermark pool demand ratio `(wants + requests_dropped) / slots.capacity` above which
|
|
489
|
-
* {@link dynamic_lod_bias} steps up to coarsen requested pages
|
|
488
|
+
* {@link dynamic_lod_bias} steps up to coarsen requested pages.
|
|
490
489
|
* `0` disables dynamic resolution throttling.
|
|
491
490
|
* @returns {number}
|
|
492
491
|
*/
|
|
@@ -530,7 +529,7 @@ export class VSMPageManager {
|
|
|
530
529
|
}
|
|
531
530
|
|
|
532
531
|
/**
|
|
533
|
-
* Ceiling on {@link dynamic_lod_bias}
|
|
532
|
+
* Ceiling on {@link dynamic_lod_bias}. `0` disables dynamic
|
|
534
533
|
* resolution throttling.
|
|
535
534
|
* @returns {number}
|
|
536
535
|
*/
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
For future Research:
|
|
2
2
|
|
|
3
|
-
* https://github.com/
|
|
4
|
-
* https://github.com/Aleksoid1978/MPC-BE/blob/f1016a111fd24103028ab44bb3adaacd8a0b0346/src/Shaders/Resizers/downscaler.hlsl
|
|
3
|
+
* https://github.com/Aleksoid1978/MPC-BE/blob/f1016a111fd24103028ab44bb3adaacd8a0b0346/src/Shaders/Resizers/downscaler.hlsl
|
|
@@ -97,7 +97,7 @@ for added cost." Density and lighting 0.43 ms on PS4 at 160×90×64.
|
|
|
97
97
|
|
|
98
98
|
**Godot 4 FogMaterial (SECONDARY).** A static 3-D `density_texture` in clamped local box space,
|
|
99
99
|
height falloff, edge fade; animation needs a custom shader. **Unity HDRP (SECONDARY):** 3-D mask
|
|
100
|
-
texture, scroll speed and tiling per axis. **Unreal 5.4 (VERIFIED
|
|
100
|
+
texture, scroll speed and tiling per axis. **Unreal 5.4 (VERIFIED):** local fog
|
|
101
101
|
volumes are analytic (radial + exponential height, no noise); froxel fog density comes from
|
|
102
102
|
Volume-domain materials evaluated per froxel at a jittered slice depth. **Frostbite 2015, RDR2
|
|
103
103
|
2019, Nubis Cubed 2023 (NOT RE-READ):** PPTX only, or cited through Enshrouded.
|
|
@@ -140,25 +140,6 @@ export class SegmentedResourceBarView extends View {
|
|
|
140
140
|
* @private
|
|
141
141
|
*/
|
|
142
142
|
private __columns;
|
|
143
|
-
/**
|
|
144
|
-
* scratch for {@link segment_frame_transform}: [scale, offset]
|
|
145
|
-
* @type {number[]}
|
|
146
|
-
* @private
|
|
147
|
-
*/
|
|
148
|
-
private __frame;
|
|
149
|
-
/**
|
|
150
|
-
* The timer that re-checks the placement while linked; 0 when none
|
|
151
|
-
* @type {number}
|
|
152
|
-
* @private
|
|
153
|
-
*/
|
|
154
|
-
private __recheck_timer;
|
|
155
|
-
/**
|
|
156
|
-
* Place again if anything moved that no event reports: an ancestor's transform, the transform of an iframe the
|
|
157
|
-
* bar sits in, a move by a fraction of a pixel. Cheap when nothing did — a computed width and a few rects —
|
|
158
|
-
* and {@link updateSegments} rebuilds only on a change.
|
|
159
|
-
* @private
|
|
160
|
-
*/
|
|
161
|
-
private __recheck;
|
|
162
143
|
/**
|
|
163
144
|
*
|
|
164
145
|
* @type {List<NumericInterval>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedResourceBarView.d.ts","sourceRoot":"","sources":["../../../../../../src/view/elements/progress/segmented/SegmentedResourceBarView.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SegmentedResourceBarView.d.ts","sourceRoot":"","sources":["../../../../../../src/view/elements/progress/segmented/SegmentedResourceBarView.js"],"names":[],"mappings":"AA4BA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACI;;;;;;;;;;;;OAYG;IACH;QAVgD,MAAM,EAA3C,CAAC,OAAO,kBAAgB,CAAC,EAAE;QAC0B,GAAG,GAAxD,OAAO,uCAAmC;QACvB,SAAS,GAA5B,MAAM,EAAE;QAC6E,KAAK,GAA1F;YAAC,IAAI,EAAC,MAAM,CAAC;YAAC,UAAU,EAAC,MAAM,CAAC;YAAC,QAAQ,EAAC,MAAM,CAAC;YAAC,cAAc,EAAC,MAAM,CAAA;SAAC,EAAE;QAC9B,KAAK,GAAjD;YAAC,KAAK,EAAC,MAAM,CAAC;YAAC,KAAK,EAAC,MAAM,CAAA;SAAC,GAAC,IAAI;QAChB,cAAc,GAA/B,MAAM;QACW,qBAAqB,GAAtC,MAAM;QACW,qBAAqB,GAAtC,MAAM;OAyShB;IA5QG;;;;OAIG;IACH,yBAA8B;IAE9B;;;;OAIG;IACH,oBAAsB;IAEtB;;;OAGG;IACH,gBAAoB;IAEpB;;;OAGG;IACH,gBAAoB;IAEpB;;;OAGG;IACH,gBAA+B;IAG/B;;;OAGG;IACH,gCAAoD;IAEpD;;;OAGG;IACH,gCAAoD;IAEpD;;;;OAIG;IACH,yBAAyB;IAEzB;;;OAGG;IACH,yBAAgH;IAEhH;;;;OAIG;IACH,oBAAuB;IAgiB3B;;OAEG;IACH,4BASC;IAxiBG,yBAA4B;IAC5B,mBAAmB;IA6fvB;;OAEG;IACH,wBAQC;IArgBG;;;;OAIG;IACH,oBAAwB;IAGxB,oBAAsB;IACtB,sBAAwB;IACxB,sBAAwB;IACxB,6BAA+B;IAE/B;;;;OAIG;IACH,sBAAyB;IAEzB;;;;OAIG;IACH,qBAAqB;IAErB;;;;OAIG;IACH,kBAAmB;IAEnB;;;OAGG;IACH,YAFU,qBAAqB,CAEH;IAG5B,mBAAuC;IASvC;;;OAGG;IACH,mBAA+C;IAG/C;;;OAGG;IACH,sBAAuB;IAEvB;;;;OAIG;IACH,sBAAuB;IAEvB;;;;OAIG;IACH,mBAAsB;IACtB,gCAA2B;IAC3B,+BAA0B;IAkBtB;;;;OAIG;IACH,oBAAgD;IAoCpD;;;OAGG;IACH,gBAFU,QAAQ,CAsChB;IAWF;;;;OAIG;IACH,uBAA2C;IAuC/C,eAGC;IAED,wBAMC;IAED;;;;;;;OAOG;IACH,uBA4DC;IAED;;;;;;OAMG;IACH,sBAKC;IAED;;;;;;OAMG;IACH,wBA2CC;IAED;;;;;OAKG;IACH,sBAoBC;IAED,mBAiDC;IAED;;;;OAIG;IACH,eAaC;IAED;;;;OAIG;IACH,qBAoBC;IAeD;;;;OAIG;IACH,mCAUC;CAeJ;iBA5rBgB,kBAAkB;iBALlB,0CAA0C;qBAGtC,6BAA6B;oBAF9B,kCAAkC"}
|
|
@@ -10,7 +10,6 @@ import { GhostTrail } from "./GhostTrail.js";
|
|
|
10
10
|
import { SEGMENT_TIERS_DEFAULT } from "./SEGMENT_TIERS_DEFAULT.js";
|
|
11
11
|
import { segment_cell_extent } from "./segment_cell_extent.js";
|
|
12
12
|
import { segment_cell_layout } from "./segment_cell_layout.js";
|
|
13
|
-
import { segment_frame_transform } from "./segment_frame_transform.js";
|
|
14
13
|
import { segment_mask_apply, segment_mask_url } from "./segment_mask_url.js";
|
|
15
14
|
import { segment_mask_width } from "./segment_mask_width.js";
|
|
16
15
|
import { segment_tick_positions } from "./segment_tick_positions.js";
|
|
@@ -27,13 +26,6 @@ const REBUILD_WIDTH_THRESHOLD_PX = 0.5;
|
|
|
27
26
|
*/
|
|
28
27
|
const UNSCALED_TOLERANCE = 2e-3;
|
|
29
28
|
|
|
30
|
-
/**
|
|
31
|
-
* How often a linked bar checks that its notches or cells still sit on the screen's pixels, in milliseconds. A
|
|
32
|
-
* transform on an ancestor or on a containing iframe moves them without any event the bar hears.
|
|
33
|
-
* @type {number}
|
|
34
|
-
*/
|
|
35
|
-
const RECHECK_INTERVAL_MS = 250;
|
|
36
|
-
|
|
37
29
|
/**
|
|
38
30
|
* Resource bar in the style of a MOBA health bar: the values fill it end to end, notches mark fixed amounts, and
|
|
39
31
|
* a ghost behind the fill trails a drop so the loss stays readable for a moment.
|
|
@@ -197,22 +189,6 @@ export class SegmentedResourceBarView extends View {
|
|
|
197
189
|
*/
|
|
198
190
|
this.__columns = [];
|
|
199
191
|
|
|
200
|
-
/**
|
|
201
|
-
* scratch for {@link segment_frame_transform}: [scale, offset]
|
|
202
|
-
* @type {number[]}
|
|
203
|
-
* @private
|
|
204
|
-
*/
|
|
205
|
-
this.__frame = [1, 0];
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* The timer that re-checks the placement while linked; 0 when none
|
|
209
|
-
* @type {number}
|
|
210
|
-
* @private
|
|
211
|
-
*/
|
|
212
|
-
this.__recheck_timer = 0;
|
|
213
|
-
|
|
214
|
-
this.__recheck = this.__recheck.bind(this);
|
|
215
|
-
|
|
216
192
|
/**
|
|
217
193
|
*
|
|
218
194
|
* @type {List<NumericInterval>}
|
|
@@ -388,10 +364,6 @@ export class SegmentedResourceBarView extends View {
|
|
|
388
364
|
this.__sizeObserver.start();
|
|
389
365
|
this.__watch_device_pixel_ratio();
|
|
390
366
|
this.update();
|
|
391
|
-
|
|
392
|
-
if (typeof setInterval === 'function') {
|
|
393
|
-
this.__recheck_timer = setInterval(this.__recheck, RECHECK_INTERVAL_MS);
|
|
394
|
-
}
|
|
395
367
|
}
|
|
396
368
|
|
|
397
369
|
unlink() {
|
|
@@ -401,11 +373,6 @@ export class SegmentedResourceBarView extends View {
|
|
|
401
373
|
|
|
402
374
|
this.__sizeObserver.stop();
|
|
403
375
|
|
|
404
|
-
if (this.__recheck_timer !== 0) {
|
|
405
|
-
clearInterval(this.__recheck_timer);
|
|
406
|
-
this.__recheck_timer = 0;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
376
|
if (this.__dpr_query !== null) {
|
|
410
377
|
this.__dpr_query.removeEventListener('change', this.__handle_dpr_change);
|
|
411
378
|
this.__dpr_query = null;
|
|
@@ -463,21 +430,16 @@ export class SegmentedResourceBarView extends View {
|
|
|
463
430
|
|
|
464
431
|
const dpr = typeof devicePixelRatio === 'number' && devicePixelRatio > 0 ? devicePixelRatio : 1;
|
|
465
432
|
|
|
466
|
-
// how the iframes this bar sits in are drawn by the pages around them — invisible from in here
|
|
467
|
-
const frame = segment_frame_transform(el.ownerDocument.defaultView, this.__frame);
|
|
468
|
-
const frame_scale = frame[0];
|
|
469
|
-
const frame_offset = frame[1];
|
|
470
|
-
|
|
471
433
|
// a CSS scale on an ancestor shows each CSS pixel of the bar as `scale` page pixels. The computed width is
|
|
472
434
|
// serialised to a few decimals (175.844 for 175.84375), so an unscaled bar measures a hair off 1 — enough to
|
|
473
435
|
// put a width that should be whole in device pixels just past it — and is read as unscaled
|
|
474
|
-
const measured_scale =
|
|
436
|
+
const measured_scale = rect.width > 0 ? rect.width / layout_width : 1;
|
|
475
437
|
const scale = Math.abs(measured_scale - 1) < UNSCALED_TOLERANCE ? 1 : measured_scale;
|
|
476
438
|
|
|
477
439
|
// device pixels per CSS pixel of the bar
|
|
478
440
|
const ratio = dpr * scale;
|
|
479
441
|
|
|
480
|
-
const origin_device =
|
|
442
|
+
const origin_device = rect.left * dpr;
|
|
481
443
|
const origin_phase = origin_device - Math.round(origin_device);
|
|
482
444
|
|
|
483
445
|
const max = this.__value_max.getValue();
|
|
@@ -699,18 +661,6 @@ export class SegmentedResourceBarView extends View {
|
|
|
699
661
|
ghost.width = `${segment_cell_extent(layout, ghost_fraction * count) / ratio}px`;
|
|
700
662
|
}
|
|
701
663
|
|
|
702
|
-
/**
|
|
703
|
-
* Place again if anything moved that no event reports: an ancestor's transform, the transform of an iframe the
|
|
704
|
-
* bar sits in, a move by a fraction of a pixel. Cheap when nothing did — a computed width and a few rects —
|
|
705
|
-
* and {@link updateSegments} rebuilds only on a change.
|
|
706
|
-
* @private
|
|
707
|
-
*/
|
|
708
|
-
__recheck() {
|
|
709
|
-
if (this.isLinked) {
|
|
710
|
-
this.updateSegments();
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
|
|
714
664
|
/**
|
|
715
665
|
* @private
|
|
716
666
|
*/
|
package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Samples per texel. Each reads the average whose texel matches the solid angle it stands for, so
|
|
3
|
-
* fewer samples read coarser averages and more read finer ones, back toward point taps that catch or
|
|
4
|
-
* miss a bright texel. Measured on a single bright texel of a 1024 map at 48 places, level 1 over
|
|
5
|
-
* level 0 in solid-angle energy: 32 → 0.995 ± 0.014, 64 → 0.998 ± 0.008 (at most 1.005),
|
|
6
|
-
* 196 → 1.001 ± 0.019 — at 196 the lod is 0.5 .. 1.7, and every read below 1 blends in level 0's
|
|
7
|
-
* point taps. UE filters with 32 below roughness 0.1 and 64 above.
|
|
8
|
-
* @type {number}
|
|
9
|
-
*/
|
|
10
|
-
export const CONVOLVE_FROM_AVERAGES_SAMPLE_COUNT: number;
|
|
11
|
-
export const shader_convolve_reflection_map_from_averages: ComputeShader;
|
|
12
|
-
import { ComputeShader } from "../../shader/ComputeShader.js";
|
|
13
|
-
//# sourceMappingURL=shader_convolve_reflection_map_from_averages.d.ts.map
|
package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shader_convolve_reflection_map_from_averages.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.js"],"names":[],"mappings":"AAqCA;;;;;;;;GAQG;AACH,kDAFU,MAAM,CAEsC;AAmJtD,yEAII;8BAlL0B,+BAA+B"}
|
package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.js
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { chunk_cone_cosine_from_roughness } from "../../shader/chunk/brdf/chunk_cone_cosine_from_roughness.js";
|
|
2
|
-
import {
|
|
3
|
-
chunk_build_orthonormal_matrix_n
|
|
4
|
-
} from "../../shader/chunk/geometry/normal/chunk_build_orthonormal_matrix_n.js";
|
|
5
|
-
import {
|
|
6
|
-
chunk_uv_octahedral_unit_decode
|
|
7
|
-
} from "../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_decode.js";
|
|
8
|
-
import {
|
|
9
|
-
chunk_uv_octahedral_unit_encode
|
|
10
|
-
} from "../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_encode.js";
|
|
11
|
-
import { chunk_uniform_sample_cone } from "../../shader/chunk/geometry/ray/chunk_uniform_sample_cone.js";
|
|
12
|
-
import { chunk_pow2 } from "../../shader/chunk/math/chunk_pow2.js";
|
|
13
|
-
import { chunk_safe_rcp } from "../../shader/chunk/math/chunk_safe_rcp.js";
|
|
14
|
-
import { chunk_hammersley_2d } from "../../shader/chunk/noise/chunk_hammersley_2d.js";
|
|
15
|
-
import {
|
|
16
|
-
chunk_texture_octahedral_skirt_texel_uv
|
|
17
|
-
} from "../../shader/chunk/texture/octahedral/chunk_texture_octahedral_skirt_texel_uv.js";
|
|
18
|
-
import { chunk_texture_octahedral_skirt_uv } from "../../shader/chunk/texture/octahedral/chunk_texture_octahedral_skirt_uv.js";
|
|
19
|
-
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
20
|
-
import { ComputeShader } from "../../shader/ComputeShader.js";
|
|
21
|
-
import { ShaderResourceSetDescriptor } from "../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
22
|
-
import { ShaderDescriptor } from "../../shader/ShaderDescriptor.js";
|
|
23
|
-
import { chunk_reflection_sample_weight } from "./chunk_reflection_sample_weight.js";
|
|
24
|
-
import { chunk_sphere_probe_lod_to_roughness } from "./chunk_sphere_probe_lod_to_roughness.js";
|
|
25
|
-
import { BSDF_ROUGHNESS_MINIMUM } from "./DEFINES.js";
|
|
26
|
-
import { ENVIRONMENT_MAP_SAMPLER_RESOURCE } from "./ENVIRONMENT_MAP_SAMPLER_RESOURCE.js";
|
|
27
|
-
|
|
28
|
-
const resources = new ShaderResourceSetDescriptor();
|
|
29
|
-
|
|
30
|
-
resources.createGroup()
|
|
31
|
-
// the map's level 0, and its plain averages from level 1 down (see shader_downsample_environment_map)
|
|
32
|
-
.addTexture("level_0", "float")
|
|
33
|
-
.addTexture("averages", "float")
|
|
34
|
-
.addStorageTexture("output", "rgba16float")
|
|
35
|
-
.add(ENVIRONMENT_MAP_SAMPLER_RESOURCE)
|
|
36
|
-
;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Samples per texel. Each reads the average whose texel matches the solid angle it stands for, so
|
|
40
|
-
* fewer samples read coarser averages and more read finer ones, back toward point taps that catch or
|
|
41
|
-
* miss a bright texel. Measured on a single bright texel of a 1024 map at 48 places, level 1 over
|
|
42
|
-
* level 0 in solid-angle energy: 32 → 0.995 ± 0.014, 64 → 0.998 ± 0.008 (at most 1.005),
|
|
43
|
-
* 196 → 1.001 ± 0.019 — at 196 the lod is 0.5 .. 1.7, and every read below 1 blends in level 0's
|
|
44
|
-
* point taps. UE filters with 32 below roughness 0.1 and 64 above.
|
|
45
|
-
* @type {number}
|
|
46
|
-
*/
|
|
47
|
-
export const CONVOLVE_FROM_AVERAGES_SAMPLE_COUNT = 64;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* How much a read of the averages widens the lobe, as mean squared angle per steradian a sample
|
|
51
|
-
* stands for. The lobe exp(2 (N·H - 1) / r^4) is a Gaussian of mean squared angle 4 r^4 (N·H =
|
|
52
|
-
* cos(θ/2), so N·H - 1 ≈ -θ²/8), and convolving adds variances, so the lobe is narrowed to
|
|
53
|
-
* r^4 - k Ω_s / 4 and lands at the width it is asked for.
|
|
54
|
-
*
|
|
55
|
-
* A box over the texel plus the bilinear tent across its neighbours predicts 1/2; 1 is measured. On
|
|
56
|
-
* a 1024 map's sun against level 1 from 8192 point taps (1.315° rms): k = 0 → 1.436°, 1/2 → 1.380°,
|
|
57
|
-
* 1 → 1.317°; the sun's tail error 110% → 49%. The two reads a lod between levels blends, and an
|
|
58
|
-
* average's footprint 2 + 2/n texels of the one above rather than 2, are the likely difference.
|
|
59
|
-
* Matching the width leaves the shape: the core is flatter than a Gaussian, and the sky's rms error
|
|
60
|
-
* against the reference goes 0.166 → 0.222.
|
|
61
|
-
* @type {number}
|
|
62
|
-
*/
|
|
63
|
-
const AVERAGES_BLUR_PER_SOLID_ANGLE = 1;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Level 1 of the prefilter, by filtered importance sampling: each sample reads the plain average of
|
|
67
|
-
* level 0 whose texel is the solid angle the sample stands for, so a texel brighter than its
|
|
68
|
-
* neighbours is averaged into the coarser texel the sample reads instead of being hit or missed by
|
|
69
|
-
* the sample pattern. Point taps into level 0 — 196 of them over a cone of 639 level-0 texels — put
|
|
70
|
-
* one bright texel's share of level 1 anywhere from 0.79 to 1.21 of its energy, and an HDR sun
|
|
71
|
-
* came out 0.66% brighter than it went in.
|
|
72
|
-
*
|
|
73
|
-
* Samples are uniform in the cone, so each stands for the same solid angle and reads the same
|
|
74
|
-
* average: the averages blur the lobe by one fixed amount, which the lobe gives back by narrowing
|
|
75
|
-
* (see AVERAGES_BLUR_PER_SOLID_ANGLE). UE's importance sampling read fine averages in the lobe's core
|
|
76
|
-
* and coarse ones in its tail, and the sun came out in blocks.
|
|
77
|
-
*
|
|
78
|
-
* Level 1 only. The levels after it read the level above, already smooth at their sample spacing
|
|
79
|
-
* (see shader_convolve_reflection_map). Read from level 0 instead, their samples land on averages
|
|
80
|
-
* 8 to 16 texels a side, too coarse an octahedral grid to keep a bright texel's energy: ±11% at
|
|
81
|
-
* level 4, and a sky 11% brighter.
|
|
82
|
-
*
|
|
83
|
-
* @see https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-20-gpu-based-importance-sampling
|
|
84
|
-
* @see https://github.com/EpicGames/UnrealEngine/blob/5.4/Engine/Shaders/Private/ReflectionEnvironmentShaders.usf FilterPS
|
|
85
|
-
* @see https://projects.blender.org/blender/blender/src/commit/866ef5b468589587395b1ee7480ea75b4c0fbc26/source/blender/draw/engines/eevee_next/shaders/eevee_lightprobe_sphere_convolve_comp.glsl for the lobe
|
|
86
|
-
* @type {CodeChunk}
|
|
87
|
-
*/
|
|
88
|
-
const body = CodeChunk.from(
|
|
89
|
-
//language=WGSL
|
|
90
|
-
`
|
|
91
|
-
/// level 0 is the map's own, the levels below it are the averages
|
|
92
|
-
fn sample_source_level(direction: vec3<f32>, level: u32) -> vec4<f32> {
|
|
93
|
-
let uv = uv_octahedral_unit_encode(direction);
|
|
94
|
-
|
|
95
|
-
if (level == 0u) {
|
|
96
|
-
let size = f32(textureDimensions(level_0).x);
|
|
97
|
-
|
|
98
|
-
return textureSampleLevel(level_0, sEnvironment, texture_octahedral_skirt_uv(uv, size), 0.0);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
let average_level = level - 1u;
|
|
102
|
-
let size = f32(textureDimensions(averages, average_level).x);
|
|
103
|
-
|
|
104
|
-
return textureSampleLevel(averages, sEnvironment, texture_octahedral_skirt_uv(uv, size), f32(average_level));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@compute @workgroup_size(16,16,1)
|
|
108
|
-
fn main(
|
|
109
|
-
@builtin(global_invocation_id) global_invocation_id : vec3<u32>,
|
|
110
|
-
){
|
|
111
|
-
let output_size = textureDimensions(output);
|
|
112
|
-
|
|
113
|
-
let output_texel_i = global_invocation_id.xy;
|
|
114
|
-
|
|
115
|
-
if(any(output_texel_i >= output_size)){
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/* From mip to linear roughness (same as UI). */
|
|
120
|
-
let roughness = max(sphere_probe_lod_to_roughness(1.0), ${BSDF_ROUGHNESS_MINIMUM});
|
|
121
|
-
let cone_cos = cone_cosine_from_roughness(roughness);
|
|
122
|
-
|
|
123
|
-
// the skirt too: a skirt texel takes its interior twin's uv, so it is that texel, computed again
|
|
124
|
-
let out_uv = texture_octahedral_skirt_texel_uv(output_texel_i, output_size.x);
|
|
125
|
-
let out_direction = uv_octahedral_unit_decode( out_uv );
|
|
126
|
-
|
|
127
|
-
let basis = build_orthonormal_matrix_n(out_direction);
|
|
128
|
-
|
|
129
|
-
var weight_accum = 0.0;
|
|
130
|
-
var radiance_accum = vec4(0.0);
|
|
131
|
-
|
|
132
|
-
const sample_count = ${CONVOLVE_FROM_AVERAGES_SAMPLE_COUNT};
|
|
133
|
-
|
|
134
|
-
// uniform in the cone, so every sample stands for the same solid angle
|
|
135
|
-
let sample_solid_angle = 2.0 * PI * (1.0 - cone_cos) / f32(sample_count);
|
|
136
|
-
|
|
137
|
-
// narrowed by the blur the averages add, so the lobe comes out at the roughness asked for
|
|
138
|
-
let lobe_roughness = sqrt(sqrt(max(
|
|
139
|
-
pow2(pow2(roughness)) - ${AVERAGES_BLUR_PER_SOLID_ANGLE.toFixed(6)} * sample_solid_angle / 4.0,
|
|
140
|
-
pow2(pow2(${BSDF_ROUGHNESS_MINIMUM}))
|
|
141
|
-
)));
|
|
142
|
-
|
|
143
|
-
// level 0's octahedral square, n texels a side, spans 2 in octahedron coordinates; a texel there
|
|
144
|
-
// covers (2/n)^2 of it, and the octahedron's solid angle per unit area is |d|_1^3 along unit d
|
|
145
|
-
let level_0_interior = f32(textureDimensions(level_0).x) - 2.0;
|
|
146
|
-
let level_0_texel_area = 4.0 / (level_0_interior * level_0_interior);
|
|
147
|
-
|
|
148
|
-
let last_level = f32(textureNumLevels(averages));
|
|
149
|
-
|
|
150
|
-
for (var i = 0u; i < sample_count; i++) {
|
|
151
|
-
let rand = hammersley_2d(i, sample_count);
|
|
152
|
-
|
|
153
|
-
let in_direction = normalize(basis * uniform_sample_cone(rand, cone_cos));
|
|
154
|
-
|
|
155
|
-
let l1 = dot(abs(in_direction), vec3(1.0));
|
|
156
|
-
let texel_solid_angle = level_0_texel_area * l1 * l1 * l1;
|
|
157
|
-
|
|
158
|
-
let lod = clamp(0.5 * log2(sample_solid_angle / texel_solid_angle), 0.0, last_level);
|
|
159
|
-
let lod_floor = floor(lod);
|
|
160
|
-
let level = u32(lod_floor);
|
|
161
|
-
|
|
162
|
-
let radiance = mix(
|
|
163
|
-
sample_source_level(in_direction, level),
|
|
164
|
-
sample_source_level(in_direction, min(level + 1u, u32(last_level))),
|
|
165
|
-
lod - lod_floor
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
let weight = reflection_sample_weight(out_direction, in_direction, lobe_roughness);
|
|
169
|
-
|
|
170
|
-
radiance_accum += radiance * weight;
|
|
171
|
-
weight_accum += weight;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
let out_radiance = radiance_accum * safe_rcp(weight_accum);
|
|
175
|
-
|
|
176
|
-
textureStore(output, output_texel_i, out_radiance);
|
|
177
|
-
}
|
|
178
|
-
`, [
|
|
179
|
-
chunk_sphere_probe_lod_to_roughness,
|
|
180
|
-
chunk_hammersley_2d,
|
|
181
|
-
chunk_build_orthonormal_matrix_n,
|
|
182
|
-
chunk_safe_rcp,
|
|
183
|
-
chunk_pow2,
|
|
184
|
-
chunk_uniform_sample_cone,
|
|
185
|
-
chunk_texture_octahedral_skirt_texel_uv,
|
|
186
|
-
chunk_texture_octahedral_skirt_uv,
|
|
187
|
-
chunk_uv_octahedral_unit_decode,
|
|
188
|
-
chunk_uv_octahedral_unit_encode,
|
|
189
|
-
chunk_reflection_sample_weight,
|
|
190
|
-
chunk_cone_cosine_from_roughness,
|
|
191
|
-
]
|
|
192
|
-
);
|
|
193
|
-
|
|
194
|
-
export const shader_convolve_reflection_map_from_averages = new ComputeShader(ShaderDescriptor.from({
|
|
195
|
-
label: 'Convolve reflection map from averages',
|
|
196
|
-
body,
|
|
197
|
-
resources
|
|
198
|
-
}));
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a point in a window's CSS pixels lands in the top-most window this one can see: `top = offset + local * scale`,
|
|
3
|
-
* through every same-origin iframe it sits in, each frame's own transform included.
|
|
4
|
-
*
|
|
5
|
-
* Nothing inside an iframe can see how the page around it draws it: an iframe the host scales to fit (a preview, a
|
|
6
|
-
* playground) reports `devicePixelRatio` and every rect as though unscaled, so something drawn for that pixel grid
|
|
7
|
-
* is painted on another. Walking out through `frameElement` is the one way to find out. A cross-origin frame stops
|
|
8
|
-
* the walk (its `frameElement` reads null, or throws), and is taken as unscaled from there out.
|
|
9
|
-
*
|
|
10
|
-
* @param {Window|null|undefined} win the window the element is in
|
|
11
|
-
* @param {number[]} result receives [scale, offset]
|
|
12
|
-
* @returns {number[]} result
|
|
13
|
-
*/
|
|
14
|
-
export function segment_frame_transform(win: Window | null | undefined, result: number[]): number[];
|
|
15
|
-
//# sourceMappingURL=segment_frame_transform.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"segment_frame_transform.d.ts","sourceRoot":"","sources":["../../../../../../src/view/elements/progress/segmented/segment_frame_transform.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,6CAJW,MAAM,GAAC,IAAI,GAAC,SAAS,UACrB,MAAM,EAAE,GACN,MAAM,EAAE,CAyDpB"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a point in a window's CSS pixels lands in the top-most window this one can see: `top = offset + local * scale`,
|
|
3
|
-
* through every same-origin iframe it sits in, each frame's own transform included.
|
|
4
|
-
*
|
|
5
|
-
* Nothing inside an iframe can see how the page around it draws it: an iframe the host scales to fit (a preview, a
|
|
6
|
-
* playground) reports `devicePixelRatio` and every rect as though unscaled, so something drawn for that pixel grid
|
|
7
|
-
* is painted on another. Walking out through `frameElement` is the one way to find out. A cross-origin frame stops
|
|
8
|
-
* the walk (its `frameElement` reads null, or throws), and is taken as unscaled from there out.
|
|
9
|
-
*
|
|
10
|
-
* @param {Window|null|undefined} win the window the element is in
|
|
11
|
-
* @param {number[]} result receives [scale, offset]
|
|
12
|
-
* @returns {number[]} result
|
|
13
|
-
*/
|
|
14
|
-
export function segment_frame_transform(win, result) {
|
|
15
|
-
let scale = 1;
|
|
16
|
-
let offset = 0;
|
|
17
|
-
|
|
18
|
-
let w = win;
|
|
19
|
-
|
|
20
|
-
for (let depth = 0; depth < 16 && w; depth++) {
|
|
21
|
-
let frame = null;
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
frame = w.frameElement;
|
|
25
|
-
} catch (e) {
|
|
26
|
-
frame = null;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (!frame) {
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const host = frame.ownerDocument && frame.ownerDocument.defaultView;
|
|
34
|
-
|
|
35
|
-
if (!host) {
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const style = host.getComputedStyle(frame);
|
|
40
|
-
|
|
41
|
-
const border_left = parseFloat(style.borderLeftWidth) || 0;
|
|
42
|
-
const border_right = parseFloat(style.borderRightWidth) || 0;
|
|
43
|
-
const padding_left = parseFloat(style.paddingLeft) || 0;
|
|
44
|
-
const padding_right = parseFloat(style.paddingRight) || 0;
|
|
45
|
-
|
|
46
|
-
let layout_width = parseFloat(style.width);
|
|
47
|
-
|
|
48
|
-
if (style.boxSizing !== 'border-box') {
|
|
49
|
-
layout_width += border_left + border_right + padding_left + padding_right;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const rect = frame.getBoundingClientRect();
|
|
53
|
-
|
|
54
|
-
const frame_scale = layout_width > 0 && rect.width > 0 ? rect.width / layout_width : 1;
|
|
55
|
-
|
|
56
|
-
// where the frame's content starts, in the host window's CSS pixels
|
|
57
|
-
const content_left = rect.left + (border_left + padding_left) * frame_scale;
|
|
58
|
-
|
|
59
|
-
offset = content_left + offset * frame_scale;
|
|
60
|
-
scale *= frame_scale;
|
|
61
|
-
|
|
62
|
-
w = host;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
result[0] = scale;
|
|
66
|
-
result[1] = offset;
|
|
67
|
-
|
|
68
|
-
return result;
|
|
69
|
-
}
|