@photivra/engine 2.19.0 → 2.21.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.
Files changed (242) hide show
  1. package/CHANGELOG.md +289 -1
  2. package/CITATION.cff +1 -1
  3. package/NODE_SUPPORT.md +7 -5
  4. package/README.md +7 -6
  5. package/SECURITY.md +1 -1
  6. package/THIRD_PARTY.md +21 -10
  7. package/dist/capture/dng-lens-correction-opcodes.d.ts +32 -0
  8. package/dist/capture/dng-lens-correction-opcodes.js +119 -0
  9. package/dist/capture/dng-lens-correction-opcodes.js.map +1 -0
  10. package/dist/capture/exposure-build-up-stage.d.ts +16 -0
  11. package/dist/capture/exposure-build-up-stage.js +4 -0
  12. package/dist/capture/exposure-build-up-stage.js.map +1 -0
  13. package/dist/capture/native-environment-lean.d.ts +2 -1
  14. package/dist/capture/native-environment-lean.js +42 -78
  15. package/dist/capture/native-environment-lean.js.map +1 -1
  16. package/dist/capture/native-environment-tabulated.js +4 -3
  17. package/dist/capture/native-environment-tabulated.js.map +1 -1
  18. package/dist/capture/native-raw-dng.d.ts +6 -0
  19. package/dist/capture/native-raw-dng.js +16 -2
  20. package/dist/capture/native-raw-dng.js.map +1 -1
  21. package/dist/capture/native-raw.d.ts +3 -2
  22. package/dist/capture/native-raw.js +5 -4
  23. package/dist/capture/native-raw.js.map +1 -1
  24. package/dist/capture/sensor-raw-producer.d.ts +4 -1
  25. package/dist/capture/sensor-raw-producer.js +15 -8
  26. package/dist/capture/sensor-raw-producer.js.map +1 -1
  27. package/dist/core/shared-helpers.d.ts +2 -0
  28. package/dist/core/shared-helpers.js +4 -0
  29. package/dist/core/shared-helpers.js.map +1 -1
  30. package/dist/core/version.d.ts +1 -1
  31. package/dist/core/version.js +1 -1
  32. package/dist/core/version.js.map +1 -1
  33. package/dist/equipment/generic-lens-catalogue.d.ts +11 -4
  34. package/dist/equipment/generic-lens-catalogue.js +49 -7
  35. package/dist/equipment/generic-lens-catalogue.js.map +1 -1
  36. package/dist/equipment/generic-tier-assets.d.ts +32 -0
  37. package/dist/equipment/generic-tier-assets.js +18 -14
  38. package/dist/equipment/generic-tier-assets.js.map +1 -1
  39. package/dist/equipment/generic-tier-presets.js +2 -3
  40. package/dist/equipment/generic-tier-presets.js.map +1 -1
  41. package/dist/equipment/sensor-profile-body.d.ts +78 -0
  42. package/dist/equipment/sensor-profile-body.js +77 -0
  43. package/dist/equipment/sensor-profile-body.js.map +1 -0
  44. package/dist/equipment/sensor-profiles.d.ts +8 -0
  45. package/dist/equipment/sensor-profiles.js +82 -0
  46. package/dist/equipment/sensor-profiles.js.map +1 -0
  47. package/dist/facade/catalogue-lens-signal.d.ts +2 -2
  48. package/dist/facade/catalogue-lens-signal.js +58 -71
  49. package/dist/facade/catalogue-lens-signal.js.map +1 -1
  50. package/dist/facade/chart-radiance-batch.js +2 -1
  51. package/dist/facade/chart-radiance-batch.js.map +1 -1
  52. package/dist/facade/defocus-image-space-provider.d.ts +7 -0
  53. package/dist/facade/defocus-image-space-provider.js +64 -76
  54. package/dist/facade/defocus-image-space-provider.js.map +1 -1
  55. package/dist/facade/display-view-gpu-session.js +2 -0
  56. package/dist/facade/display-view-gpu-session.js.map +1 -1
  57. package/dist/facade/display-view-gpu.d.ts +13 -5
  58. package/dist/facade/display-view-gpu.js +4 -4
  59. package/dist/facade/display-view-gpu.js.map +1 -1
  60. package/dist/facade/display-view-lens-signal.d.ts +1 -1
  61. package/dist/facade/display-view-lens-signal.js +30 -26
  62. package/dist/facade/display-view-lens-signal.js.map +1 -1
  63. package/dist/facade/display-view.d.ts +3 -1
  64. package/dist/facade/display-view.js +6 -24
  65. package/dist/facade/display-view.js.map +1 -1
  66. package/dist/facade/expected-signal-setup.d.ts +3 -1
  67. package/dist/facade/expected-signal-setup.js +1 -1
  68. package/dist/facade/expected-signal-setup.js.map +1 -1
  69. package/dist/facade/expected-signal.d.ts +47 -14
  70. package/dist/facade/expected-signal.js +117 -112
  71. package/dist/facade/expected-signal.js.map +1 -1
  72. package/dist/facade/exposure-build-up.d.ts +70 -0
  73. package/dist/facade/exposure-build-up.js +164 -0
  74. package/dist/facade/exposure-build-up.js.map +1 -0
  75. package/dist/facade/fast-methods.d.ts +50 -0
  76. package/dist/facade/fast-methods.js +58 -0
  77. package/dist/facade/fast-methods.js.map +1 -0
  78. package/dist/facade/fast-resolution.d.ts +12 -0
  79. package/dist/facade/fast-resolution.js +18 -0
  80. package/dist/facade/fast-resolution.js.map +1 -0
  81. package/dist/facade/generic-lens-capture.d.ts +5 -4
  82. package/dist/facade/generic-lens-capture.js +5 -4
  83. package/dist/facade/generic-lens-capture.js.map +1 -1
  84. package/dist/facade/image-plane-enable.d.ts +7 -0
  85. package/dist/facade/image-plane-enable.js +17 -0
  86. package/dist/facade/image-plane-enable.js.map +1 -0
  87. package/dist/facade/image-plane-lattice-data.d.ts +6 -0
  88. package/dist/facade/image-plane-lattice-data.js +10 -0
  89. package/dist/facade/image-plane-lattice-data.js.map +1 -0
  90. package/dist/facade/image-plane-support.d.ts +33 -0
  91. package/dist/facade/image-plane-support.js +11 -0
  92. package/dist/facade/image-plane-support.js.map +1 -0
  93. package/dist/facade/image-plane.d.ts +36 -0
  94. package/dist/facade/image-plane.js +353 -0
  95. package/dist/facade/image-plane.js.map +1 -0
  96. package/dist/facade/mixed-illumination.d.ts +108 -0
  97. package/dist/facade/mixed-illumination.js +174 -0
  98. package/dist/facade/mixed-illumination.js.map +1 -0
  99. package/dist/facade/representative-light-sources.d.ts +72 -0
  100. package/dist/facade/representative-light-sources.js +124 -0
  101. package/dist/facade/representative-light-sources.js.map +1 -0
  102. package/dist/facade/scene-radiance.d.ts +129 -4
  103. package/dist/facade/scene-radiance.js +48 -13
  104. package/dist/facade/scene-radiance.js.map +1 -1
  105. package/dist/facade/simulate-capture.d.ts +88 -19
  106. package/dist/facade/simulate-capture.js +374 -145
  107. package/dist/facade/simulate-capture.js.map +1 -1
  108. package/dist/facade/simulate-display-view.d.ts +3 -2
  109. package/dist/facade/simulate-display-view.js +36 -18
  110. package/dist/facade/simulate-display-view.js.map +1 -1
  111. package/dist/gpu/chart-composite-gpu.d.ts +13 -1
  112. package/dist/gpu/chart-composite-gpu.js +48 -9
  113. package/dist/gpu/chart-composite-gpu.js.map +1 -1
  114. package/dist/gpu/chart-radiance-gpu.js +4 -30
  115. package/dist/gpu/chart-radiance-gpu.js.map +1 -1
  116. package/dist/gpu/display-view-composite-material-module.d.ts +10 -4
  117. package/dist/gpu/display-view-composite-material-module.js +39 -13
  118. package/dist/gpu/display-view-composite-material-module.js.map +1 -1
  119. package/dist/gpu/display-view-image-material-module.d.ts +86 -0
  120. package/dist/gpu/display-view-image-material-module.js +339 -0
  121. package/dist/gpu/display-view-image-material-module.js.map +1 -0
  122. package/dist/gpu/display-view-image-quality.d.ts +45 -0
  123. package/dist/gpu/display-view-image-quality.js +380 -0
  124. package/dist/gpu/display-view-image-quality.js.map +1 -0
  125. package/dist/gpu/display-view-quality-gpu.d.ts +67 -1
  126. package/dist/gpu/display-view-quality-gpu.js +136 -205
  127. package/dist/gpu/display-view-quality-gpu.js.map +1 -1
  128. package/dist/gpu/display-view-speed-gpu.d.ts +51 -3
  129. package/dist/gpu/display-view-speed-gpu.js +131 -93
  130. package/dist/gpu/display-view-speed-gpu.js.map +1 -1
  131. package/dist/gpu/wgsl-display-view-quality-kernel.d.ts +29 -15
  132. package/dist/gpu/wgsl-display-view-quality-kernel.js +58 -36
  133. package/dist/gpu/wgsl-display-view-quality-kernel.js.map +1 -1
  134. package/dist/gpu/wgsl-display-view-speed-kernel.d.ts +21 -6
  135. package/dist/gpu/wgsl-display-view-speed-kernel.js +46 -11
  136. package/dist/gpu/wgsl-display-view-speed-kernel.js.map +1 -1
  137. package/dist/gpu/wgsl-exact-sum.d.ts +20 -0
  138. package/dist/gpu/wgsl-exact-sum.js +42 -0
  139. package/dist/gpu/wgsl-exact-sum.js.map +1 -0
  140. package/dist/index.d.ts +18 -3
  141. package/dist/index.js +12 -1
  142. package/dist/index.js.map +1 -1
  143. package/dist/motion/subject-motion.d.ts +66 -0
  144. package/dist/motion/subject-motion.js +52 -0
  145. package/dist/motion/subject-motion.js.map +1 -0
  146. package/dist/optics/aperture-diameter.d.ts +47 -0
  147. package/dist/optics/aperture-diameter.js +50 -0
  148. package/dist/optics/aperture-diameter.js.map +1 -0
  149. package/dist/optics/detail-limit.d.ts +182 -0
  150. package/dist/optics/detail-limit.js +336 -0
  151. package/dist/optics/detail-limit.js.map +1 -0
  152. package/dist/optics/generic-lens-lateral-color.d.ts +83 -0
  153. package/dist/optics/generic-lens-lateral-color.js +77 -0
  154. package/dist/optics/generic-lens-lateral-color.js.map +1 -0
  155. package/dist/optics/generic-lens-psf.d.ts +18 -2
  156. package/dist/optics/generic-lens-psf.js +79 -48
  157. package/dist/optics/generic-lens-psf.js.map +1 -1
  158. package/dist/optics/lens-psf-profile.d.ts +7 -0
  159. package/dist/optics/lens-psf-profile.js +2 -1
  160. package/dist/optics/lens-psf-profile.js.map +1 -1
  161. package/dist/optics/scene-to-sensor-irradiance.d.ts +13 -0
  162. package/dist/optics/scene-to-sensor-irradiance.js +7 -0
  163. package/dist/optics/scene-to-sensor-irradiance.js.map +1 -1
  164. package/dist/output/crop-to-match-focal-length.d.ts +62 -0
  165. package/dist/output/crop-to-match-focal-length.js +63 -0
  166. package/dist/output/crop-to-match-focal-length.js.map +1 -0
  167. package/dist/output/developed-lens-corrections.d.ts +19 -5
  168. package/dist/output/developed-lens-corrections.js +30 -11
  169. package/dist/output/developed-lens-corrections.js.map +1 -1
  170. package/dist/output/generic-lens-corrections.d.ts +41 -3
  171. package/dist/output/generic-lens-corrections.js +57 -9
  172. package/dist/output/generic-lens-corrections.js.map +1 -1
  173. package/dist/output/lens-corrections.d.ts +12 -2
  174. package/dist/output/lens-corrections.js +22 -7
  175. package/dist/output/lens-corrections.js.map +1 -1
  176. package/dist/output/print-contrast-reference.js +1 -1
  177. package/dist/output/print-contrast-reference.js.map +1 -1
  178. package/dist/output/print-plan.d.ts +41 -5
  179. package/dist/output/print-plan.js +59 -14
  180. package/dist/output/print-plan.js.map +1 -1
  181. package/dist/output/print-size-blur-noise.d.ts +110 -0
  182. package/dist/output/print-size-blur-noise.js +138 -0
  183. package/dist/output/print-size-blur-noise.js.map +1 -0
  184. package/dist/sensor/binomial-sample.d.ts +3 -0
  185. package/dist/sensor/binomial-sample.js +86 -0
  186. package/dist/sensor/binomial-sample.js.map +1 -0
  187. package/dist/sensor/eqe-electron-rate.js +1 -7
  188. package/dist/sensor/eqe-electron-rate.js.map +1 -1
  189. package/dist/sensor/exposure-window.d.ts +2 -0
  190. package/dist/sensor/exposure-window.js +2 -2
  191. package/dist/sensor/exposure-window.js.map +1 -1
  192. package/dist/sensor/readout-timing.js +2 -23
  193. package/dist/sensor/readout-timing.js.map +1 -1
  194. package/dist/sensor/response-application-compatibility.js +1 -6
  195. package/dist/sensor/response-application-compatibility.js.map +1 -1
  196. package/dist/sensor/responsivity-photocurrent.js +1 -7
  197. package/dist/sensor/responsivity-photocurrent.js.map +1 -1
  198. package/dist/sensor/sensor-characteristics.d.ts +147 -0
  199. package/dist/sensor/sensor-characteristics.js +126 -0
  200. package/dist/sensor/sensor-characteristics.js.map +1 -0
  201. package/dist/sensor/spatial-sample-reduction.js +1 -5
  202. package/dist/sensor/spatial-sample-reduction.js.map +1 -1
  203. package/dist/sensor/spectral-quadrature.js +1 -6
  204. package/dist/sensor/spectral-quadrature.js.map +1 -1
  205. package/dist/sensor/temporal-photo-signal.d.ts +3 -0
  206. package/dist/sensor/temporal-photo-signal.js +5 -2
  207. package/dist/sensor/temporal-photo-signal.js.map +1 -1
  208. package/dist/stabilization/system.d.ts +9 -0
  209. package/dist/stabilization/system.js +5 -6
  210. package/dist/stabilization/system.js.map +1 -1
  211. package/docs/AGENT_GUIDE.md +5 -0
  212. package/docs/API_REFERENCE.md +173 -2
  213. package/docs/QUICK_START.md +213 -6
  214. package/docs/USAGE.md +157 -3
  215. package/docs/api/capture-native-raw-dng.md +6 -0
  216. package/docs/api/core-version.md +1 -1
  217. package/docs/api/equipment-generic-lens-catalogue.md +17 -7
  218. package/docs/api/equipment-sensor-profile-body.md +64 -0
  219. package/docs/api/equipment-sensor-profiles.md +86 -0
  220. package/docs/api/exports.json +357 -2
  221. package/docs/api/facade-display-view-gpu.md +5 -2
  222. package/docs/api/facade-exposure-build-up.md +105 -0
  223. package/docs/api/facade-fast-methods.md +99 -0
  224. package/docs/api/facade-image-plane-enable.md +16 -0
  225. package/docs/api/facade-mixed-illumination.md +67 -0
  226. package/docs/api/facade-representative-light-sources.md +131 -0
  227. package/docs/api/facade-scene-radiance.md +54 -3
  228. package/docs/api/facade-simulate-capture.md +60 -15
  229. package/docs/api/facade-simulate-display-view.md +3 -2
  230. package/docs/api/motion-subject-motion.md +23 -0
  231. package/docs/api/optics-aperture-diameter.md +51 -0
  232. package/docs/api/optics-detail-limit.md +203 -0
  233. package/docs/api/optics-generic-lens-lateral-color.md +79 -0
  234. package/docs/api/output-crop-to-match-focal-length.md +67 -0
  235. package/docs/api/output-developed-lens-corrections.md +10 -1
  236. package/docs/api/output-generic-lens-corrections.md +40 -2
  237. package/docs/api/output-lens-corrections.md +11 -1
  238. package/docs/api/output-print-plan.md +35 -1
  239. package/docs/api/output-print-size-blur-noise.md +115 -0
  240. package/docs/api/sensor-sensor-characteristics.md +105 -0
  241. package/llms.txt +6 -0
  242. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Generated by scripts/fit-image-plane-lattice.mjs; do not edit. Photivra's own fitted spectra (LHTSS, arXiv:1710.05732 v5),
