@vitreajs/vitrea 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -257,7 +257,52 @@ var DEFAULT_MATERIAL_PROFILE = {
257
257
  rimWidth: 1.5,
258
258
  rimAlpha: 0.18,
259
259
  specularPower: 6,
260
- specularGain: 0.55,
260
+ /*
261
+ * FITTED 0.55 → 0 (W22 G1; claims §5.94 §3, W22 Decision Log 2 (b)). The
262
+ * light reference's rim has no vertical light in it, and the constant that
263
+ * said it did had been fitting a defect.
264
+ *
265
+ * What was measured: the declared-geometry rim per side (the box's outer
266
+ * 3 CSS px, a peak per side) on the five untinted solid calibration cells
267
+ * of the light bed — `light-solid__{capsule-button,rrect-md,rrect-ml}` and
268
+ * `dark-solid__{capsule-button,rrect-md}` — at both backing scales, over
269
+ * eight rendered documents differing in this constant alone.
270
+ *
271
+ * Why per contrast rather than per side: a side's peak under the declared
272
+ * box mixes rim with the background the rounded shape leaves inside a
273
+ * rectangle's band, and the mixture's weight differs between the horizontal
274
+ * and the vertical pair, so only `T−B` and `L−R` — two sides of identical
275
+ * geometry — are clean. A mean pooled over sides is worse than unclean: it
276
+ * PREFERS 0.55, because the specular lifts `dark-solid__rrect-md`'s top row
277
+ * from −0.061 to +0.062 against a reference of +0.047 while leaving its
278
+ * bottom at −0.061 against the same +0.047. It buys one side of a pair by
279
+ * breaking the other, and only the contrast can see that.
280
+ *
281
+ * The rows, and what they say: eleven of the twenty contrast rows separate
282
+ * the constant, and every one of them minimises at 0. The objective is
283
+ * monotone in the gain on both contrasts — mean |Δ| over the separating
284
+ * rows 0.00097 at 0 rising to 0.03102 at 0.55 — and the separating row is
285
+ * `dark-solid__rrect-md` `T−B` at both scales, where the reference splits
286
+ * top from bottom by +0.0002 and this constant at 0.55 splits them by
287
+ * +0.1237 (1x) and +0.1817 (2x).
288
+ *
289
+ * Why it survived three waves of rim work: until W22 gated the specular
290
+ * sweep on a shimmer amplitude, the highlight pass parked a stationary band
291
+ * on the left edge of every resting surface, so `L−R` was unreadable and
292
+ * `T−B` was being fitted beside a defect worth 0.12–0.15 of luminance. With
293
+ * the band gone the reference's own structure is legible — left equal to
294
+ * right to 0.0002, top over bottom by +0.0002 over a dark backdrop and
295
+ * +0.0086…+0.0162 over a bright one — and this term is an order of
296
+ * magnitude larger than anything it was supposed to be reproducing.
297
+ *
298
+ * The `clear` variant's 0.45 does not move: no scene on the calibration bed
299
+ * declares that variant, so it has no rows and nothing to be fitted on.
300
+ * `lightDirection` and `rimAlpha` were read on the same rows and declined
301
+ * (claims §5.94 §3); the direction still feeds the inner shadow through
302
+ * `platform-web`'s `light.xy`, and it is only on the RIM that this fit
303
+ * makes it inert.
304
+ */
305
+ specularGain: 0,
261
306
  shadowDepth: 0.35,
262
307
  /*
263
308
  * REFITTED 0.55 → 0.05 (2026-08-31), and it is the largest single
@@ -2151,6 +2196,7 @@ var IDLE_CHANNELS = {
2151
2196
  press: 0,
2152
2197
  glow: 0,
2153
2198
  sweep: 0,
2199
+ shimmer: 0,
2154
2200
  lensStrength: 1
2155
2201
  };
2156
2202
 
@@ -3596,15 +3642,22 @@ fn fs_optics(in : FullscreenOut) -> @location(0) vec4f {
3596
3642
  * 'sizeK' is still per pixel, so a container holding a small control and a large
3597
3643
  * platter adapts each of them by its own thickness out of one pass.
3598
3644
  *
3599
- * Strength is zero where the host measured no tone, and the whole axis stands
3600
- * down where there is no backdrop at all rather than reading the zero vector as
3601
- * a black backdrop and dissolving the surface into nothing.
3645
+ * Strength is zero where the host measured no tone, and that strength is the
3646
+ * WHOLE gate (W22 G3). It used to be read together with 'hasBackdrop', because
3647
+ * a group with no pyramid to sample had no measured tone either and the pair
3648
+ * said one thing twice \u2014 until a group stacked over other glass acquired a
3649
+ * backdrop the host can state without a texture to sample ('backdrop-stack.ts').
3650
+ * The concern the flag stood in for is the zero vector being read as a black
3651
+ * backdrop, and 'toneAdapt.w' answers exactly that: it is zero wherever nothing
3652
+ * was measured, and zero wherever the policy has stood the axis down. Reading
3653
+ * the flag as well is what left a nested pane drawing its unadapted body over
3654
+ * glass it had measured \u2014 0.0493 against the law's 0.0245 (claims 5.94 section 5).
3602
3655
  *
3603
3656
  * Written out instead of calling smoothstep() so that a profile patched with
3604
3657
  * low >= high degrades to a step rather than to NaN.
3605
3658
  */
3606
3659
  var toneAdapt = 0.0;
3607
- if (ou.flags.x > 0.5 && ou.toneAdapt.w > 0.0) {
3660
+ if (ou.toneAdapt.w > 0.0) {
3608
3661
  let toneX = ou.toneColour.w + ou.toneAdapt.z * sizeK;
3609
3662
  let toneT = clamp(
3610
3663
  (toneX - ou.toneAdapt.x) / max(ou.toneAdapt.y - ou.toneAdapt.x, 1e-6),
@@ -3637,6 +3690,11 @@ fn fs_optics(in : FullscreenOut) -> @location(0) vec4f {
3637
3690
  * measured response. Chroma is untouched \u2014 the shift is achromatic \u2014 and
3638
3691
  * the author tint still displaces the result per the composition contract.
3639
3692
  *
3693
+ * The solve reads the backdrop as 'toneAnchor.w' \u2014 the group's own linear mean
3694
+ * \u2014 and never as the per-pixel sample, so it is the same closed form whether
3695
+ * this pass composites the backdrop itself or writes a layer for the browser to
3696
+ * composite over a proxy carrying the same mean (W22 G3).
3697
+ *
3640
3698
  * Three stand-downs, each measured rather than defensive: the whole axis is
3641
3699
  * off where no backdrop tone was measured (same gate as the collapse); the
3642
3700
  * solve's authority fades to zero below the dark anchor, where the only
@@ -3646,7 +3704,7 @@ fn fs_optics(in : FullscreenOut) -> @location(0) vec4f {
3646
3704
  */
3647
3705
  var solvedNeutral = neutral;
3648
3706
  var solvedAlpha = sizedAlpha;
3649
- if (ou.flags.x > 0.5 && ou.toneAdapt.w > 0.0 && ou.toneRowThin.w > 0.0 &&
3707
+ if (ou.toneAdapt.w > 0.0 && ou.toneRowThin.w > 0.0 &&
3650
3708
  sizedAlpha > 1e-3 && toneAdapt < 0.995) {
3651
3709
  let encodedInput = srgb_encode(ou.toneColour.w);
3652
3710
  let anchor = max(ou.toneAnchor.x, 1e-4);
@@ -5372,8 +5430,20 @@ function createWebGPURenderer(options = {}) {
5372
5430
  cssPerDevice,
5373
5431
  sweep: lead.channels.sweep,
5374
5432
  sweepBandRadians: material.sweepBandRadians,
5375
- // Reduced Motion removes shimmer travel outright rather than freezing it.
5376
- sweepGain: policy.glass === "none" ? 0 : material.sweepGain,
5433
+ /*
5434
+ * The band's amplitude, from the same lead surface that supplies its
5435
+ * phase. `shimmer` is 0 on a resting surface and nothing in v1 drives
5436
+ * it, so a surface nobody is animating contributes exactly no sweep
5437
+ * term and the pass writes nothing on its rim — the contract the
5438
+ * pass's own comment states, which the profile's `sweepGain` alone
5439
+ * could not keep, because 0 radians of the band's angular coordinate
5440
+ * is the left edge rather than nowhere (W22's Design; the defect
5441
+ * claims §5.90 §4 isolated).
5442
+ *
5443
+ * Reduced Motion removes shimmer travel outright rather than freezing
5444
+ * it, on this same product, and that zeroing is unchanged.
5445
+ */
5446
+ sweepGain: policy.glass === "none" ? 0 : material.sweepGain * lead.channels.shimmer,
5377
5447
  rimWidth: optics.rimWidth,
5378
5448
  pressPointCss: lead.channels.pressPoint ?? lead.centre,
5379
5449
  glowRadiusCss: material.glowRadiusCss,
@@ -5633,5 +5703,5 @@ function createWebGPURenderer(options = {}) {
5633
5703
  }
5634
5704
 
5635
5705
  export { ADAPTIVE_LUMINANCE_HIGH, ADAPTIVE_LUMINANCE_LOW, ADAPTIVE_TINT_DARK, ADAPTIVE_TINT_LIGHT, ANALYSIS_DISPATCH, ANALYSIS_GRID, ANALYSIS_PASS_ID, ANALYSIS_STATS_FLOATS, ANALYSIS_TARGET_EXTENT, ANALYSIS_WORKGROUP, BACKDROP_ALPHA_MODES, BACKDROP_COLOR_SPACES, BACKDROP_KINDS, BACKDROP_PASS_ID, BACKDROP_TONE_HIGH, BACKDROP_TONE_LOW, BACKDROP_TONE_MAX, BACKDROP_TONE_SIZE_BIAS, CANVAS_FORMAT, CHAIN_SIGMA_AT_LEVEL_1, CROSS_CHECK_SHAPE_FLOATS, CROSS_CHECK_WORKGROUP, DEFAULT_MATERIAL_PROFILE, FAMILY_C_CROSS_CHECK, FIELD_PASS_ID, GOVERNOR_LADDER, HIGHLIGHT_PASS_ID, IDENTITY_FIT, IDLE_CHANNELS, INCREASED_OCCLUSION_LIFT, INSTANCE_BYTES, INSTANCE_FLOATS, LENS_AMOUNT_MAX, LENS_AMOUNT_PER_SPAN, LENS_EXTENT_GAIN, LENS_HEIGHT_MAX, LENS_HEIGHT_PER_SPAN, LENS_OVALIZATION, LENS_PROFILE_EXPONENT, LENS_REFRACTION_GAIN, LENS_SIZE_GAIN_MAX, LENS_THICKNESS_REFERENCE, LUMINANCE_WEIGHTS, MATERIAL_OPTICS, MATERIAL_VARIANTS, MAX_CHAIN_LEVELS, MIN_LEVEL_EXTENT, NOMINAL_GOVERNOR, NOMINAL_MATERIAL_POLICY, OPTICS_PASS_ID, OUTER_SHADOW, OUTER_SHADOW_THICK_SPANS, OUTER_SHADOW_THIN_L, OUTER_SHADOW_UNMEASURED_BACKDROP_LUMINANCE, OUTPUT_TEXTURE_FORMAT, PASS_LABEL, REFRACTION_LADDER, REFRACTION_SCALE, RENDERER_ERROR_CODES, RENDERER_PASS_IDS, RendererError, SIZE_OCCLUSION_GAIN, SIZE_SCATTER_FLOOR, SIZE_SCATTER_FLOOR_2X, SIZE_SCATTER_GAIN_FAR_2X, SIZE_SCATTER_GAIN_MAX, SIZE_SCATTER_GAIN_MAX_2X, SIZE_SCATTER_RAMP_REACH_1X_PX, SIZE_SCATTER_RAMP_REACH_2X_PX, SIZE_SCATTER_RAMP_START_FAR_1X, SIZE_SCATTER_RAMP_START_FAR_2X, SIZE_SCATTER_RAMP_START_THICK_1X, SIZE_SCATTER_RAMP_START_THICK_2X, SIZE_SCATTER_RAMP_START_THIN_1X, SIZE_SCATTER_RAMP_START_THIN_2X, SIZE_SCATTER_SPAN_MAX, SIZE_SCATTER_SPAN_MAX_2X, SIZE_SHADOW_GAIN_MAX, SIZE_SPAN_MAX, SIZE_SPAN_MIN, SRGB_ENCODING_EXPONENT, SUPPORTED_APP_TEXTURE_FORMATS, WGSL_ANALYSIS_PASS, WGSL_CROSS_CHECK_PASS, WGSL_DOWNSAMPLE_PASS, WGSL_FIELD_KERNELS, WGSL_FIELD_PASS, WGSL_FIELD_SAMPLE, WGSL_HIGHLIGHT_PASS, WGSL_IMPORT_PASS, WGSL_INSTANCE_STRUCT, WGSL_OPTICS_PASS, WGSL_PRELUDE, WGSL_RSUPN_GRAD, WGSL_RSUP_GRAD, WGSL_SMOOTH_UNION, WORKING_TEXTURE_FORMAT, ZERO_STATS, accessibilityRefractionCap, adaptationStrength, adaptedTintAlpha, adaptedTintColour, adaptiveTint, allShaderSource, alphaNormalisationMode, analysisModule, backdropFit, backdropToneAdaptation, backdropToneResponse, backdropToneSizeBiasUnderPolicy, backdropToneSolveWeight, backdropToneUnderPolicy, bodyBlurPlan, chainModule, clipFieldRectToCanvas, coverFit, createAdaptationState, createAppTextureProvider, createCopyProvider, createDeviceHost, createGovernor, createGpuContext, createGradientProvider, createPassRunner, createPipelineCache, createPyramidStore, createRebuildLedger, createStorageSlot, createTexturePool, createTimingCollector, createUniformSlot, createVideoProvider, createWebGPURenderer, crossCheckKernelModule, displayP3ToSrgbLinear, effectiveRefraction, encodeOutput, encodeOutputBytes, fieldModule, fieldPassSource, groupFieldRect, highlightModule, importColorMatrix, importModule, importPassSource, isUsablePlacement, lensAmountBasePx, lensDepthPx, lensDirection, lensDisplacementPx, lensExtentPx, lensHeightBasePx, lensMagnitudePx, lensOvalizationAt, lensSizeGain, lensSizeGainFromThickness, linearGradientStops, linearToSrgb, linearToSrgbChannel, occlusionAlphaUnderPolicy, opticsModule, opticsUnderPolicy, outerShadowAlpha, outerShadowFalloff, outerShadowLiftRise, outerShadowOcclusionAt, outerShadowReachPx, outerShadowThickOcclusion, outerShadowThinOcclusion, outerShadowUnderPolicy, packInstances, pipelineKey, placementFit, planPyramid, poolKey, readbackDue, refractionRank, relativeLuminance, rendererError, resolveSurfaces, samePlacement, scatterDeepThickness, scatterFloorAtScale, scatterGainAt, scatterGainAtScale, scatterGainFarAtScale, scatterRampAreaMean, scatterRampReachDevicePx, scatterRampStart, scatterSharpShare, scatterSpanMaxAtScale, scatterThickness, shadowDepthPx, sizeOcclusionAlpha, sizeOcclusionAlphaAt, sizeOuterShadowOcclusion, sizeOuterShadowOcclusionAt, sizeScatterSigma, sizeScatterSigmaAt, sizeShadowDepth, sizeShadowDepthAt, sizeThickness, sizeThicknessUnderPolicy, snapRectToDevicePixels, srgbToLinear, srgbToLinearChannel, statsFromBuffer, supportsTimestamps, texelsPerCssPx, tintShade, tintShadeLayer, tintToneAdaptation, tintedMaterialColour, validateAppTexture, withMaterialOverrides };
5636
- //# sourceMappingURL=dist-3OXBJGMC.js.map
5637
- //# sourceMappingURL=dist-3OXBJGMC.js.map
5706
+ //# sourceMappingURL=dist-JWOMZCFF.js.map
5707
+ //# sourceMappingURL=dist-JWOMZCFF.js.map