@plasius/gpu-renderer 0.2.55 → 0.2.56

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
@@ -23,6 +23,20 @@ All notable changes to this project will be documented in this file.
23
23
  - **Security**
24
24
  - (placeholder)
25
25
 
26
+ ## [0.2.56] - 2026-10-24
27
+
28
+ - **Added**
29
+ - (placeholder)
30
+
31
+ - **Changed**
32
+ - (placeholder)
33
+
34
+ - **Fixed**
35
+ - Reject referenced canonical unlit workflows and declared unlit extension markers until an explicit unlit shading path exists, with a bounded diagnostic that preserves the caller's previous supported rendering path.
36
+
37
+ - **Security**
38
+ - (placeholder)
39
+
26
40
  ## [0.2.55] - 2026-10-24
27
41
 
28
42
  - **Added**
@@ -1315,3 +1329,4 @@ All notable changes to this project will be documented in this file.
1315
1329
  [0.2.53]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.53
1316
1330
  [0.2.54]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.54
1317
1331
  [0.2.55]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.55
1332
+ [0.2.56]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.56
package/README.md CHANGED
@@ -78,6 +78,9 @@ Canonical blend materials multiply authored factor alpha by texture alpha once;
78
78
  opaque materials ignore both alpha channels. Direct `WavefrontMeshInput` callers
79
79
  can select `alphaMode: "opaque" | "blend"`; omitting it preserves legacy opacity
80
80
  composition. Alpha masks remain unsupported by the canonical adapter.
81
+ Referenced canonical unlit workflows and declared `KHR_materials_unlit`/`unlit`
82
+ extension markers are unsupported and fail explicitly. Keep those assets on an
83
+ unlit-capable rendering path; do not drop their markers or reinterpret them as lit.
81
84
  For an interactive model viewer with loading, integrity checks, camera gestures
82
85
  and quality controls, use the shared package's `model-inspection` entry.
83
86
 
package/dist/index.cjs CHANGED
@@ -1654,14 +1654,6 @@ function textureSample(binding, textures, label, extra = {}) {
1654
1654
  }
1655
1655
  function cloneMaterialExtensions(material, textures) {
1656
1656
  const extensions = { ...material.extensions ?? {} };
1657
- if (material.workflow === "unlit") {
1658
- const unlitKey = "KHR_materials_unlit";
1659
- const unlitValue = extensions[unlitKey] ?? extensions.unlit ?? {};
1660
- if (typeof unlitValue !== "object" || unlitValue === null || Array.isArray(unlitValue)) {
1661
- throw new TypeError(`Canonical material extension ${unlitKey} must be an object.`);
1662
- }
1663
- extensions[unlitKey] = { ...unlitValue, enabled: true };
1664
- }
1665
1657
  for (const [bindingName, extensionName, textureKey] of EXTENSION_TEXTURE_BINDINGS) {
1666
1658
  const binding = material.textures?.[bindingName];
1667
1659
  if (!binding) {
@@ -1686,7 +1678,10 @@ function mapMaterial(material, materialRefId, textures) {
1686
1678
  if (material.alphaMode === "mask") {
1687
1679
  throw new Error("Canonical alphaMode mask is unsupported by WavefrontMeshInput.");
1688
1680
  }
1689
- if (material.workflow !== "metallic-roughness" && material.workflow !== "unlit") {
1681
+ if (material.workflow === "unlit" || Object.hasOwn(material.extensions ?? {}, "KHR_materials_unlit") || Object.hasOwn(material.extensions ?? {}, "unlit")) {
1682
+ throw new Error("Canonical unlit materials are unsupported by WavefrontMeshInput; retain an unlit-capable rendering path.");
1683
+ }
1684
+ if (material.workflow !== "metallic-roughness") {
1690
1685
  throw new Error(`Unsupported canonical material workflow: ${material.workflow}.`);
1691
1686
  }
1692
1687
  const mapped = {