@meimu/mutracer 0.2.0 → 0.3.1

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 (372) hide show
  1. package/CHANGELOG.md +222 -0
  2. package/LICENSES/FidelityFX-FSR.txt +19 -0
  3. package/LICENSES/pbrt-v4-Apache-2.0.txt +202 -0
  4. package/README.md +3 -0
  5. package/THIRD_PARTY_NOTICES.md +18 -4
  6. package/dist/assets/bvh.worker.js +1 -1
  7. package/dist/mutracer.umd.js +9328 -7614
  8. package/docs/api.md +83 -35
  9. package/docs/caustics.md +80 -0
  10. package/docs/materials.md +9 -6
  11. package/docs/performance.md +7 -0
  12. package/docs/post-processing.md +62 -9
  13. package/docs/progressive-rendering.md +53 -9
  14. package/docs/sampling.md +4 -0
  15. package/docs/technical/acceleration.md +52 -0
  16. package/docs/technical/aovs.md +79 -0
  17. package/docs/technical/caustics.md +109 -0
  18. package/docs/technical/continuous-spectrum.md +122 -0
  19. package/docs/technical/display-upscale.md +82 -0
  20. package/docs/technical/openpbr.md +99 -0
  21. package/docs/technical/pbrt-import.md +168 -0
  22. package/docs/technical/tiling.md +74 -0
  23. package/docs/technical/webgl.md +53 -0
  24. package/docs/updates.md +3 -1
  25. package/docs/viewer-checklist.md +65 -0
  26. package/docs/viewer.md +18 -6
  27. package/lib/Display.d.ts +19 -5
  28. package/lib/Display.js +10 -7
  29. package/lib/Display.js.map +1 -1
  30. package/lib/Engine.d.ts +4 -1
  31. package/lib/Engine.js +77 -14
  32. package/lib/Engine.js.map +1 -1
  33. package/lib/Render.d.ts +81 -24
  34. package/lib/Render.js +201 -26
  35. package/lib/Render.js.map +1 -1
  36. package/lib/RenderLoop.d.ts +7 -3
  37. package/lib/RenderLoop.js +68 -44
  38. package/lib/RenderLoop.js.map +1 -1
  39. package/lib/main.d.ts +4 -2
  40. package/lib/main.js +1 -0
  41. package/lib/main.js.map +1 -1
  42. package/lib/oidn.d.ts +1 -1
  43. package/lib/renderer/AovPrimitiveCache.js +39 -8
  44. package/lib/renderer/AovPrimitiveCache.js.map +1 -1
  45. package/lib/renderer/DisplayPostProcess.d.ts +8 -3
  46. package/lib/renderer/DisplayPostProcess.js +51 -18
  47. package/lib/renderer/DisplayPostProcess.js.map +1 -1
  48. package/lib/renderer/GPUTraceQueue.d.ts +2 -1
  49. package/lib/renderer/GPUTraceQueue.js +3 -1
  50. package/lib/renderer/GPUTraceQueue.js.map +1 -1
  51. package/lib/renderer/MaterialData.js +7 -2
  52. package/lib/renderer/MaterialData.js.map +1 -1
  53. package/lib/renderer/RenderingPipeline.d.ts +11 -1
  54. package/lib/renderer/RenderingPipeline.js.map +1 -1
  55. package/lib/renderer/TileRender.d.ts +2 -2
  56. package/lib/renderer/TileRender.js +128 -7
  57. package/lib/renderer/TileRender.js.map +1 -1
  58. package/lib/renderer/WGPUAov.d.ts +6 -1
  59. package/lib/renderer/WGPUAov.js +108 -14
  60. package/lib/renderer/WGPUAov.js.map +1 -1
  61. package/lib/renderer/WGPUCanvasSurface.js +12 -1
  62. package/lib/renderer/WGPUCanvasSurface.js.map +1 -1
  63. package/lib/renderer/WGPUCausticLightPass.d.ts +48 -0
  64. package/lib/renderer/WGPUCausticLightPass.js +217 -0
  65. package/lib/renderer/WGPUCausticLightPass.js.map +1 -0
  66. package/lib/renderer/WGPUEnvMapDistribution.js +19 -19
  67. package/lib/renderer/WGPUFullQuadPass.js +3 -3
  68. package/lib/renderer/WGPUPhotonMap.d.ts +37 -0
  69. package/lib/renderer/WGPUPhotonMap.js +191 -0
  70. package/lib/renderer/WGPUPhotonMap.js.map +1 -0
  71. package/lib/renderer/WGPURayTraceOutput.d.ts +13 -1
  72. package/lib/renderer/WGPURayTraceOutput.js +122 -28
  73. package/lib/renderer/WGPURayTraceOutput.js.map +1 -1
  74. package/lib/renderer/WGPURayTracePass.d.ts +65 -21
  75. package/lib/renderer/WGPURayTracePass.js +730 -409
  76. package/lib/renderer/WGPURayTracePass.js.map +1 -1
  77. package/lib/renderer/WGPURenderingPipeline.js +110 -68
  78. package/lib/renderer/WGPURenderingPipeline.js.map +1 -1
  79. package/lib/renderer/WebGLAov.js +3 -3
  80. package/lib/renderer/WebGLAov.js.map +1 -1
  81. package/lib/renderer/WebGLFullQuadPass.d.ts +2 -1
  82. package/lib/renderer/WebGLFullQuadPass.js +10 -0
  83. package/lib/renderer/WebGLFullQuadPass.js.map +1 -1
  84. package/lib/renderer/WebGLJNLMDenoiser.js +66 -66
  85. package/lib/renderer/WebGLJNLMDenoiser.js.map +1 -1
  86. package/lib/renderer/WebGLRayTraceOutputPass.js +4 -4
  87. package/lib/renderer/WebGLRayTracePass.d.ts +20 -11
  88. package/lib/renderer/WebGLRayTracePass.js +157 -116
  89. package/lib/renderer/WebGLRayTracePass.js.map +1 -1
  90. package/lib/renderer/WebGLRenderingPipeline.js +17 -14
  91. package/lib/renderer/WebGLRenderingPipeline.js.map +1 -1
  92. package/lib/renderer/WebGLSkyBaker.js +60 -60
  93. package/lib/renderer/accumulationTarget.d.ts +2 -1
  94. package/lib/renderer/accumulationTarget.js.map +1 -1
  95. package/lib/renderer/aov.d.ts +13 -1
  96. package/lib/renderer/aov.js +21 -2
  97. package/lib/renderer/aov.js.map +1 -1
  98. package/lib/renderer/aovDisplay.js +2 -2
  99. package/lib/renderer/aovDisplay.js.map +1 -1
  100. package/lib/renderer/binnedSahBvh.d.ts +2 -1
  101. package/lib/renderer/binnedSahBvh.js +24 -17
  102. package/lib/renderer/binnedSahBvh.js.map +1 -1
  103. package/lib/renderer/bvhAccel.d.ts +3 -1
  104. package/lib/renderer/bvhAccel.js +36 -6
  105. package/lib/renderer/bvhAccel.js.map +1 -1
  106. package/lib/renderer/cameraUniform.d.ts +1 -1
  107. package/lib/renderer/cameraUniform.js +6 -2
  108. package/lib/renderer/cameraUniform.js.map +1 -1
  109. package/lib/renderer/causticDiagnostics.d.ts +31 -0
  110. package/lib/renderer/causticDiagnostics.js +5 -0
  111. package/lib/renderer/causticDiagnostics.js.map +1 -0
  112. package/lib/renderer/causticEmission.d.ts +10 -0
  113. package/lib/renderer/causticEmission.js +40 -0
  114. package/lib/renderer/causticEmission.js.map +1 -0
  115. package/lib/renderer/causticUniform.d.ts +12 -0
  116. package/lib/renderer/causticUniform.js +22 -0
  117. package/lib/renderer/causticUniform.js.map +1 -0
  118. package/lib/renderer/caustics.d.ts +16 -0
  119. package/lib/renderer/caustics.js +93 -0
  120. package/lib/renderer/caustics.js.map +1 -0
  121. package/lib/renderer/compactVertices.d.ts +14 -0
  122. package/lib/renderer/compactVertices.js +124 -0
  123. package/lib/renderer/compactVertices.js.map +1 -0
  124. package/lib/renderer/easu.d.ts +11 -0
  125. package/lib/renderer/easu.js +156 -0
  126. package/lib/renderer/easu.js.map +1 -0
  127. package/lib/renderer/geometryUpdateState.d.ts +1 -0
  128. package/lib/renderer/geometryUpdateState.js.map +1 -1
  129. package/lib/renderer/geometryUpdates.js +3 -2
  130. package/lib/renderer/geometryUpdates.js.map +1 -1
  131. package/lib/renderer/glsl/aovDisplay.frag.js +5 -5
  132. package/lib/renderer/glsl/aovReflectance.glsl.js +53 -53
  133. package/lib/renderer/glsl/aovReflectanceSamples.glsl.js +1 -1
  134. package/lib/renderer/glsl/aovTrace.frag.js +45 -37
  135. package/lib/renderer/glsl/aovTrace.frag.js.map +1 -1
  136. package/lib/renderer/glsl/chunks/cameraProjection.glsl.d.ts +2 -0
  137. package/lib/renderer/glsl/chunks/cameraProjection.glsl.js +16 -0
  138. package/lib/renderer/glsl/chunks/cameraProjection.glsl.js.map +1 -0
  139. package/lib/renderer/glsl/chunks/cameraRay.glsl.d.ts +1 -1
  140. package/lib/renderer/glsl/chunks/cameraRay.glsl.js +9 -16
  141. package/lib/renderer/glsl/chunks/cameraRay.glsl.js.map +1 -1
  142. package/lib/renderer/glsl/chunks/emissiveLight.glsl.d.ts +2 -0
  143. package/lib/renderer/glsl/chunks/emissiveLight.glsl.js +35 -0
  144. package/lib/renderer/glsl/chunks/emissiveLight.glsl.js.map +1 -0
  145. package/lib/renderer/glsl/chunks/envMap.glsl.js +73 -73
  146. package/lib/renderer/glsl/chunks/intersect.glsl.js +478 -465
  147. package/lib/renderer/glsl/chunks/intersect.glsl.js.map +1 -1
  148. package/lib/renderer/glsl/chunks/materialBuffer.glsl.d.ts +1 -0
  149. package/lib/renderer/glsl/chunks/materialBuffer.glsl.js +156 -153
  150. package/lib/renderer/glsl/chunks/materialBuffer.glsl.js.map +1 -1
  151. package/lib/renderer/glsl/chunks/openPbrBsdf.glsl.js +771 -771
  152. package/lib/renderer/glsl/chunks/rand.glsl.js +3 -3
  153. package/lib/renderer/glsl/chunks/random.glsl.js +6 -6
  154. package/lib/renderer/glsl/chunks/rayTraceCore.glsl.d.ts +1 -0
  155. package/lib/renderer/glsl/chunks/rayTraceCore.glsl.js +70 -63
  156. package/lib/renderer/glsl/chunks/rayTraceCore.glsl.js.map +1 -1
  157. package/lib/renderer/glsl/chunks/sampleLight.glsl.js +89 -75
  158. package/lib/renderer/glsl/chunks/sampleLight.glsl.js.map +1 -1
  159. package/lib/renderer/glsl/chunks/sampleMaterial.glsl.d.ts +1 -0
  160. package/lib/renderer/glsl/chunks/sampleMaterial.glsl.js +160 -118
  161. package/lib/renderer/glsl/chunks/sampleMaterial.glsl.js.map +1 -1
  162. package/lib/renderer/glsl/chunks/sampleShadowCatcher.glsl.js +14 -14
  163. package/lib/renderer/glsl/chunks/sampling.glsl.js +88 -91
  164. package/lib/renderer/glsl/chunks/sampling.glsl.js.map +1 -1
  165. package/lib/renderer/glsl/chunks/sobol.glsl.js +79 -79
  166. package/lib/renderer/glsl/chunks/spectralPrefix.glsl.d.ts +6 -0
  167. package/lib/renderer/glsl/chunks/spectralPrefix.glsl.js +47 -0
  168. package/lib/renderer/glsl/chunks/spectralPrefix.glsl.js.map +1 -0
  169. package/lib/renderer/glsl/chunks/textureLinear.glsl.js +5 -5
  170. package/lib/renderer/glsl/chunks/uvProjection.glsl.js +11 -11
  171. package/lib/renderer/glsl/depthQuery.frag.js +13 -7
  172. package/lib/renderer/glsl/depthQuery.frag.js.map +1 -1
  173. package/lib/renderer/glsl/normalizeRayTraceOutput.frag.js +10 -10
  174. package/lib/renderer/glsl/rayTrace.frag.d.ts +1 -1
  175. package/lib/renderer/glsl/rayTrace.frag.js +338 -252
  176. package/lib/renderer/glsl/rayTrace.frag.js.map +1 -1
  177. package/lib/renderer/glsl/shadowCatcher.frag.js +27 -26
  178. package/lib/renderer/glsl/shadowCatcher.frag.js.map +1 -1
  179. package/lib/renderer/glsl/webglPipeline.frag.js +59 -59
  180. package/lib/renderer/gpuMemory.js +1 -1
  181. package/lib/renderer/gpuMemory.js.map +1 -1
  182. package/lib/renderer/lightSampling.d.ts +3 -2
  183. package/lib/renderer/lightSampling.js +14 -8
  184. package/lib/renderer/lightSampling.js.map +1 -1
  185. package/lib/renderer/openPbrEnergyLut.d.ts +2 -1
  186. package/lib/renderer/openPbrEnergyLut.js +18 -1
  187. package/lib/renderer/openPbrEnergyLut.js.map +1 -1
  188. package/lib/renderer/pathLimits.d.ts +5 -4
  189. package/lib/renderer/pathLimits.js +6 -5
  190. package/lib/renderer/pathLimits.js.map +1 -1
  191. package/lib/renderer/prepareMeshBVH.d.ts +2 -0
  192. package/lib/renderer/prepareMeshBVH.js +5 -3
  193. package/lib/renderer/prepareMeshBVH.js.map +1 -1
  194. package/lib/renderer/progressiveScheduler.js +5 -4
  195. package/lib/renderer/progressiveScheduler.js.map +1 -1
  196. package/lib/renderer/renderPipeline.d.ts +5 -0
  197. package/lib/renderer/renderPipeline.js +1 -0
  198. package/lib/renderer/renderPipeline.js.map +1 -1
  199. package/lib/renderer/researchTransport.d.ts +31 -0
  200. package/lib/renderer/researchTransport.js +5 -0
  201. package/lib/renderer/researchTransport.js.map +1 -0
  202. package/lib/renderer/sceneAssembly.d.ts +1 -1
  203. package/lib/renderer/sceneAssembly.js +4 -3
  204. package/lib/renderer/sceneAssembly.js.map +1 -1
  205. package/lib/renderer/sceneChangeDetector.d.ts +1 -1
  206. package/lib/renderer/sceneChangeDetector.js +3 -1
  207. package/lib/renderer/sceneChangeDetector.js.map +1 -1
  208. package/lib/renderer/sceneLayoutSchema.d.ts +2 -0
  209. package/lib/renderer/sceneLayoutSchema.js +3 -3
  210. package/lib/renderer/sceneLayoutSchema.js.map +1 -1
  211. package/lib/renderer/scenePreparation.d.ts +3 -2
  212. package/lib/renderer/scenePreparation.js +18 -2
  213. package/lib/renderer/scenePreparation.js.map +1 -1
  214. package/lib/renderer/scratchSampling.js +6 -6
  215. package/lib/renderer/spectrum.d.ts +21 -0
  216. package/lib/renderer/spectrum.js +154 -0
  217. package/lib/renderer/spectrum.js.map +1 -0
  218. package/lib/renderer/staticBvhPreparation.d.ts +9 -0
  219. package/lib/renderer/staticBvhPreparation.js +8 -2
  220. package/lib/renderer/staticBvhPreparation.js.map +1 -1
  221. package/lib/renderer/surfaceHit.d.ts +10 -0
  222. package/lib/renderer/surfaceHit.js +22 -0
  223. package/lib/renderer/surfaceHit.js.map +1 -0
  224. package/lib/renderer/tangentRequirements.d.ts +2 -0
  225. package/lib/renderer/tangentRequirements.js +7 -0
  226. package/lib/renderer/tangentRequirements.js.map +1 -0
  227. package/lib/renderer/textureAtlas.d.ts +4 -0
  228. package/lib/renderer/textureAtlas.js +48 -2
  229. package/lib/renderer/textureAtlas.js.map +1 -1
  230. package/lib/renderer/webgl.js +4 -0
  231. package/lib/renderer/webgl.js.map +1 -1
  232. package/lib/renderer/webglLightSampling.d.ts +39 -0
  233. package/lib/renderer/webglLightSampling.js +15 -0
  234. package/lib/renderer/webglLightSampling.js.map +1 -0
  235. package/lib/renderer/webglVertexAttributes.d.ts +17 -0
  236. package/lib/renderer/webglVertexAttributes.js +44 -0
  237. package/lib/renderer/webglVertexAttributes.js.map +1 -0
  238. package/lib/renderer/wgpuBindlessSource.js +3 -3
  239. package/lib/renderer/wgpuMaterialConstants.js +4 -3
  240. package/lib/renderer/wgpuMaterialConstants.js.map +1 -1
  241. package/lib/renderer/wgpuSceneUniform.js +2 -2
  242. package/lib/renderer/wgpuSceneUniform.js.map +1 -1
  243. package/lib/renderer/wgpuShaderSource.d.ts +22 -0
  244. package/lib/renderer/wgpuShaderSource.js +3 -1
  245. package/lib/renderer/wgpuShaderSource.js.map +1 -1
  246. package/lib/renderer/wgsl/aovCompact.wgsl.d.ts +4 -0
  247. package/lib/renderer/wgsl/aovCompact.wgsl.js +26 -0
  248. package/lib/renderer/wgsl/aovCompact.wgsl.js.map +1 -0
  249. package/lib/renderer/wgsl/aovDisplay.wgsl.js +9 -9
  250. package/lib/renderer/wgsl/aovReflectance.wgsl.js +55 -55
  251. package/lib/renderer/wgsl/aovReflectanceSamples.wgsl.js +1 -1
  252. package/lib/renderer/wgsl/aovResolve.wgsl.d.ts +4 -0
  253. package/lib/renderer/wgsl/aovResolve.wgsl.js +21 -2
  254. package/lib/renderer/wgsl/aovResolve.wgsl.js.map +1 -1
  255. package/lib/renderer/wgsl/aovSnapshot.wgsl.js +2 -2
  256. package/lib/renderer/wgsl/aovSnapshot.wgsl.js.map +1 -1
  257. package/lib/renderer/wgsl/aovTrace.wgsl.js +33 -33
  258. package/lib/renderer/wgsl/aovTraceDisplay.wgsl.d.ts +2 -0
  259. package/lib/renderer/wgsl/aovTraceDisplay.wgsl.js +56 -0
  260. package/lib/renderer/wgsl/aovTraceDisplay.wgsl.js.map +1 -0
  261. package/lib/renderer/wgsl/bloom.wgsl.js +18 -18
  262. package/lib/renderer/wgsl/causticLight.compute.d.ts +6 -0
  263. package/lib/renderer/wgsl/causticLight.compute.js +539 -0
  264. package/lib/renderer/wgsl/causticLight.compute.js.map +1 -0
  265. package/lib/renderer/wgsl/chunks/background.wgsl.d.ts +2 -0
  266. package/lib/renderer/wgsl/chunks/background.wgsl.js +102 -0
  267. package/lib/renderer/wgsl/chunks/background.wgsl.js.map +1 -0
  268. package/lib/renderer/wgsl/chunks/causticAdjoint.wgsl.d.ts +2 -0
  269. package/lib/renderer/wgsl/chunks/causticAdjoint.wgsl.js +12 -0
  270. package/lib/renderer/wgsl/chunks/causticAdjoint.wgsl.js.map +1 -0
  271. package/lib/renderer/wgsl/chunks/causticAtomic.wgsl.d.ts +2 -0
  272. package/lib/renderer/wgsl/chunks/causticAtomic.wgsl.js +16 -0
  273. package/lib/renderer/wgsl/chunks/causticAtomic.wgsl.js.map +1 -0
  274. package/lib/renderer/wgsl/chunks/caustics.wgsl.d.ts +1 -0
  275. package/lib/renderer/wgsl/chunks/caustics.wgsl.js +62 -0
  276. package/lib/renderer/wgsl/chunks/caustics.wgsl.js.map +1 -0
  277. package/lib/renderer/wgsl/chunks/common.wgsl.js +4 -4
  278. package/lib/renderer/wgsl/chunks/envMap.wgsl.js +37 -37
  279. package/lib/renderer/wgsl/chunks/intersect.wgsl.d.ts +6 -2
  280. package/lib/renderer/wgsl/chunks/intersect.wgsl.js +634 -620
  281. package/lib/renderer/wgsl/chunks/intersect.wgsl.js.map +1 -1
  282. package/lib/renderer/wgsl/chunks/intersectionAlpha.wgsl.d.ts +1 -1
  283. package/lib/renderer/wgsl/chunks/intersectionAlpha.wgsl.js +23 -21
  284. package/lib/renderer/wgsl/chunks/intersectionAlpha.wgsl.js.map +1 -1
  285. package/lib/renderer/wgsl/chunks/materialBuffer.wgsl.d.ts +3 -1
  286. package/lib/renderer/wgsl/chunks/materialBuffer.wgsl.js +77 -74
  287. package/lib/renderer/wgsl/chunks/materialBuffer.wgsl.js.map +1 -1
  288. package/lib/renderer/wgsl/chunks/openPbrBsdf.wgsl.js +795 -795
  289. package/lib/renderer/wgsl/chunks/pdm_displacement.wgsl.js +139 -139
  290. package/lib/renderer/wgsl/chunks/rand.wgsl.js +3 -3
  291. package/lib/renderer/wgsl/chunks/rayTraceCore.wgsl.d.ts +5 -1
  292. package/lib/renderer/wgsl/chunks/rayTraceCore.wgsl.js +45 -29
  293. package/lib/renderer/wgsl/chunks/rayTraceCore.wgsl.js.map +1 -1
  294. package/lib/renderer/wgsl/chunks/sampleLight.wgsl.d.ts +1 -1
  295. package/lib/renderer/wgsl/chunks/sampleLight.wgsl.js +142 -138
  296. package/lib/renderer/wgsl/chunks/sampleLight.wgsl.js.map +1 -1
  297. package/lib/renderer/wgsl/chunks/sampleMaterial.wgsl.d.ts +1 -1
  298. package/lib/renderer/wgsl/chunks/sampleMaterial.wgsl.js +228 -189
  299. package/lib/renderer/wgsl/chunks/sampleMaterial.wgsl.js.map +1 -1
  300. package/lib/renderer/wgsl/chunks/sampleShadowCatcher.wgsl.d.ts +1 -1
  301. package/lib/renderer/wgsl/chunks/sampleShadowCatcher.wgsl.js +11 -11
  302. package/lib/renderer/wgsl/chunks/sampleShadowCatcher.wgsl.js.map +1 -1
  303. package/lib/renderer/wgsl/chunks/sampling.wgsl.d.ts +1 -1
  304. package/lib/renderer/wgsl/chunks/sampling.wgsl.js +88 -92
  305. package/lib/renderer/wgsl/chunks/sampling.wgsl.js.map +1 -1
  306. package/lib/renderer/wgsl/chunks/sobol.wgsl.js +83 -83
  307. package/lib/renderer/wgsl/chunks/spectralPrefix.wgsl.d.ts +6 -0
  308. package/lib/renderer/wgsl/chunks/spectralPrefix.wgsl.js +66 -0
  309. package/lib/renderer/wgsl/chunks/spectralPrefix.wgsl.js.map +1 -0
  310. package/lib/renderer/wgsl/chunks/uvProjection.wgsl.js +11 -11
  311. package/lib/renderer/wgsl/chunks/vertexAttributes.wgsl.d.ts +2 -0
  312. package/lib/renderer/wgsl/chunks/vertexAttributes.wgsl.js +61 -0
  313. package/lib/renderer/wgsl/chunks/vertexAttributes.wgsl.js.map +1 -0
  314. package/lib/renderer/wgsl/compose.frag.wgsl.d.ts +2 -0
  315. package/lib/renderer/wgsl/compose.frag.wgsl.js +100 -98
  316. package/lib/renderer/wgsl/compose.frag.wgsl.js.map +1 -1
  317. package/lib/renderer/wgsl/customDenoise.wgsl.js +10 -10
  318. package/lib/renderer/wgsl/depthQuery.wgsl.d.ts +1 -1
  319. package/lib/renderer/wgsl/depthQuery.wgsl.js +12 -3
  320. package/lib/renderer/wgsl/depthQuery.wgsl.js.map +1 -1
  321. package/lib/renderer/wgsl/easu.wgsl.d.ts +2 -0
  322. package/lib/renderer/wgsl/easu.wgsl.js +80 -0
  323. package/lib/renderer/wgsl/easu.wgsl.js.map +1 -0
  324. package/lib/renderer/wgsl/easuDetail.wgsl.d.ts +21 -0
  325. package/lib/renderer/wgsl/easuDetail.wgsl.js +230 -0
  326. package/lib/renderer/wgsl/easuDetail.wgsl.js.map +1 -0
  327. package/lib/renderer/wgsl/jnlm.compute.js +74 -74
  328. package/lib/renderer/wgsl/jnlm.compute.js.map +1 -1
  329. package/lib/renderer/wgsl/offlineAdaptive.compute.js +26 -26
  330. package/lib/renderer/wgsl/oidnAuxiliary.wgsl.js +3 -3
  331. package/lib/renderer/wgsl/photonMap.compute.d.ts +29 -0
  332. package/lib/renderer/wgsl/photonMap.compute.js +352 -0
  333. package/lib/renderer/wgsl/photonMap.compute.js.map +1 -0
  334. package/lib/renderer/wgsl/proceduralSky.compute.js +64 -64
  335. package/lib/renderer/wgsl/rayTrace.compute.d.ts +23 -1
  336. package/lib/renderer/wgsl/rayTrace.compute.js +531 -543
  337. package/lib/renderer/wgsl/rayTrace.compute.js.map +1 -1
  338. package/lib/scene/MaterialState.d.ts +2 -2
  339. package/lib/scene/MaterialState.js +2 -2
  340. package/lib/scene/MaterialState.js.map +1 -1
  341. package/lib/scene/Scene.js.map +1 -1
  342. package/lib/settings/render.d.ts +22 -0
  343. package/lib/settings/render.js +2 -0
  344. package/lib/settings/render.js.map +1 -1
  345. package/lib/util/fromTHREE.js +23 -16
  346. package/lib/util/fromTHREE.js.map +1 -1
  347. package/lib/version.d.ts +1 -1
  348. package/lib/version.js +1 -1
  349. package/lib/version.js.map +1 -1
  350. package/llms.txt +2 -1
  351. package/package.json +7 -4
  352. package/lib/oidnBundledWeights.cdn.d.ts +0 -2
  353. package/lib/oidnBundledWeights.cdn.js +0 -5
  354. package/lib/oidnBundledWeights.cdn.js.map +0 -1
  355. package/lib/renderer/bvh.worker.d.ts +0 -1
  356. package/lib/renderer/bvh.worker.js +0 -16
  357. package/lib/renderer/bvh.worker.js.map +0 -1
  358. package/lib/renderer/bvhWorkerBuild.d.ts +0 -13
  359. package/lib/renderer/bvhWorkerBuild.js +0 -17
  360. package/lib/renderer/bvhWorkerBuild.js.map +0 -1
  361. package/lib/renderer/lightCore.d.ts +0 -12
  362. package/lib/renderer/lightCore.js +0 -13
  363. package/lib/renderer/lightCore.js.map +0 -1
  364. package/lib/renderer/materialCore.d.ts +0 -8
  365. package/lib/renderer/materialCore.js +0 -9
  366. package/lib/renderer/materialCore.js.map +0 -1
  367. package/lib/scene/PixelTexture.d.ts +0 -6
  368. package/lib/scene/PixelTexture.js +0 -10
  369. package/lib/scene/PixelTexture.js.map +0 -1
  370. package/lib/util/studioLighting.d.ts +0 -18
  371. package/lib/util/studioLighting.js +0 -36
  372. package/lib/util/studioLighting.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,222 @@
