hilo3d 2.0.0-alpha.1 → 2.0.0-alpha.3

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 CHANGED
@@ -1,3 +1,72 @@
1
+ # 2.0.0-alpha.2 (2026-07-26)
2
+
3
+ ### Breaking changes
4
+
5
+ - Expand the fixed `MaterialBlock` std140 ABI for layered PBR material data and reserve WebGPU group
6
+ 3 bindings 0/1 for the pass-global opaque scene texture. Portable custom uniform blocks retain
7
+ registration order and now start at WebGPU group 3 binding 2.
8
+
9
+ ### Changes
10
+
11
+ - Replace the legacy PBR lighting core with correlated Smith-GGX, Burley diffuse, anisotropic GGX,
12
+ energy-compensated/specular-occluded IBL, layered clearcoat, and physically smooth punctual-light
13
+ attenuation. Add glTF parsing and material shader support for `KHR_materials_anisotropy`,
14
+ `KHR_materials_clearcoat`, `KHR_materials_transmission`, `KHR_materials_volume`, and
15
+ `KHR_materials_ior`, plus spectrally integrated thin-film `KHR_materials_iridescence`.
16
+ - Add forward opaque scene-color capture and pass-global transparent-material sampling through the
17
+ Render Graph/RHI path. Add a linear-HDR `PostProcessRenderPipelineFactory`, engine-owned
18
+ soft-knee/13-tap/tent-pyramid `Bloom`, and a one-pass `ColorUber` display transform with LMS white
19
+ balance, grading, PBR Neutral/ACES/Reinhard tone mapping, vignette, exact sRGB output, and
20
+ display-space dithering.
21
+ - Replace the Bloom example's application-owned RenderTarget/Gaussian/composite implementation with
22
+ the built-in HDR Bloom and Color Uber pipeline.
23
+ - Add a layered PBR studio with live anisotropy, clearcoat, transmission, and volume comparisons,
24
+ plus a switchable Khronos glTF material gallery using the attributed Anisotropy Barn Lamp,
25
+ Clearcoat Wicker, Dragon Attenuation, and animated Iridescent Dish with Olives sample assets.
26
+ - Replace the overlapping legacy PBR sphere stack with a controlled 30-sample Material Lab,
27
+ switchable steel/copper/gold/ceramic families, explicit metallic/roughness axes, studio lighting,
28
+ and the engine HDR post-processing pipeline.
29
+ - Remove the twelve low-resolution baked/cloud cube-map images from the examples. Shared PBR and
30
+ glTF pages now use a seam-coherent procedural studio environment with neutral fill, warm/cool
31
+ softboxes, generated mipmaps, and runtime PNG face URLs for the CubeTextureLoader/image-release
32
+ examples.
33
+ - Add measured-width `Text2D` wrapping for mixed CJK/Latin content, max-line clipping and ellipsis,
34
+ baseline, paragraph spacing, and letter spacing. Add in-place Sprite source replacement,
35
+ material-only Sprite initialization, atlas-batched `SlicedSprite`, four-state `UiButton`, and
36
+ ImageGen-authored responsive text/nine-slice examples for WebGL 2 and WebGPU.
37
+ - Add Node-level `sortingLayer` and `zIndex` for Sprite/Text2D display order, retain stable
38
+ scene-tree order for ties, make pointer picking select the same topmost 2D node, and restrict
39
+ transparent instancing to adjacent compatible items so batching cannot reorder interleaved
40
+ textures. Document the independent top-left Camera2D and centered Sprite-anchor contracts, and add
41
+ an ImageGen-authored pixel-town example with A* walking, click-to-route interaction, and foot-Y
42
+ ordering across both backends.
43
+ - Lower the supported development and package runtime floor to Node.js 20.19.0, the shared minimum
44
+ accepted by Vite 8 and ESLint 10, and pin npm 10.9.4 so the declared package manager also runs on
45
+ Node 20.
46
+
47
+ ### Fixes
48
+
49
+ - Keep float scene-color variants linear by suppressing material-local gamma encoding and legacy
50
+ per-material tone mapping until the final display transform. Preserve HDR Bloom energy with
51
+ normalized Karis weights, remove the non-physical far-distance light floor, and use refracted
52
+ volume path length for Beer-Lambert attenuation.
53
+ - Rebalance the Khronos layered-material gallery around neutral photographic key/fill lighting,
54
+ readable opaque transmission backdrops, restrained warm highlights, and a 90-degree orbit pitch so
55
+ dark metals and iridescent glass remain legible without clipping the top view.
56
+ - Define one portable coordinate contract for fullscreen render targets, native fragment
57
+ coordinates, top-left managed 2D textures, cube-map face rows, BRDF/LTC lookup tables, compute
58
+ storage rows, pointer input, and readback. Apply it to Bloom, Color Uber, graph present,
59
+ transmission, ShaderToy, Life Game, the compute particle field, the compute path tracer, and
60
+ built-in material/environment sampling so WebGL 2 and WebGPU retain the same Y orientation.
61
+ - Correct `SpriteFrame`'s top-left atlas-row offset for `flipY` textures on both backends. Full
62
+ textures were unaffected, but subframes previously selected the vertically opposite source row,
63
+ swapping nine-slice top/bottom pieces and requiring reversed character-direction maps. Use a
64
+ strictly nine-slice-safe postal UI atlas with uniform stretchable edges and deterministically
65
+ mirrored corners/edge lighting.
66
+ - Expand the game-building skill's coordinate contract: Sprite positions target their anchor in the
67
+ parent local coordinate system, and the default center anchor does not become top-left merely
68
+ because Camera2D uses a top-left screen origin.
69
+
1
70
  # 2.0.0-alpha.1 (2026-07-25)
