feat: liquid glass shader — scratch phase complete #9

Merged
iuriishikov merged 3 commits from glass-pr1 into main 2026-07-18 12:59:40 +00:00
Owner

Итог фазы scratch (8 итераций, спека docs/glass-pr1.md + дельты):

  • Shader-виджет iced 0.14 + оригинальный WGSL: SDF-прямоугольник (суперэллипс-углы), линза по Снеллу (краевая полоса от thickness, ior из refraction), пофакторная дисперсия, rim/glare в LCh, мип-пирамида бэкдропа (blur→lod), адаптивная вуаль по luma фона, варианты Regular/Clear/Identity (Clear со scrim), девять ручек §2 живые.
  • Бэкдроп: текстура assets/backdrop.png с фолбэком на процедурную сцену.
  • Вопрос scratch закрыт: кастомный wgpu-пайплайн в iced взлетает. Пружины (вторая половина гейта фазы 0) — PR2 боевого репо shikos-iced-liquid-glass.
  • Известный дефект-перенос: мелкий шахматный паттерн на Regular (алиасинг дисперсии) — первый баг боевого репо.

Ревью: ассистент (дифф прочитан). Мерж: основатель.

Итог фазы scratch (8 итераций, спека docs/glass-pr1.md + дельты): - Shader-виджет iced 0.14 + оригинальный WGSL: SDF-прямоугольник (суперэллипс-углы), линза по Снеллу (краевая полоса от thickness, ior из refraction), пофакторная дисперсия, rim/glare в LCh, мип-пирамида бэкдропа (blur→lod), адаптивная вуаль по luma фона, варианты Regular/Clear/Identity (Clear со scrim), девять ручек §2 живые. - Бэкдроп: текстура assets/backdrop.png с фолбэком на процедурную сцену. - Вопрос scratch закрыт: кастомный wgpu-пайплайн в iced взлетает. Пружины (вторая половина гейта фазы 0) — PR2 боевого репо shikos-iced-liquid-glass. - Известный дефект-перенос: мелкий шахматный паттерн на Regular (алиасинг дисперсии) — первый баг боевого репо. Ревью: ассистент (дифф прочитан). Мерж: основатель.
feat: replace preview placeholder with glass shader widget
All checks were successful
ci / ci-1 (push) Successful in 3m58s
ci / ci (push) Successful in 0s
80acdaf02e
One rounded-rect glass shape (SDF) over a procedural backdrop in
src/glass.wgsl, driven live by the nine playground sliders through a
48-byte uniform block whose layout is validated against the pinned
naga 27.0.3 and pinned by a unit test. Uses the iced 0.14 Primitive
fast path: draw() into the shared pass with engine-set viewport and
scissor, pipeline cached by iced via shader::Pipeline::new.

New dependencies (deliberate): bytemuck 1.25 with derive for the Pod
uniform mirror; tracing 0.1.44 and tracing-subscriber 0.3.23 for the
canonical init from docs/patterns.md. All MIT/Apache, cargo-deny green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat: snell refraction, LCh highlights and squircle corners
All checks were successful
ci / ci-1 (push) Successful in 1m53s
ci / ci (push) Successful in 0s
19f1569f2e
Shader upgrade per the calibration notes: refraction now follows Snell's
law through the thickness profile (handle maps to ior 1.0..1.62) with
per-channel ior dispersion; rim, two-lobe specular and vibrancy act as
lightness/chroma lifts in CIE LCh instead of RGB addition, masked by the
quintic edge curve times |grad sdf|; corners are a superellipse (n=4.5)
with radius still the handle; edge AA per smoothstep(-1.5, 0.5, sdf).
Rim range is 60*edge_width (the calibration 120 at the default 2 px) so
the edge_width handle stays live; specular lobes are scaled by the
specular handle. Constants are starting calibration, to be tuned by eye.

Verified: naga 27.0.3 validation, headless wgpu render on NVK, Lab
round-trip checked to 1e-7, just ci green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat: calibrate glass to the LiquidGlassKit regular preset
All checks were successful
ci / ci-1 (push) Successful in 1m44s
ci / ci (push) Successful in 0s
ci / ci-1 (pull_request) Successful in 1m56s
ci / ci (pull_request) Successful in 0s
ec7d0c66d0
Defaults: thickness 10, refraction 0.81 (ior ~1.5), dispersion 5 with
per-channel iors of ior -/+ 0.02*D (slider now 0..10), fresnel rim off by
default (branch kept), specular intensity 0.1 with range 30 and the
sharpness/convergence/bias lobe shaping (-0.15 / 0.1 / 1.0), light from
light_angle - pi/4 with the default -pi/4 (slider now -pi..pi, thickness
slider 0..40). Milkiness: interior refraction samples a 9-tap low-pass of
the procedural backdrop (0.2-scale-mip equivalent) and MATERIAL_TINT
vec4(0.902, 0.951, 1.0, 0.8) veils it at alpha*0.8 (future handle, TZ
section 2); the blur handle stacks on top. Corner exponent is 2.0
(circular) with the squircle 4.5 constant kept as a switch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
shikos/shikos-glass-scratch!9
No description provided.