3
+ // fitted against CIE D65 and the CIE 1931 2° observer at fit time only; no CIE value is stored (THIRD_PARTY.md).
4
+ /**
5
+ * The 120 stored nodes of the print reflectance lattice (r, g, b indices in order, the neutral axis skipped), each 41 16-bit
6
+ * reflectance codes at 380, 390, …, 780 nm (value / 65535), delta-coded along wavelength in base 36: nodes separated by ";",
7
+ * codes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23s,yr,hh,9l,5l,3d,22,18,r,f,8,3,2,0,2,-3,1,0,-2,4,-5,6,-3,-2,4,-2,-2;7qp,1,7,v,36,ai,qx,1ln,339,5h3,822,8k5,6dg,3qm,1zj,11p,kp,bv,7c,4m,2z,21,1c,x,j,8,a,0,5,-2,1,1,0,0,0,-1,2,0,-1,-1,1;odz,-1,0,6,x,48,ea,119,274,3t1,4zy,4tf,3ji,26w,18q,on,dv,82,4v,32,1z,1b,v,j,c,7,4,0,3,0,-1,-1,1,1,-4,5,-1,-6,7,-2,0";
10
+ //# sourceMappingURL=image-plane-lattice-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-plane-lattice-data.js","sourceRoot":"","sources":["../../src/facade/image-plane-lattice-data.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,6HAA6H;AAC7H,iHAAiH;AAEjH;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,itgBAAitgB,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n// Generated by scripts/fit-image-plane-lattice.mjs; do not edit. Photivra's own fitted spectra (LHTSS, arXiv:1710.05732 v5),\n// fitted against CIE D65 and the CIE 1931 2° observer at fit time only; no CIE value is stored (THIRD_PARTY.md).\n\n/**\n * The 120 stored nodes of the print reflectance lattice (r, g, b indices in order, the neutral axis skipped), each 41 16-bit\n * reflectance codes at 380, 390, …, 780 nm (value / 65535), delta-coded along wavelength in base 36: nodes separated by \";\",\n * codes by \",\".\n */\nexport const IMAGE_PLANE_LATTICE_CODES = \"2lg,-2,1,4,j,1c,1u,-1,-71,-he,-m6,-ir,-cm,-7o,-4i,-2l,-1i,-y,-k,-d,-9,-5,-4,-1,-1,1,1,0,1,0,-1,1,-2,4,-3,3,-3,-3,8,-5,2;b3v,1,1,h,1j,3g,3o,-4n,-ts,-1vj,-2hl,-287,-1jh,-xl,-j6,-as,-65,-3o,-27,-1g,-x,-m,-e,-9,-4,-3,0,-2,1,1,-1,-2,2,1,-6,a,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1,-6,7,-2,0\";\n"]}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The opt-in seam of the image-plane scene (2.21, #581). Its module and its lattice data (about 10 KB gzip) are not reachable
3
+ * from `simulateCapture` or the display view by themselves: an application that prints photos calls `prepareImagePlaneScenes()`
4
+ * (image-plane-enable.ts, a module of its own) once, which loads them with a dynamic import, so a bundle that never prints a photo
5
+ * (and never imports that function) carries none of their bytes, not even as a lazy chunk (docs/IMAGE_PLANE.md, "Lazy loading and size").
6
+ */
7
+ import type { ResolvedImagePlaneScene } from "./scene-radiance.js";
8
+ import type { DisplayViewGpuSetup } from "./display-view.js";
9
+ /** Internal: what the facade and the GPU display view take from the image-plane module once it is enabled. */
10
+ export interface ImagePlaneSupport {
11
+ IMAGE_PLANE_LATTICE_VERSION: string;
12
+ imagePlanePrint(scene: unknown, chartSize: unknown, framedWidthM: number, frameAspect: number, assume: (id: string, kind: "default", value: unknown, explanation: string) => void): {
13
+ widthM: number;
14
+ heightM: number;
15
+ surroundReflectance: number;
16
+ defaulted: ("heightM" | "surroundReflectance")[];
17
+ };
18
+ resolveImagePlaneScene(value: unknown, aspect: number, assume?: (id: string, kind: "default" | "model" | "derived", value: unknown, explanation: string) => void): Promise<ResolvedImagePlaneScene>;
19
+ /** The GPU display view's image-plane module (loaded on demand by the GPU renderer). */
20
+ loadGpuModule(): Promise<ImagePlaneGpuSupport>;
21
+ }
22
+ /** Internal: the GPU side (src/gpu/display-view-image-material-module.ts), typed loosely so that this module imports no GPU code. */
23
+ export interface ImagePlaneGpuSupport {
24
+ createDisplayViewImageModules(runtime: unknown, probe: (signal: AbortSignal) => Promise<unknown>): {
25
+ moduleFor(gpu: DisplayViewGpuSetup, signal: AbortSignal): Promise<unknown>;
26
+ release(): void;
27
+ };
28
+ runImagePlaneConformance(runtime: unknown, signal: AbortSignal | undefined): Promise<true | string>;
29
+ }
30
+ /** Internal: the enabled image-plane module, or undefined. */
31
+ export declare function imagePlaneSupport(): ImagePlaneSupport | undefined;
32
+ /** Internal: records the loaded module (`prepareImagePlaneScenes`, image-plane-enable.ts). */
33
+ export declare function setImagePlaneSupport(value: ImagePlaneSupport): void;
@@ -0,0 +1,11 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ let support;
3
+ /** Internal: the enabled image-plane module, or undefined. */
4
+ export function imagePlaneSupport() {
5
+ return support;
6
+ }
7
+ /** Internal: records the loaded module (`prepareImagePlaneScenes`, image-plane-enable.ts). */
8
+ export function setImagePlaneSupport(value) {
9
+ support = value;
10
+ }
11
+ //# sourceMappingURL=image-plane-support.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-plane-support.js","sourceRoot":"","sources":["../../src/facade/image-plane-support.ts"],"names":[],"mappings":"AAAA,sCAAsC;AA2BtC,IAAI,OAAsC,CAAC;AAE3C,8DAA8D;AAC9D,MAAM,UAAU,iBAAiB;IAC/B,OAAO,OAAO,CAAC;AACjB,CAAC;AACD,8FAA8F;AAC9F,MAAM,UAAU,oBAAoB,CAAC,KAAwB;IAC3D,OAAO,GAAG,KAAK,CAAC;AAClB,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The opt-in seam of the image-plane scene (2.21, #581). Its module and its lattice data (about 10 KB gzip) are not reachable\n * from `simulateCapture` or the display view by themselves: an application that prints photos calls `prepareImagePlaneScenes()`\n * (image-plane-enable.ts, a module of its own) once, which loads them with a dynamic import, so a bundle that never prints a photo\n * (and never imports that function) carries none of their bytes, not even as a lazy chunk (docs/IMAGE_PLANE.md, \"Lazy loading and size\").\n */\n\nimport type { ResolvedImagePlaneScene } from \"./scene-radiance.js\";\nimport type { DisplayViewGpuSetup } from \"./display-view.js\";\n\n/** Internal: what the facade and the GPU display view take from the image-plane module once it is enabled. */\nexport interface ImagePlaneSupport {\n IMAGE_PLANE_LATTICE_VERSION: string;\n imagePlanePrint(scene: unknown, chartSize: unknown, framedWidthM: number, frameAspect: number, assume: (id: string, kind: \"default\", value: unknown, explanation: string) => void):\n { widthM: number; heightM: number; surroundReflectance: number; defaulted: (\"heightM\" | \"surroundReflectance\")[] };\n resolveImagePlaneScene(value: unknown, aspect: number, assume?: (id: string, kind: \"default\" | \"model\" | \"derived\", value: unknown, explanation: string) => void): Promise<ResolvedImagePlaneScene>;\n /** The GPU display view's image-plane module (loaded on demand by the GPU renderer). */\n loadGpuModule(): Promise<ImagePlaneGpuSupport>;\n}\n/** Internal: the GPU side (src/gpu/display-view-image-material-module.ts), typed loosely so that this module imports no GPU code. */\nexport interface ImagePlaneGpuSupport {\n createDisplayViewImageModules(runtime: unknown, probe: (signal: AbortSignal) => Promise<unknown>): { moduleFor(gpu: DisplayViewGpuSetup, signal: AbortSignal): Promise<unknown>; release(): void };\n runImagePlaneConformance(runtime: unknown, signal: AbortSignal | undefined): Promise<true | string>;\n}\n\nlet support: ImagePlaneSupport | undefined;\n\n/** Internal: the enabled image-plane module, or undefined. */\nexport function imagePlaneSupport(): ImagePlaneSupport | undefined {\n return support;\n}\n/** Internal: records the loaded module (`prepareImagePlaneScenes`, image-plane-enable.ts). */\nexport function setImagePlaneSupport(value: ImagePlaneSupport): void {\n support = value;\n}\n"]}
@@ -0,0 +1,36 @@
1
+ import { resolveChartSizeOption, type ResolvedImagePlaneScene } from "./scene-radiance.js";
2
+ /** Version of the print reflectance lattice and its data; a change to any node spectrum changes it. */
3
+ export declare const IMAGE_PLANE_LATTICE_VERSION = "1.0.0";
4
+ /** Engine defaults of an image-plane scene. */
5
+ export declare const IMAGE_PLANE_DEFAULTS: Readonly<{
6
+ paperWhiteReflectance: 0.9;
7
+ paperBlackReflectance: 0.01;
8
+ interpolation: "bilinear";
9
+ }>;
10
+ /** Internal (for tests and docs): the node spectra as 125 rows of 41 reflectances at 380, 390, …, 780 nm. */
11
+ export declare function imagePlaneLatticeSpectra(): {
12
+ levels: readonly number[];
13
+ wavelengthsNm: readonly number[];
14
+ spectra: readonly Float64Array[];
15
+ };
16
+ /** The image's size, validated (the facade needs the aspect before the print's placement). */
17
+ export declare function readImagePlaneSize(value: unknown): {
18
+ width: number;
19
+ height: number;
20
+ };
21
+ /**
22
+ * Validates an image-plane scene and prepares it on a print of aspect `aspect` (height / width): the digest of its data, the
23
+ * count of clipped `linear-srgb` samples, and the decoders. The data is borrowed (read on every lookup, never written).
24
+ */
25
+ export declare function resolveImagePlaneScene(value: unknown, aspect: number, assume?: (id: string, kind: "default" | "model" | "derived", value: unknown, explanation: string) => void): Promise<ResolvedImagePlaneScene>;
26
+ /** The scene's form in the facade's source digest: the image's SHA-256 and shape, the paper, the interpolation and the lattice version. */
27
+ export declare function imagePlaneDigestForm(scene: ResolvedImagePlaneScene): Record<string, unknown>;
28
+ /** The assumptions an image-plane capture records: the model, the defaults taken, and the clipped linear samples. */
29
+ export declare function imagePlaneAssumptions(scene: ResolvedImagePlaneScene, record: Record<string, unknown>): [string, "default" | "model" | "derived", unknown, string][];
30
+ /** The GPU display view's image-plane module, loaded on demand by the GPU renderer (its own chunk). */
31
+ export declare function loadGpuModule(): Promise<typeof import("../gpu/display-view-image-material-module.js")>;
32
+ /**
33
+ * The print's placement: `chartSize` with its height defaulting to the image's aspect, or, without it, the print fitted inside
34
+ * the frame (centered, filling its width or height) on the default surround; records the defaults it takes.
35
+ */
36
+ export declare function imagePlanePrint(scene: unknown, chartSize: unknown, framedWidthM: number, frameAspect: number, assume: (id: string, kind: "default", value: unknown, explanation: string) => void): ReturnType<typeof resolveChartSizeOption>;
@@ -0,0 +1,353 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * The image-plane scene (2.21, #581): a photo as a flat matte print on the scene plane. Loaded on demand (a dynamic import by
4
+ * the facade) only when a request's scene is `{ kind: "image-plane" }`, so a bundle that never prints a photo does not carry
5
+ * it or its lattice data.
6
+ *
7
+ * **From pixel to reflectance** (docs/IMAGE_PLANE.md):
8
+ *
9
+ * 1. Decode to linear sRGB: `srgb-8` and `srgb-16` through the sRGB transfer function (IEC 61966-2-1, the piecewise EOTF)
10
+ * evaluated with the portable power (`portablePow`, within 1 ulp, the same bits in every JavaScript engine); `linear-srgb`
11
+ * as given, clipped to [0, 1]. A pixel with alpha a is composited over the paper in linear light: c' = a·c + (1 − a).
12
+ * 2. The print reflectance lattice: 5 × 5 × 5 nodes at the sRGB code values 0, 1/4, 1/2, 3/4, 1 per channel (their linear
13
+ * values L₀…L₄). The node spectra on the neutral axis are flat (the node's linear value); the other 120 are Photivra's own
14
+ * LHTSS fits (S. A. Burns, arXiv:1710.05732 v5, "Least Hyperbolic Tangent Slope Squared (LHTSS) Method", pp. 24–26), each
15
+ * reproducing its node's sRGB under CIE D65 with the CIE 1931 2° observer (scripts/fit-image-plane-lattice.mjs), stored at
16
+ * 10 nm over 380–780 nm in 16 bits and linearly interpolated between samples. A pixel's spectrum is the trilinear
17
+ * interpolation, in linear sRGB, of the spectra of the eight nodes of its cell: a convex combination of spectra in [0, 1],
18
+ * so it lies in [0, 1], and, XYZ being linear in the spectrum, it reproduces the pixel's sRGB under D65 to the nodes' own
19
+ * residual (measured by the fit: CIEDE2000 at most 6.4·10⁻⁴ over a 17³ grid of sRGB codes).
20
+ * 3. The paper: ρ = ρ_black + (ρ_white − ρ_black)·ρ_lattice, affine and so still bounded; defaults 0.90 and 0.01.
21
+ * 4. Between pixel centers (`bilinear`, the default): the pixels' spectra weighted bilinearly, which under D65 is the bilinear
22
+ * interpolation of the pixels' linear sRGB; `nearest` takes the pixel under the point. The print's edge pixels extend to
23
+ * its edges (clamp to edge).
24
+ *
25
+ * Print-local coordinates are the chart's (cu = ±1 at the left and right edges, cv up, ±aspect at the top and bottom); the
26
+ * pixel coordinates are X = (cu + 1)·W/2 and Y = (aspect − cv)·H/(2·aspect), with pixel centers at half-integers.
27
+ */
28
+ import { InvalidConfigurationError } from "../core/configuration-error.js";
29
+ import { portablePow } from "../core/portable-math.js";
30
+ import { FULL_RESOLUTION_CEILING_PIXELS, FULL_RESOLUTION_DEFAULT_PIXELS, resolveRaisedLimit } from "../core/pixel-limits.js";
31
+ import { IMAGE_PLANE_LATTICE_CODES } from "./image-plane-lattice-data.js";
32
+ import { CHART_SIZE_DEFAULT_SURROUND_REFLECTANCE, resolveChartSizeOption } from "./scene-radiance.js";
33
+ /** Version of the print reflectance lattice and its data; a change to any node spectrum changes it. */
34
+ export const IMAGE_PLANE_LATTICE_VERSION = "1.0.0";
35
+ /** Engine defaults of an image-plane scene. */
36
+ export const IMAGE_PLANE_DEFAULTS = /* @__PURE__ */ Object.freeze({ paperWhiteReflectance: 0.9, paperBlackReflectance: 0.01, interpolation: "bilinear" });
37
+ /** Host bytes of the per-pixel signal rows a signal scene keeps (the direct path's query points revisit nearby pixels). */
38
+ const SIGNAL_ROW_CACHE_BYTES = 32 << 20;
39
+ const AXIS = 5, NODES = 125, SAMPLES = 41, MINIMUM_NM = 380, STEP_NM = 10, MAXIMUM_NM = MINIMUM_NM + STEP_NM * (SAMPLES - 1);
40
+ /** The sRGB EOTF with the portable power. */
41
+ function decodeSrgb(encoded) {
42
+ return encoded <= 0.04045 ? encoded / 12.92 : portablePow((encoded + 0.055) / 1.055, 2.4);
43
+ }
44
+ /** The lattice's node levels in linear sRGB. */
45
+ const LEVELS = /* @__PURE__ */ Float64Array.from({ length: AXIS }, (_, k) => (k === 0 ? 0 : k === AXIS - 1 ? 1 : decodeSrgb(k / (AXIS - 1))));
46
+ let nodeSpectra = null;
47
+ /** The 125 node spectra, 41 samples each (node index r·25 + g·5 + b), decoded once from the data module. */
48
+ function spectra() {
49
+ if (nodeSpectra)
50
+ return nodeSpectra;
51
+ const out = new Float64Array(NODES * SAMPLES), rows = IMAGE_PLANE_LATTICE_CODES.split(";");
52
+ if (rows.length !== NODES - AXIS)
53
+ throw new InvalidConfigurationError("The image-plane lattice data is damaged.");
54
+ let row = 0;
55
+ for (let node = 0; node < NODES; node++) {
56
+ const r = Math.floor(node / 25), g = Math.floor(node / 5) % 5, b = node % 5;
57
+ if (r === g && g === b) {
58
+ out.fill(LEVELS[r], node * SAMPLES, (node + 1) * SAMPLES);
59
+ continue;
60
+ }
61
+ const deltas = rows[row++].split(",");
62
+ if (deltas.length !== SAMPLES)
63
+ throw new InvalidConfigurationError("The image-plane lattice data is damaged.");
64
+ let code = 0;
65
+ for (let i = 0; i < SAMPLES; i++) {
66
+ code += parseInt(deltas[i], 36);
67
+ if (!(code >= 0 && code <= 65535))
68
+ throw new InvalidConfigurationError("The image-plane lattice data is damaged.");
69
+ out[node * SAMPLES + i] = code / 65535;
70
+ }
71
+ }
72
+ return (nodeSpectra = out);
73
+ }
74
+ /** Internal (for tests and docs): the node spectra as 125 rows of 41 reflectances at 380, 390, …, 780 nm. */
75
+ export function imagePlaneLatticeSpectra() {
76
+ const all = spectra();
77
+ return { levels: Array.from(LEVELS), wavelengthsNm: Array.from({ length: SAMPLES }, (_, i) => MINIMUM_NM + STEP_NM * i),
78
+ spectra: Array.from({ length: NODES }, (_, k) => all.slice(k * SAMPLES, (k + 1) * SAMPLES)) };
79
+ }
80
+ /** Every node's reflectance at one wavelength (the samples linearly interpolated). */
81
+ function nodeReflectancesAt(nm) {
82
+ if (typeof nm !== "number" || !(nm >= MINIMUM_NM && nm <= MAXIMUM_NM))
83
+ throw new InvalidConfigurationError("An image-plane print is defined on " + MINIMUM_NM + "–" + MAXIMUM_NM + " nm.");
84
+ const all = spectra(), p = (nm - MINIMUM_NM) / STEP_NM, i = Math.min(SAMPLES - 2, Math.floor(p)), f = p - i, out = new Float64Array(NODES);
85
+ for (let k = 0; k < NODES; k++)
86
+ out[k] = all[k * SAMPLES + i] * (1 - f) + all[k * SAMPLES + i + 1] * f;
87
+ return out;
88
+ }
89
+ /** The image's size, validated (the facade needs the aspect before the print's placement). */
90
+ export function readImagePlaneSize(value) {
91
+ if (typeof value !== "object" || value === null)
92
+ throw new InvalidConfigurationError("scene must be an object.");
93
+ const image = value.image;
94
+ if (typeof image !== "object" || image === null)
95
+ throw new InvalidConfigurationError("An image-plane scene needs image { width, height, channels, encoding, data }.");
96
+ const { width, height } = image;
97
+ for (const [name, v] of [["width", width], ["height", height]])
98
+ if (typeof v !== "number" || !Number.isSafeInteger(v) || v < 1 || v > 65_536)
99
+ throw new InvalidConfigurationError("scene.image." + name + " must be an integer from 1 to 65536.");
100
+ return { width: width, height: height };
101
+ }
102
+ /**
103
+ * Validates an image-plane scene and prepares it on a print of aspect `aspect` (height / width): the digest of its data, the
104
+ * count of clipped `linear-srgb` samples, and the decoders. The data is borrowed (read on every lookup, never written).
105
+ */
106
+ export async function resolveImagePlaneScene(value, aspect, assume) {
107
+ const record = value;
108
+ for (const key of Object.keys(record))
109
+ if (!["kind", "sceneId", "image", "paper", "interpolation", "maximumPixels"].includes(key))
110
+ throw new InvalidConfigurationError("Unknown scene field: " + key + ".");
111
+ if (typeof record.sceneId !== "string" || !/^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/.test(record.sceneId))
112
+ throw new InvalidConfigurationError("An image-plane scene needs a public sceneId.");
113
+ const { width, height } = readImagePlaneSize(record);
114
+ const image = record.image;
115
+ for (const key of Object.keys(image))
116
+ if (!["width", "height", "channels", "encoding", "data"].includes(key))
117
+ throw new InvalidConfigurationError("Unknown scene.image field: " + key + ".");
118
+ const maximumPixels = resolveRaisedLimit(record.maximumPixels, FULL_RESOLUTION_DEFAULT_PIXELS, FULL_RESOLUTION_CEILING_PIXELS, "scene.maximumPixels must be an integer from 1 to " + FULL_RESOLUTION_CEILING_PIXELS + ".");
119
+ if (width * height > maximumPixels)
120
+ throw new InvalidConfigurationError("The image has " + width * height + " pixels, above scene.maximumPixels (" + maximumPixels + ").");
121
+ const channelsValue = image.channels, encoding = image.encoding, data = image.data;
122
+ if (channelsValue !== 3 && channelsValue !== 4)
123
+ throw new InvalidConfigurationError("scene.image.channels must be 3 (RGB) or 4 (RGBA).");
124
+ const typeOk = encoding === "srgb-8" ? data instanceof Uint8Array || data instanceof Uint8ClampedArray : encoding === "srgb-16" ? data instanceof Uint16Array :
125
+ encoding === "linear-srgb" ? data instanceof Float32Array : undefined;
126
+ if (typeOk === undefined)
127
+ throw new InvalidConfigurationError("scene.image.encoding must be \"srgb-8\", \"srgb-16\" or \"linear-srgb\".");
128
+ if (!typeOk)
129
+ throw new InvalidConfigurationError("scene.image.data must be a " + (encoding === "srgb-8" ? "Uint8Array or Uint8ClampedArray" : encoding === "srgb-16" ? "Uint16Array" : "Float32Array") + " for " + encoding + ".");
130
+ const channels = channelsValue;
131
+ const samples = data;
132
+ if (samples.length !== width * height * channels)
133
+ throw new InvalidConfigurationError("scene.image.data must hold width × height × channels = " + width * height * channels + " samples.");
134
+ const paperRecord = record.paper;
135
+ if (paperRecord !== undefined && (typeof paperRecord !== "object" || paperRecord === null))
136
+ throw new InvalidConfigurationError("scene.paper must be an object.");
137
+ const paper = (paperRecord ?? {});
138
+ for (const key of Object.keys(paper))
139
+ if (key !== "whiteReflectance" && key !== "blackReflectance")
140
+ throw new InvalidConfigurationError("Unknown scene.paper field: " + key + ".");
141
+ const whiteValue = paper.whiteReflectance ?? IMAGE_PLANE_DEFAULTS.paperWhiteReflectance, blackValue = paper.blackReflectance ?? IMAGE_PLANE_DEFAULTS.paperBlackReflectance;
142
+ if (typeof whiteValue !== "number" || typeof blackValue !== "number" || !(blackValue >= 0 && blackValue < whiteValue && whiteValue <= 1))
143
+ throw new InvalidConfigurationError("scene.paper needs reflectances 0 ≤ blackReflectance < whiteReflectance ≤ 1.");
144
+ const white = whiteValue, black = blackValue;
145
+ const interpolation = record.interpolation ?? IMAGE_PLANE_DEFAULTS.interpolation;
146
+ if (interpolation !== "bilinear" && interpolation !== "nearest")
147
+ throw new InvalidConfigurationError("scene.interpolation must be \"bilinear\" or \"nearest\".");
148
+ if (typeof aspect !== "number" || !(aspect > 0) || !Number.isFinite(aspect))
149
+ throw new InvalidConfigurationError("The print's aspect must be positive.");
150
+ // Linear input: every sample finite; those outside [0, 1] are clipped and counted.
151
+ let clipped = 0;
152
+ if (encoding === "linear-srgb")
153
+ for (let i = 0; i < samples.length; i++) {
154
+ const v = samples[i];
155
+ if (!Number.isFinite(v))
156
+ throw new InvalidConfigurationError("scene.image.data must be finite (sample " + i + ").");
157
+ if (v < 0 || v > 1)
158
+ clipped++;
159
+ }
160
+ const subtle = globalThis.crypto?.subtle;
161
+ if (!subtle)
162
+ throw new InvalidConfigurationError("An image-plane scene needs crypto.subtle (a secure browser context or Node 22+) to digest the image.");
163
+ const view = new Uint8Array(samples.buffer, samples.byteOffset, samples.byteLength);
164
+ const digest = new Uint8Array(await subtle.digest("SHA-256", (samples.buffer instanceof ArrayBuffer ? view : view.slice())));
165
+ const dataSha256 = Array.from(digest, (b) => b.toString(16).padStart(2, "0")).join("");
166
+ // Decoders: a table per integer encoding (the transfer function once per code), the clip for linear samples.
167
+ const scale = encoding === "srgb-8" ? 255 : encoding === "srgb-16" ? 65535 : 1;
168
+ const table = encoding === "linear-srgb" ? null : Float64Array.from({ length: scale + 1 }, (_, code) => decodeSrgb(code / scale));
169
+ const color = table ? (i) => table[samples[i]] : (i) => { const v = samples[i]; return v <= 0 ? 0 : v >= 1 ? 1 : v; };
170
+ const alpha = channels === 3 ? null : encoding === "linear-srgb" ? color : (i) => samples[i] / scale;
171
+ const rgb = new Float64Array(3), span = white - black;
172
+ const cellOf = (v) => (v > LEVELS[3] ? 3 : v > LEVELS[2] ? 2 : v > LEVELS[1] ? 1 : 0);
173
+ const fractions = new Float64Array(3);
174
+ /** One pixel's lattice cell (its base node, returned) and its fractions in the cell (into `out`). */
175
+ function pixelLattice(index, out) {
176
+ const base = index * channels;
177
+ if (alpha) {
178
+ const a = alpha(base + 3);
179
+ for (let c = 0; c < 3; c++)
180
+ rgb[c] = a * color(base + c) + (1 - a);
181
+ }
182
+ else
183
+ for (let c = 0; c < 3; c++)
184
+ rgb[c] = color(base + c);
185
+ const kr = cellOf(rgb[0]), kg = cellOf(rgb[1]), kb = cellOf(rgb[2]);
186
+ out[0] = (rgb[0] - LEVELS[kr]) / (LEVELS[kr + 1] - LEVELS[kr]);
187
+ out[1] = (rgb[1] - LEVELS[kg]) / (LEVELS[kg + 1] - LEVELS[kg]);
188
+ out[2] = (rgb[2] - LEVELS[kb]) / (LEVELS[kb + 1] - LEVELS[kb]);
189
+ return kr * 25 + kg * 5 + kb;
190
+ }
191
+ /** One pixel in node values: the trilinear weights of its linear sRGB in the lattice cell, then the paper. */
192
+ function pixelValue(index, nodeValues, neutral) {
193
+ const n = pixelLattice(index, fractions), fr = fractions[0], fg = fractions[1], fb = fractions[2];
194
+ const lattice = (1 - fr) * ((1 - fg) * ((1 - fb) * nodeValues[n] + fb * nodeValues[n + 1]) + fg * ((1 - fb) * nodeValues[n + 5] + fb * nodeValues[n + 6])) +
195
+ fr * ((1 - fg) * ((1 - fb) * nodeValues[n + 25] + fb * nodeValues[n + 26]) + fg * ((1 - fb) * nodeValues[n + 30] + fb * nodeValues[n + 31]));
196
+ return black * neutral + span * lattice;
197
+ }
198
+ const halfW = width / 2, halfH = height / (2 * aspect);
199
+ /** The print at a print-local point from a per-pixel value: bilinear between pixel centers (clamped to the edge) or the nearest pixel. */
200
+ function interpolate(cu, cv, at) {
201
+ const X = (cu + 1) * halfW, Y = (aspect - cv) * halfH;
202
+ if (interpolation === "nearest")
203
+ return at(Math.min(height - 1, Math.max(0, Math.floor(Y))) * width + Math.min(width - 1, Math.max(0, Math.floor(X))));
204
+ const sx = X - 0.5, sy = Y - 0.5, i0 = Math.floor(sx), j0 = Math.floor(sy), fx = sx - i0, fy = sy - j0;
205
+ const ia = Math.min(width - 1, Math.max(0, i0)), ib = Math.min(width - 1, Math.max(0, i0 + 1));
206
+ const ja = Math.min(height - 1, Math.max(0, j0)) * width, jb = Math.min(height - 1, Math.max(0, j0 + 1)) * width;
207
+ return (1 - fy) * ((1 - fx) * at(ja + ia) + fx * at(ja + ib)) + fy * ((1 - fx) * at(jb + ia) + fx * at(jb + ib));
208
+ }
209
+ const sampleAt = (cu, cv, nodeValues, neutral) => interpolate(cu, cv, (index) => pixelValue(index, nodeValues, neutral));
210
+ // Per wavelength the node reflectances (the facade asks for a few spectral nodes many times).
211
+ const atWavelength = new Map();
212
+ function reflectanceAt(cu, cv, nm) {
213
+ let nodes = atWavelength.get(nm);
214
+ if (!nodes) {
215
+ nodes = nodeReflectancesAt(nm);
216
+ if (atWavelength.size < 4096)
217
+ atWavelength.set(nm, nodes);
218
+ }
219
+ return sampleAt(cu, cv, nodes, 1);
220
+ }
221
+ /**
222
+ * One pixel's channel signals, integrated from its reconstructed spectrum (owner decision 2026-11-09): per spectral node n its
223
+ * reflectance ρ_n (its cell's eight node spectra at λ_n blended with the trilinear weights, then the paper) times the white
224
+ * radiance W_n, then per channel Σ_n A_c(λ_n)·ρ_n·W_n. Written to out[at..at + 2].
225
+ */
226
+ function pixelSignals(index, nodes, out, at) {
227
+ const N = nodes.count, R = nodes.nodeSpectra, W = nodes.whiteRadiance, A0 = nodes.response[0], A1 = nodes.response[1], A2 = nodes.response[2];
228
+ const base = pixelLattice(index, fractions) * N, fr = fractions[0], fg = fractions[1], fb = fractions[2], gb = 1 - fb;
229
+ const a00 = (1 - fr) * (1 - fg), a01 = (1 - fr) * fg, a10 = fr * (1 - fg), a11 = fr * fg;
230
+ const w0 = a00 * gb, w1 = a00 * fb, w5 = a01 * gb, w6 = a01 * fb, w25 = a10 * gb, w26 = a10 * fb, w30 = a11 * gb, w31 = a11 * fb;
231
+ let s0 = 0, s1 = 0, s2 = 0;
232
+ for (let n = 0, k = base; n < N; n++, k++) {
233
+ const lattice = w0 * R[k] + w1 * R[k + N] + w5 * R[k + 5 * N] + w6 * R[k + 6 * N] + w25 * R[k + 25 * N] + w26 * R[k + 26 * N] + w30 * R[k + 30 * N] + w31 * R[k + 31 * N];
234
+ // Each channel's sum in node order (one pass over the spectrum).
235
+ const radiance = (black + span * lattice) * W[n];
236
+ s0 += A0[n] * radiance;
237
+ s1 += A1[n] * radiance;
238
+ s2 += A2[n] * radiance;
239
+ }
240
+ out[at] = s0;
241
+ out[at + 1] = s1;
242
+ out[at + 2] = s2;
243
+ }
244
+ function signalScene(wavelengths, perNode, whiteRadiance, radianceAt, scale, half, surroundReflectance) {
245
+ // The lattice's spectra at the nodes (node k's reflectance at λ_n at k·N + n); no channel response is folded in.
246
+ const N = wavelengths.length, spectraAt = wavelengths.map((nm) => nodeReflectancesAt(nm)), nodeSpectra = new Float64Array(NODES * N);
247
+ for (let k = 0; k < NODES; k++)
248
+ for (let n = 0; n < N; n++)
249
+ nodeSpectra[k * N + n] = spectraAt[n][k];
250
+ const nodes = { count: N, nodeSpectra, whiteRadiance, response: perNode };
251
+ // The surround's channel signals, integrated from its spectrum ρ·W_n like a pixel's (no white-integral shortcut, 2.21.0).
252
+ const surround = [0, 1, 2].map((c) => { let s = 0; for (let n = 0; n < N; n++)
253
+ s += perNode[c][n] * (surroundReflectance * whiteRadiance[n]); return s; });
254
+ // The pixels' signals as the query points reach them: rows of three values per pixel (NaN until computed), the latest rows kept.
255
+ const rows = new Map(), keptRows = Math.max(8, Math.floor(SIGNAL_ROW_CACHE_BYTES / (width * 24)));
256
+ let lastJ = -1, lastRow = new Float64Array(0);
257
+ const rowAt = (j) => {
258
+ if (j === lastJ)
259
+ return lastRow;
260
+ let row = rows.get(j);
261
+ if (!row) {
262
+ row = new Float64Array(width * 3).fill(NaN);
263
+ rows.set(j, row);
264
+ if (rows.size > keptRows)
265
+ rows.delete(rows.keys().next().value);
266
+ }
267
+ lastJ = j;
268
+ lastRow = row;
269
+ return row;
270
+ };
271
+ const signalOf = (row, j, i, c) => {
272
+ if (row[i * 3] !== row[i * 3])
273
+ pixelSignals(j * width + i, nodes, row, i * 3);
274
+ return row[i * 3 + c];
275
+ };
276
+ return { kind: "radiance", radianceAt, signalAt(u, v, c) {
277
+ const cu = u * scale / half, cv = v * scale / half;
278
+ if (!(Math.abs(cu) <= 1 && Math.abs(cv) <= aspect))
279
+ return surround[c];
280
+ // As `interpolate`, reading the pixels' signals.
281
+ const X = (cu + 1) * halfW, Y = (aspect - cv) * halfH;
282
+ if (interpolation === "nearest") {
283
+ const j = Math.min(height - 1, Math.max(0, Math.floor(Y)));
284
+ return signalOf(rowAt(j), j, Math.min(width - 1, Math.max(0, Math.floor(X))), c);
285
+ }
286
+ const sx = X - 0.5, sy = Y - 0.5, i0 = Math.floor(sx), j0 = Math.floor(sy), fx = sx - i0, fy = sy - j0;
287
+ const ia = Math.min(width - 1, Math.max(0, i0)), ib = Math.min(width - 1, Math.max(0, i0 + 1)), ja = Math.min(height - 1, Math.max(0, j0)), jb = Math.min(height - 1, Math.max(0, j0 + 1));
288
+ const rowA = rowAt(ja), a0 = signalOf(rowA, ja, ia, c), a1 = signalOf(rowA, ja, ib, c), rowB = rowAt(jb);
289
+ return (1 - fy) * ((1 - fx) * a0 + fx * a1) + fy * ((1 - fx) * signalOf(rowB, jb, ia, c) + fx * signalOf(rowB, jb, ib, c));
290
+ }, image: { scene: resolved, nodes, surround, whiteRadiance, surroundReflectance } };
291
+ }
292
+ const resolved = Object.freeze({ kind: "image-plane", sceneId: record.sceneId, width, height, aspect, channels, encoding: encoding,
293
+ interpolation, paperWhiteReflectance: white, paperBlackReflectance: black, maximumPixels, clippedSampleCount: clipped, dataSha256,
294
+ reflectanceAt, sampleAt, pixelValue, pixelSignals, pixelLattice, nodeReflectances: nodeReflectancesAt, signalScene, get digestForm() { return imagePlaneDigestForm(resolved); }, parameters: Object.freeze({ width, height, channels, encoding, interpolation, paperWhiteReflectance: white, paperBlackReflectance: black,
295
+ clippedSampleCount: clipped, imageSha256: dataSha256 }) });
296
+ if (assume)
297
+ for (const [id, kind, v, explanation] of imagePlaneAssumptions(resolved, record))
298
+ assume(id, kind, v, explanation);
299
+ return resolved;
300
+ }
301
+ /** The scene's form in the facade's source digest: the image's SHA-256 and shape, the paper, the interpolation and the lattice version. */
302
+ export function imagePlaneDigestForm(scene) {
303
+ return { kind: scene.kind, sceneId: scene.sceneId, image: { width: scene.width, height: scene.height, channels: scene.channels, encoding: scene.encoding, sha256: scene.dataSha256 },
304
+ paper: { whiteReflectance: scene.paperWhiteReflectance, blackReflectance: scene.paperBlackReflectance }, interpolation: scene.interpolation, latticeVersion: IMAGE_PLANE_LATTICE_VERSION };
305
+ }
306
+ /** The assumptions an image-plane capture records: the model, the defaults taken, and the clipped linear samples. */
307
+ export function imagePlaneAssumptions(scene, record) {
308
+ const out = [];
309
+ const paper = (record.paper ?? {});
310
+ if (paper.whiteReflectance === undefined)
311
+ out.push(["scene.paper.whiteReflectance", "default", scene.paperWhiteReflectance,
312
+ "Photivra's assumption, not a measurement: the paper reflects 90 % (the white of the engine's Studio Gray 1 patch), so sRGB white prints as a 0.90 flat reflectance."]);
313
+ if (paper.blackReflectance === undefined)
314
+ out.push(["scene.paper.blackReflectance", "default", scene.paperBlackReflectance,
315
+ "Photivra's assumption, not a measurement: the deepest ink reflects 1 % (an optical density of 2.0), so sRGB black prints as a 0.01 flat reflectance."]);
316
+ if (record.interpolation === undefined)
317
+ out.push(["scene.interpolation", "default", scene.interpolation,
318
+ "Bilinear between pixel centers: the four nearest pixels' reflectance spectra, bilinearly weighted (under CIE D65, the bilinear interpolation of their linear sRGB); the edge pixels extend to the print's edges."]);
319
+ out.push(["scene.imagePlane", "model", { latticeVersion: IMAGE_PLANE_LATTICE_VERSION, nodesPerAxis: AXIS, method: "lhtss-burns-2020", wavelengthStepNanometers: STEP_NM,
320
+ width: scene.width, height: scene.height, encoding: scene.encoding, channels: scene.channels },
321
+ "An approximation: a print of the image, which was already processed, clipped and blurred by the camera that took it. Each pixel is decoded to linear sRGB " +
322
+ (scene.encoding === "linear-srgb" ? "(given linear, clipped to [0, 1])" : "with the sRGB transfer function (IEC 61966-2-1)") + (scene.channels === 4 ? ", composited over the paper by its alpha," : "") +
323
+ " and becomes a reflectance spectrum by trilinear interpolation in a 5 × 5 × 5 lattice of smooth spectra (Burns' LHTSS method, arXiv:1710.05732 v5, fitted by Photivra against CIE D65 and the " +
324
+ "CIE 1931 2° observer), which reproduces the pixel's sRGB under D65 within CIEDE2000 6.4e-4 and stays in [0, 1]; then ρ = black + (white − black)·ρ. Under other lights its colors are one plausible " +
325
+ "metamer of many (docs/IMAGE_PLANE.md, measured spread). A flat matte Lambertian print: no gloss, paper texture, halftone, curl or fluorescence."]);
326
+ out.push(["scene.digest", "model", "image-data-hashed", "The source digest covers the image's SHA-256, size, channels and encoding, the paper, the interpolation, the lattice version and the framing."]);
327
+ if (scene.clippedSampleCount > 0)
328
+ out.push(["scene.image.clippedSamples", "derived", scene.clippedSampleCount,
329
+ "Linear samples outside [0, 1] clipped to the print's range (a print cannot be brighter than its paper or darker than its deepest ink)."]);
330
+ return out;
331
+ }
332
+ /** The GPU display view's image-plane module, loaded on demand by the GPU renderer (its own chunk). */
333
+ export function loadGpuModule() {
334
+ return import("../gpu/display-view-image-material-module.js");
335
+ }
336
+ /**
337
+ * The print's placement: `chartSize` with its height defaulting to the image's aspect, or, without it, the print fitted inside
338
+ * the frame (centered, filling its width or height) on the default surround; records the defaults it takes.
339
+ */
340
+ export function imagePlanePrint(scene, chartSize, framedWidthM, frameAspect, assume) {
341
+ const size = readImagePlaneSize(scene), imageAspect = size.height / size.width;
342
+ if (chartSize !== undefined) {
343
+ const resolved = resolveChartSizeOption(chartSize, imageAspect);
344
+ if (resolved.defaulted.includes("heightM"))
345
+ assume("chartSize.heightM", "default", resolved.heightM, "The print has the image's shape: height = width × image height / image width.");
346
+ return { ...resolved, defaulted: resolved.defaulted.filter((key) => key !== "heightM") };
347
+ }
348
+ const widthM = imageAspect > frameAspect ? framedWidthM * frameAspect / imageAspect : framedWidthM;
349
+ const fitted = { widthM, heightM: widthM * imageAspect, surroundReflectance: CHART_SIZE_DEFAULT_SURROUND_REFLECTANCE, defaulted: [] };
350
+ assume("chartSize", "default", { widthM: fitted.widthM, heightM: fitted.heightM, surroundReflectance: fitted.surroundReflectance }, "The print has the image's shape and is fitted inside the frame, centered (it fills the frame's width or height), on an 18 % neutral gray surround.");
351
+ return fitted;
352
+ }
353
+ //# sourceMappingURL=image-plane.js.map