2
71
 
3
72
  ### Breaking changes
@@ -37,6 +106,13 @@
37
106
  - Redesign the examples gallery with categorized metadata, search, responsive navigation, accessible
38
107
  controls, isolated per-example query parameters, source/direct links, loading states, and a shared
39
108
  renderer statistics panel that reports the active WebGL 2 or WebGPU backend.
109
+ - Curate the gallery into focused Highlights and All Examples collections, replace generic
110
+ descriptions with capability-oriented copy, merge five primitive micro-pages into one visual
111
+ geometry lab, rename the two CanvasTexture demos, and remove obsolete OSG/SMD/TGA loaders,
112
+ duplicated Polly content, unused media, and the non-visual math fixture page.
113
+ - Refresh the shared example lighting and dark canvas treatment, and rebuild Quick Start, point
114
+ lights, instancing, and bloom around deterministic showcase scenes. Add an ImageGen-authored
115
+ graphite/cyan/violet showroom-floor texture used by the new scenes.
40
116
  - Add renderer-local scriptable render pipelines through `RendererCommonOptions.renderPipeline`,
41
117
  reusable `RenderPipelineFactory` configurations, frame-scoped culling/renderer-list handles, a
42
118
  narrow `ScriptableRenderGraph`, retained pass-parameter pools, recovery-aware persistent targets,
package/README.md CHANGED
@@ -192,6 +192,36 @@ failure handling, performance gates, and the capability-gated route to storage b
192
192
  Those compute/storage capability names are currently fail-closed rather than partially emulated on
193
193
  WebGL 2.
194
194
 