1
+ # Changelog
2
+
3
+ All notable changes to MuTracer will be documented here.
4
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
+
6
+ ## 0.3.1 - 2026-11-05
7
+
8
+ Display upscaling with texture detail recovery, faster tiled rendering and faster dispersion.
9
+
10
+ ### Added
11
+
12
+ - `createEasuPass()` is an edge-adaptive display upscale pass. With `albedoDetail: true` it restores surface texture detail from display-resolution color and depth AOVs, so beauty can render at a reduced `resolutionScale`. See [post-processing](docs/post-processing.md).
13
+ - `display.addPostProcess(pass, {outputSize})` lets a pass output a different size than its input, for example the canvas size. `PostProcessOptions` is exported.
14
+ - The `aovResolution: 'display'` render option traces AOVs at canvas size on WebGPU, capped at 4 samples, while beauty keeps the render resolution. WebGL 2 falls back to render resolution and warns once. See [surface outputs](docs/api.md#surface-outputs).
15
+ - `diffuseColor` and `specularColor` AOVs output resolved material colors without BSDF integration, on both backends.
16
+ - `render.getAovTexture('diffuseColor' | 'specularColor' | 'depth')` borrows raw AOV textures on WebGPU.
17
+
18
+ ### Changed
19
+
20
+ - Missing tangents are generated only for materials that use anisotropy or a coat normal map. Base normal maps use triangle UV derivatives.
21
+ - WebGPU stores vertex normals and tangents in compact form, and vertex colors in [0, 1] with at most 1/510 error per channel. Positions, UVs, HDR or negative vertex colors and displaced normals keep full precision. See [performance](docs/performance.md).
22
+ - Exports of fixed-size renders are cropped to the requested size before post-process passes run.
23
+
24
+ ### Performance
25
+
26
+ - Large scenes load faster and use less GPU memory on WebGPU with compact vertices.
27
+ - Dispersion traces the shared camera path once before the first wavelength-dependent interaction, and direct-light resampling balances its candidates across RGB channels.
28
+ - TLAS builds cull leaf instances by world bounds and use more SAH bins on the web.
29
+ - Tiled rendering stops subdividing when the time budget cannot be reached or smaller tiles bring little speedup.
30
+ - Russian roulette is deferred only for paths inside scattering media, so absorbing materials no longer lengthen every path in the scene.
31
+
32
+ ### Fixed
33
+
34
+ - Multiple-scattering compensation for low-roughness metals no longer adds too much energy; they can look slightly darker under broad lighting.
35
+ - Paths inside a subsurface medium intersect its boundary correctly; materials with short scattering radii can look darker.
36
+ - Dispersive scenes no longer overcount emissive meshes, and WebGL 2 spectral direct lighting follows the same random streams as WebGPU.
37
+ - Camera rays stay stable with very small near planes or extreme clip ranges.
38
+ - An engine created on a canvas right after another engine on it was disposed no longer fails with "context is not configured".
39
+ - WebGL 2 scenes that combine vertex colors, tangents, texture maps, emissive meshes and an environment no longer exceed 16 texture units and fail to link.
40
+ - WebGL 2 scenes mixing analytic lights and emissive meshes compile again, and sphere and spot lights seen through transmissive surfaces keep their own radiance instead of the background.
41
+
42
+ ## 0.3.0 - 2026-11-02
43
+
44
+ Experimental WebGPU caustics, continuous-wavelength dispersion and more responsive progressive rendering.
45
+
46
+ ### Added
47
+
48
+ - Experimental WebGPU caustics with `render.caustics`, off by default and ignored on WebGL 2: `lightTracing` for directly visible receivers, `photonMapping` for receivers seen through glass or water. See the [caustics guide](docs/caustics.md).
49
+ - `render.refineUntil(deadline, {signal})` refines once, then keeps sampling until the deadline or cancellation. Use it for custom frame loops; see [sample batching](docs/progressive-rendering.md#sample-batching).
50
+ - `RenderLoop.lastError` holds the exception from the latest failed tick; `status` is `error` while it is set.
51
+
52
+ ### Changed
53
+
54
+ - Dispersion samples continuous wavelengths, on camera paths and caustic photons, so rainbows and dispersive glass form smooth gradients instead of separate red, green and blue images. Scenes with dispersion render differently. `dispersionWavelengths` now counts paths per sample, each carrying one RGB channel.
55
+ - `whenReadyToRefine()` returns `Promise<boolean>`: `true` when sampling was queued. Code typed against `Promise<void>` needs updating.
56
+ - `gpuSampleTimeMs` also reports tiled samples, extrapolated from tile GPU time.
57
+
58
+ ### Deprecated
59
+
60
+ Use `render.refineUntil()` instead of these. They keep working and will be removed in a later release.
61
+
62
+ - `render.whenReadyToRefine()`
63
+ - `render.gpuSampleTimeMs`
64
+ - The `targetBatchTimeMs` and `deferResolve` options of `render.refine()`
65
+
66
+ ### Performance
67
+
68
+ - RenderLoop keeps sampling expensive tiled renders between display frames instead of waiting for the next frame.
69
+
70
+ ### Fixed
71
+
72
+ - Fixed-size renders, `readPixels()` and image exports return exactly the requested dimensions and keep their framing.
73
+ - Renders with different caustic or shader settings no longer stall each other at 0 samples. Shader compilation keeps accumulated samples, and returning to a compiled configuration no longer waits for an obsolete compilation.
74
+ - RenderLoop applies scene edits after a stalled preview denoiser, and resumes after caustic settings change on a finished render.
75
+ - A cancelled denoiser that does not settle within 10 seconds no longer blocks later denoising, and new meshes no longer wait for obsolete BVH preparation.
76
+ - Caustics stay visible in high-resolution renders and across clear interfaces.
77
+ - Small spot lights no longer show precision banding.
78
+ - One-sided emitters no longer emit from their back faces on secondary hits.
79
+ - WebGL 2 samples emissive meshes as lights, so small emitters no longer produce heavy noise.
80
+ - WebGL 2 keeps accumulated lighting when a path escapes to a flat or texture background.
81
+ - WebGL 2 renders a selected AOV channel when it is the first thing drawn after a scene change, instead of staying at 0 samples.
82
+
83
+ ## 0.2.0 - 2026-10-28
84
+
85
+ Faster WebGPU rendering, surface AOVs and procedural skies.
86
+
87
+ ### Performance
88
+
89
+ Compared with v0.1.5, WebGPU shader compilation and rendering are faster across a 10-scene glTF benchmark (geometric means across scenes):
90
+
91
+ | GPU | Shader compilation | Render time |
92
+ | --- | ---: | ---: |
93
+ | Apple M4 Max | -53.8% | -25.6% |
94
+ | NVIDIA RTX 4060 Laptop GPU (Windows 11) | -74.5% | -40.9% |
95
+
96
+ Results vary by scene, hardware, GPU load and shader cache.
97
+
98
+ <details>
99
+ <summary>Per-scene results</summary>
100
+
101
+ Chrome 156, WebGPU, 1280×720, full-frame rendering without tiling, 3 bounces, denoising off. Render time is 32 samples after warmup, excluding loading, preparation and shader compilation, and waits for GPU completion. Each run uses the median of three measurements; results are medians of three runs. M4 Max shader compilation times are from the previous measurements. Values are v0.1.5 → v0.2.0 in seconds.
102
+
103
+ Windows uses driver 617.42, comparing `a646620` → `08d6c63`, with `maxTiles=1`, Sobol sampling, atlas textures and 8 samples per batch. Each process warms up for 8 samples before three 32-sample renders; timings include scheduling and post-processing but exclude pixel readback. Fresh profiles, disabled shader disk caching and unique shader function names do not guarantee an empty driver cache. Across the three Windows rounds, compilation reductions ranged from 74.5% to 74.7%, and render-time reductions from 40.6% to 40.9%.
104
+
105
+ | Scene | M4 Max compile | M4 Max render | RTX 4060 compile | RTX 4060 render |
106
+ | --- | ---: | ---: | ---: | ---: |
107
+ | Classroom 2 | 2.32 → 1.15 | 3.49 → 2.52 | 8.082 → 2.154 | 7.181 → 5.153 |
108
+ | Bathroom | 2.34 → 1.01 | 3.20 → 2.49 | 8.043 → 1.913 | 5.343 → 3.801 |
109
+ | BMW M6 | 2.13 → 0.88 | 1.55 → 0.97 | 7.210 → 1.490 | 2.870 → 1.524 |
110
+ | House | 2.15 → 0.93 | 1.63 → 1.30 | 7.238 → 1.603 | 4.468 → 2.167 |
111
+ | Kitchen | 2.12 → 0.92 | 2.69 → 1.98 | 7.247 → 1.750 | 5.832 → 3.065 |
112
+ | Blender Cover Remix | 2.35 → 1.15 | 1.34 → 0.91 | 8.193 → 2.422 | 2.078 → 1.437 |
113
+ | LEGO Technic Bugatti Chiron | 2.13 → 1.01 | 1.46 → 1.15 | 7.109 → 1.807 | 4.142 → 2.026 |
114
+ | 2025 Yamaha MT-09 SP V4 | 2.34 → 1.16 | 1.97 → 1.62 | 8.176 → 2.401 | 4.446 → 3.005 |
115
+ | Gelatinous Cube | 2.31 → 1.15 | 2.60 → 2.02 | 8.104 → 2.403 | 5.025 → 3.390 |
116
+ | Dragon | 2.16 → 1.03 | 1.76 → 1.32 | 7.574 → 1.886 | 3.896 → 1.904 |
117
+
118
+ Earlier Windows 360p timings included excessive tile submissions in Classroom 2 and Kitchen. This rerun disables tiling in both versions to exclude that scheduling issue from the comparison.
119
+
120
+ </details>
121
+
122
+ ### Added
123
+
124
+ - Surface AOVs (`render.aovs`, `aovSamples`): depth, position, ID, motion and directional reflectance, on WebGPU and WebGL 2. View them with `display.channel`, read them back, or pass them to a custom denoiser.
125
+ - `render.refine(kind)` traces a single AOV without adding beauty samples.
126
+ - `batchSamples` lets one `refine()` call submit several samples within its time budget, so still renders are no longer limited to one sample per frame. Thanks to [@cedricpinson](https://github.com/cedricpinson) for the report and prototype ([#11](https://github.com/pissang/mutracer/issues/11)).
127
+ - `ProceduralSky`: clear-sky environment textures.
128
+ - `EquirectBackground` with `intensity` and rotation, synced from Three.js `backgroundIntensity` and `backgroundRotation`. Thanks to [@cedricpinson](https://github.com/cedricpinson) for the rotation report and proposed fix ([#9](https://github.com/pissang/mutracer/issues/9)).
129
+ - Experimental WebGPU bindless material textures (`textureBinding: 'auto'`), falling back to the texture atlas.
130
+
131
+ ### Changed
132
+
133
+ - SDR display and denoising use exact sRGB encoding on all backends instead of the browser's gamma 2.2 approximation. Dark and midtone pixels may look slightly different.
134
+ - Progressive denoising updates are at least 500 ms apart.
135
+
136
+ ### Deprecated
137
+
138
+ - `allowMultipleSamplesPerFrame`; use `batchSamples`.
139
+
140
+ ### Fixed
141
+
142
+ - Public TypeScript declarations resolve under NodeNext module resolution with `skipLibCheck` off.
143
+ - Shadow catcher contact shadows no longer weaken under environment light from below the receiver, or near emissive meshes on WebGPU. Thanks to [@cedricpinson](https://github.com/cedricpinson) for the emissive-mesh report and proposed fix ([#10](https://github.com/pissang/mutracer/issues/10)).
144
+ - WebGL 2 waits for asynchronously compiled shaders before drawing.
145
+ - Diagnostic channels show their original images without color denoising; native albedo display now matches the browser.
146
+ - Native HDR presentation applies JNLM to extended-range output and can show completed display-linear denoising results.
147
+
148
+ ## 0.1.5 - 2026-10-22
149
+
150
+ ### Fixed
151
+
152
+ - Coat normals no longer inherit the base normal map. Assign the same texture to both maps to perturb both layers. Thanks to [@BruceCherniak](https://github.com/BruceCherniak) ([#8](https://github.com/pissang/mutracer/issues/8)).
153
+
154
+ ## 0.1.4 - 2026-10-21
155
+
156
+ ### Added
157
+
158
+ - Environment and grounded skybox intensity and rotation, synchronized from Three.js scenes.
159
+ - Per-axis texture wrapping (repeat, clamp-to-edge, mirrored-repeat).
160
+ - Explicit sRGB or linear decoding for color textures, preserved from Three.js.
161
+
162
+ ### Fixed
163
+
164
+ - Three.js conversion keeps vertex colors. Thanks to [@zz85](https://github.com/zz85) ([#7](https://github.com/pissang/mutracer/issues/7)).
165
+ - Three.js conversion keeps back-side materials and half-float or R/RG/RGB/RGBA data textures.
166
+ - Converted equirectangular environments match Three.js orientation. Thanks to [@zz85](https://github.com/zz85) ([#6](https://github.com/pissang/mutracer/issues/6)).
167
+ - Fully metallic glTF materials without a metalness map ignore specular settings, as in glTF. Thanks to [@BruceCherniak](https://github.com/BruceCherniak) ([#4](https://github.com/pissang/mutracer/issues/4)).
168
+ - Spot light falloff between the inner and outer cones. Thanks to [@zz85](https://github.com/zz85) ([#5](https://github.com/pissang/mutracer/issues/5)).
169
+
170
+ ## 0.1.3 - 2026-10-19
171
+
172
+ ### Changed
173
+
174
+ - `webgpu-utils` is no longer a dependency.
175
+
176
+ ### Fixed
177
+
178
+ - Adding untextured lights after a scene update. Thanks to [@ertugrulerkan](https://github.com/ertugrulerkan) ([#1](https://github.com/pissang/mutracer/issues/1)).
179
+ - WebGPU shadow catcher edges over opaque flat backgrounds, and OIDN artifacts around silhouettes over shadow catchers.
180
+
181
+ ## 0.1.2 - 2026-10-16
182
+
183
+ ### Added
184
+
185
+ - `displacementBias` (default `0`) for signed displacement offsets on WebGPU.
186
+
187
+ ### Changed
188
+
189
+ - `displacementStepSize` defaults to `0` (1/32 of the displacement height). Set `0.01` for the previous behavior.
190
+ - Three.js materials without a displacement map convert with MuTracer's default height `0.1` instead of `1`.
191
+
192
+ ### Fixed
193
+
194
+ - Displacement updates after map, image or height edits, including shared geometry, and stays consistent under scaled transforms.
195
+ - WebGL 2 renders the undisplaced surface when displacement settings are present.
196
+ - Stationary clicks with Three.js controls keep accumulated samples.
197
+
198
+ ## 0.1.1 - 2026-10-14
199
+
200
+ ### Changed
201
+
202
+ - Interactive previews adapt resolution to frame latency.
203
+
204
+ ### Fixed
205
+
206
+ - Denoised previews stay responsive during interaction and transition smoothly to the final render.
207
+ - Three.js camera damping settles reliably.
208
+ - Animation and incremental geometry updates keep prepared BVHs.
209
+ - Shadow catcher denoising uses albedo and normal guides.
210
+
211
+ ## 0.1.0 - 2026-10-14
212
+
213
+ ### Added
214
+
215
+ - Progressive path tracing on WebGPU with a WebGL 2 fallback.
216
+ - Area, sphere, spot/IES, directional and environment lights with MIS.
217
+ - OpenPBR 1.1 materials.
218
+ - Worker-built static BVHs (TypeScript SAH or TinyBVH WebAssembly) with instance refits.
219
+ - OIDN denoising for previews and final images.
220
+ - Three.js scene conversion and synchronization with `THREESceneSync`.
221
+ - Sobol, ZSobol and random sampling, deterministic offline rendering and adaptive sampling.
222
+ - Tone mapping, color grading, bloom, shadow catchers, transparent backgrounds and depth of field.
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -19,6 +19,9 @@ APIs may change between minor releases.
19
19
  fuzz, thin-film interference, dispersive transmission with absorption and
20
20
  volume scattering, subsurface scattering, emission and ray-marched
21
21
  height-field displacement.
22
+ - **Experimental caustics (WebGPU)**: light tracing for directly visible
23
+ receivers and photon mapping for receivers seen through glass or water. See
24
+ the [caustics guide](docs/caustics.md).
22
25
  - **Interactive with millions of triangles**: a two-level BVH whose BLASes are
23
26
  built with binned SAH in parallel Workers (a JavaScript port of TinyBVH, or
24
27
  the TinyBVH WebAssembly builder with SBVH and CWBVH layouts). Moving
@@ -45,10 +45,7 @@ The ideal-metal direction/average energy tables and multiple-scattering lobe
45
45
  additionally adapt `impl/openpbr_microfacet_multiple_scattering_lobes.h`,
46
46
  `impl/openpbr_microfacet_multiple_scattering_data.h`, and
47
47
  `impl/data/openpbr_ideal_metal_{,avg_}energy_complement_data.h` at the same
48
- `c91aad1d1ce1693e803f039d7c92c2965c4eb013` commit. Directional tables use
49
- row-normalized encoding; metal and ideal-dielectric averages retain exact u16
50
- values in compact rows. The uniform-hemisphere proposal is mixed within the
51
- existing metal sampling lobe.
48
+ `c91aad1d1ce1693e803f039d7c92c2965c4eb013` commit.
52
49
 
53
50
  The ideal-dielectric reflection/transmission multiple-scattering lobe and
54
51
  three additional tables adapt the same commit's
@@ -163,3 +160,20 @@ and MIT license are described in the TinyBVH section above; the full text is
163
160
  also included in [`LICENSES/TinyBVH-MIT.txt`](./LICENSES/TinyBVH-MIT.txt).
164
161
  These license files are copied without modification from the installed
165
162
  packages and the checked-in TinyBVH license.
163
+
164
+ ## PBRT-v4 spectral data and Loop subdivision
165
+
166
+ The developer/viewer PBRT importer includes spectral tables derived from
167
+ [`mmp/pbrt-v4@b0bdf461ba5dd6504b70ebf0932acc0fe7aa744f`](https://github.com/mmp/pbrt-v4/tree/b0bdf461ba5dd6504b70ebf0932acc0fe7aa744f),
168
+ `src/pbrt/util/spectrum.cpp` and measured scattering coefficients from
169
+ `src/pbrt/media.cpp`, and Loop subdivision weights and limit projection
170
+ from `src/pbrt/util/loopsubdiv.cpp`, copyright (c) 1998-2020 Matt Pharr, Wenzel Jakob,
171
+ and Greg Humphreys. Licensed under Apache-2.0; the license is reproduced in
172
+ [`LICENSES/pbrt-v4-Apache-2.0.txt`](LICENSES/pbrt-v4-Apache-2.0.txt).
173
+
174
+ ## AMD FidelityFX FSR 1
175
+
176
+ The optional Web and native EASU display upscale adapts the 32-bit EASU functions from
177
+ [FidelityFX FSR 1](https://github.com/GPUOpen-Effects/FidelityFX-FSR),
178
+ `ffx_fsr1.h` v1.20210629, copyright (c) 2021 Advanced Micro Devices, Inc.
179
+ Licensed under MIT; see [LICENSES/FidelityFX-FSR.txt](LICENSES/FidelityFX-FSR.txt).