195
+ ### HDR PBR and built-in post-processing
196
+
197
+ Use the turnkey post-process factory for linear `rgba16float` lighting, engine-owned opaque scene
198
+ color, high-quality pyramid Bloom, and one final Color Uber display transform:
199
+
200
+ ```ts
201
+ const stage = await Hilo3d.Stage.create({
202
+ backend: 'auto',
203
+ container: document.querySelector('#app')!,
204
+ camera,
205
+ renderPipeline: new Hilo3d.PostProcessRenderPipelineFactory({
206
+ bloom: { threshold: 1, knee: 0.5, intensity: 0.8, scatter: 0.7 },
207
+ colorUber: { toneMapping: 'pbr-neutral', exposure: 0 },
208
+ opaqueTexture: true
209
+ })
210
+ });
211
+ ```
212
+
213
+ PBR lighting uses correlated Smith-GGX, Burley diffuse, energy-compensated specular IBL, layered
214
+ clearcoat, thin-film iridescence, anisotropic GGX, inverse-square punctual lights, and screen-space
215
+ transmission with Beer-Lambert volume attenuation. The glTF loader supports
216
+ `KHR_materials_anisotropy`, `KHR_materials_clearcoat`, `KHR_materials_transmission`,
217
+ `KHR_materials_volume`, and `KHR_materials_ior`, plus `KHR_materials_iridescence`. See the
218
+ [PBR/HDR contract](./documentation/PBR_AND_POST_PROCESSING.md) for color-space rules, algorithms,
219
+ and the explicit screen-space transmission limits. The
220
+ [layered PBR studio](https://hilo3d.js.org/examples/pbr_layered_materials.html) demonstrates the
221
+ direct material API, while the
222
+ [Khronos material gallery](https://hilo3d.js.org/examples/gltf_material_extensions.html) exercises
223
+ the same path with attributed production glTF assets.
224
+
195
225
  ## Modern renderer architecture
196
226
 
197
227
  - `src/render` owns the single public Renderer, scene traversal, frame planning, render-target
@@ -314,6 +344,7 @@ shared Renderer/RenderTarget API.
314
344
  - [glTF viewer](https://hilo3d.js.org/examples/glTFViewer/index.html)
315
345
  - [Engineering documentation index](./documentation/README.md)
316
346
  - [Current rendering architecture](./documentation/RENDERING_ARCHITECTURE.md)
347
+ - [PBR, HDR, and post-processing](./documentation/PBR_AND_POST_PROCESSING.md)
317
348
  - [vNext renderer engineering record](./documentation/ENGINEERING_MODERNIZATION.md#双后端渲染与-shader-abi)
318
349
  - [ShaderMaterial migration guide](./documentation/ENGINEERING_MODERNIZATION.md#shadermaterial-迁移)
319
350
  - [Breaking changes](./CHANGELOG.md#breaking-changes)
package/README_ZH.md CHANGED
@@ -180,6 +180,34 @@ fullscreen feature 采样 scene color;
180
180
  buffer/compute 的 capability-gated 扩展路线。当前 compute/storage
181
181
  capability 会明确失败,不会在 WebGL 2 上提供不完整模拟。
182
182
 
183
+ ### HDR PBR 与内置后处理
184
+
185
+ 完整的线性 `rgba16float` 光照、引擎 opaque scene color、高质量 pyramid Bloom 与最终 Color
186
+ Uber 显示变换可以直接使用:
187
+
188
+ ```ts
189
+ const stage = await Hilo3d.Stage.create({
190
+ backend: 'auto',
191
+ container: document.querySelector('#app')!,
192
+ camera,
193
+ renderPipeline: new Hilo3d.PostProcessRenderPipelineFactory({
194
+ bloom: { threshold: 1, knee: 0.5, intensity: 0.8, scatter: 0.7 },
195
+ colorUber: { toneMapping: 'pbr-neutral', exposure: 0 },
196
+ opaqueTexture: true
197
+ })
198
+ });
199
+ ```
200
+
201
+ PBR 光照使用 correlated Smith-GGX、Burley diffuse、带能量补偿的 specular
202
+ IBL、分层 clearcoat、薄膜干涉 iridescence、anisotropic GGX、inverse-square punctual
203
+ light,以及 screen-space transmission 和 Beer-Lambert volume attenuation。glTF loader 支持
204
+ `KHR_materials_anisotropy`、
205
+ `KHR_materials_clearcoat`、`KHR_materials_transmission`、`KHR_materials_volume` 与
206
+ `KHR_materials_ior`,并支持 `KHR_materials_iridescence`。颜色空间、算法和屏幕空间折射边界见
207
+ [PBR/HDR 合同](./documentation/PBR_AND_POST_PROCESSING.md)。可在
208
+ [分层 PBR 材质展厅](https://hilo3d.js.org/examples/pbr_layered_materials.html)体验直接材质API,也可在
209
+ [Khronos 材质模型展厅](https://hilo3d.js.org/examples/gltf_material_extensions.html)检查同一渲染路径上的真实 glTF 资产。
210
+
183
211
  ## 现代渲染架构
184
212
 
185
213
  - `src/render` 负责唯一公开的 Renderer、scene traversal、frame planning、render target 契约、std140
@@ -291,6 +319,7 @@ API。
291
319
  - [glTF Viewer](https://hilo3d.js.org/examples/glTFViewer/index.html)
292
320
  - [工程文档索引](./documentation/README.md)
293
321
  - [当前渲染架构](./documentation/RENDERING_ARCHITECTURE.md)
322
+ - [PBR、HDR 与后处理](./documentation/PBR_AND_POST_PROCESSING.md)
294
323
  - [vNext 渲染工程记录](./documentation/ENGINEERING_MODERNIZATION.md#双后端渲染与-shader-abi)
295
324
  - [ShaderMaterial 迁移指南](./documentation/ENGINEERING_MODERNIZATION.md#shadermaterial-迁移)
296
325
  - [Breaking changes](./CHANGELOG.md#breaking-changes)