@zephyr3d/scene 0.9.21 → 0.9.23

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 (238) hide show
  1. package/dist/animation/joint_dynamics/collision.js +1 -7
  2. package/dist/animation/joint_dynamics/collision.js.map +1 -1
  3. package/dist/animation/joint_dynamics/constraints.js +2 -17
  4. package/dist/animation/joint_dynamics/constraints.js.map +1 -1
  5. package/dist/animation/joint_dynamics/controller.js +2 -20
  6. package/dist/animation/joint_dynamics/controller.js.map +1 -1
  7. package/dist/animation/joint_dynamics/joint_dynamics_system.js +1 -3
  8. package/dist/animation/joint_dynamics/joint_dynamics_system.js.map +1 -1
  9. package/dist/animation/joint_dynamics/solver.js +14 -60
  10. package/dist/animation/joint_dynamics/solver.js.map +1 -1
  11. package/dist/animation/joint_dynamics/types.js +3 -3
  12. package/dist/animation/joint_dynamics/types.js.map +1 -1
  13. package/dist/app/app.js +23 -0
  14. package/dist/app/app.js.map +1 -1
  15. package/dist/app/scriptregistry.js +16 -53
  16. package/dist/app/scriptregistry.js.map +1 -1
  17. package/dist/asset/assetmanager.js +2 -0
  18. package/dist/asset/assetmanager.js.map +1 -1
  19. package/dist/asset/model.js +22 -0
  20. package/dist/asset/model.js.map +1 -1
  21. package/dist/blitter/bilateralblur.js +3 -1
  22. package/dist/blitter/bilateralblur.js.map +1 -1
  23. package/dist/blitter/blitter.js +3 -3
  24. package/dist/blitter/blitter.js.map +1 -1
  25. package/dist/camera/camera.js +398 -45
  26. package/dist/camera/camera.js.map +1 -1
  27. package/dist/camera/perspectivecamera.js +69 -2
  28. package/dist/camera/perspectivecamera.js.map +1 -1
  29. package/dist/index.d.ts +9100 -8712
  30. package/dist/index.js +9 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/material/blinn.js +1 -1
  33. package/dist/material/blinn.js.map +1 -1
  34. package/dist/material/lambert.js +3 -3
  35. package/dist/material/lambert.js.map +1 -1
  36. package/dist/material/material.js +8 -5
  37. package/dist/material/material.js.map +1 -1
  38. package/dist/material/meshmaterial.js +17 -10
  39. package/dist/material/meshmaterial.js.map +1 -1
  40. package/dist/material/mixins/lightmodel/blinnphong.js +1 -1
  41. package/dist/material/mixins/lightmodel/blinnphong.js.map +1 -1
  42. package/dist/material/mixins/lightmodel/lambert.js +1 -1
  43. package/dist/material/mixins/lightmodel/lambert.js.map +1 -1
  44. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js +21 -6
  45. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js.map +1 -1
  46. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js +1 -1
  47. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
  48. package/dist/material/mixins/lightmodel/pbrspecularglossness.js +1 -1
  49. package/dist/material/mixins/lightmodel/pbrspecularglossness.js.map +1 -1
  50. package/dist/material/mixins/lit.js +33 -11
  51. package/dist/material/mixins/lit.js.map +1 -1
  52. package/dist/material/mixins/pbr/brdf.js +44 -12
  53. package/dist/material/mixins/pbr/brdf.js.map +1 -1
  54. package/dist/material/mixins/pbr/common.js +149 -14
  55. package/dist/material/mixins/pbr/common.js.map +1 -1
  56. package/dist/material/mtoon.js +7 -4
  57. package/dist/material/mtoon.js.map +1 -1
  58. package/dist/material/pbrblueprint.js +5 -1
  59. package/dist/material/pbrblueprint.js.map +1 -1
  60. package/dist/material/pbrmr.js +1 -1
  61. package/dist/material/pbrmr.js.map +1 -1
  62. package/dist/material/pbrsg.js +1 -1
  63. package/dist/material/pbrsg.js.map +1 -1
  64. package/dist/material/shader/helper.js +186 -11
  65. package/dist/material/shader/helper.js.map +1 -1
  66. package/dist/material/skin.js +2 -2
  67. package/dist/material/skin.js.map +1 -1
  68. package/dist/material/terrain-cm.js +5 -5
  69. package/dist/material/terrain-cm.js.map +1 -1
  70. package/dist/material/water.js +6 -4
  71. package/dist/material/water.js.map +1 -1
  72. package/dist/posteffect/bloom.js +54 -4
  73. package/dist/posteffect/bloom.js.map +1 -1
  74. package/dist/posteffect/compositor.js +41 -0
  75. package/dist/posteffect/compositor.js.map +1 -1
  76. package/dist/posteffect/posteffect.js +51 -0
  77. package/dist/posteffect/posteffect.js.map +1 -1
  78. package/dist/posteffect/sao.js +7 -6
  79. package/dist/posteffect/sao.js.map +1 -1
  80. package/dist/posteffect/skinsss.js +3 -3
  81. package/dist/posteffect/skinsss.js.map +1 -1
  82. package/dist/posteffect/ssgi.js +1196 -0
  83. package/dist/posteffect/ssgi.js.map +1 -0
  84. package/dist/posteffect/ssr.js +83 -45
  85. package/dist/posteffect/ssr.js.map +1 -1
  86. package/dist/posteffect/sss.js +137 -49
  87. package/dist/posteffect/sss.js.map +1 -1
  88. package/dist/posteffect/taa.js +5 -4
  89. package/dist/posteffect/taa.js.map +1 -1
  90. package/dist/posteffect/tonemap.js +15 -3
  91. package/dist/posteffect/tonemap.js.map +1 -1
  92. package/dist/render/abuffer_oit.js +2 -2
  93. package/dist/render/abuffer_oit.js.map +1 -1
  94. package/dist/render/cluster_light.js +12 -6
  95. package/dist/render/cluster_light.js.map +1 -1
  96. package/dist/render/drawable_mixin.js +8 -5
  97. package/dist/render/drawable_mixin.js.map +1 -1
  98. package/dist/render/dualdepthpeeling_oit.js +10 -5
  99. package/dist/render/dualdepthpeeling_oit.js.map +1 -1
  100. package/dist/render/envlight.js +298 -5
  101. package/dist/render/envlight.js.map +1 -1
  102. package/dist/render/gpu_picking.js +7 -5
  103. package/dist/render/gpu_picking.js.map +1 -1
  104. package/dist/render/hzb.js +28 -19
  105. package/dist/render/hzb.js.map +1 -1
  106. package/dist/render/lightpass.js +18 -4
  107. package/dist/render/lightpass.js.map +1 -1
  108. package/dist/render/render_queue.js +37 -4
  109. package/dist/render/render_queue.js.map +1 -1
  110. package/dist/render/renderer.js +8 -3
  111. package/dist/render/renderer.js.map +1 -1
  112. package/dist/render/rendergraph/blackboard.js +20 -48
  113. package/dist/render/rendergraph/blackboard.js.map +1 -1
  114. package/dist/render/rendergraph/device_pool_allocator.js +18 -58
  115. package/dist/render/rendergraph/device_pool_allocator.js.map +1 -1
  116. package/dist/render/rendergraph/executor.js +89 -115
  117. package/dist/render/rendergraph/executor.js.map +1 -1
  118. package/dist/render/rendergraph/forward_plus_builder.js +1003 -715
  119. package/dist/render/rendergraph/forward_plus_builder.js.map +1 -1
  120. package/dist/render/rendergraph/frame_graph_context.js +41 -0
  121. package/dist/render/rendergraph/frame_graph_context.js.map +1 -0
  122. package/dist/render/rendergraph/frame_resource_requirements.js +14 -0
  123. package/dist/render/rendergraph/frame_resource_requirements.js.map +1 -0
  124. package/dist/render/rendergraph/history_resource_manager.js +74 -140
  125. package/dist/render/rendergraph/history_resource_manager.js.map +1 -1
  126. package/dist/render/rendergraph/history_resources.js +7 -5
  127. package/dist/render/rendergraph/history_resources.js.map +1 -1
  128. package/dist/render/rendergraph/render_context.js +19 -0
  129. package/dist/render/rendergraph/render_context.js.map +1 -0
  130. package/dist/render/rendergraph/render_pipeline.js +315 -0
  131. package/dist/render/rendergraph/render_pipeline.js.map +1 -0
  132. package/dist/render/rendergraph/rendergraph.js +158 -141
  133. package/dist/render/rendergraph/rendergraph.js.map +1 -1
  134. package/dist/render/rendergraph/scene_render_context.js +267 -0
  135. package/dist/render/rendergraph/scene_render_context.js.map +1 -0
  136. package/dist/render/rendergraph/texture_affinity_cache.js +19 -0
  137. package/dist/render/rendergraph/texture_affinity_cache.js.map +1 -0
  138. package/dist/render/rendergraph/types.js +19 -31
  139. package/dist/render/rendergraph/types.js.map +1 -1
  140. package/dist/render/renderpass.js +3 -3
  141. package/dist/render/renderpass.js.map +1 -1
  142. package/dist/render/shadow_mask_pass.js +10 -6
  143. package/dist/render/shadow_mask_pass.js.map +1 -1
  144. package/dist/render/sky.js +197 -35
  145. package/dist/render/sky.js.map +1 -1
  146. package/dist/render/weightedblended_oit.js +4 -3
  147. package/dist/render/weightedblended_oit.js.map +1 -1
  148. package/dist/scene/basesprite.js +2 -0
  149. package/dist/scene/basesprite.js.map +1 -1
  150. package/dist/scene/batchgroup.js +10 -0
  151. package/dist/scene/batchgroup.js.map +1 -1
  152. package/dist/scene/environment.js +61 -2
  153. package/dist/scene/environment.js.map +1 -1
  154. package/dist/scene/light.js +178 -10
  155. package/dist/scene/light.js.map +1 -1
  156. package/dist/scene/meshdrawable.js +89 -2
  157. package/dist/scene/meshdrawable.js.map +1 -1
  158. package/dist/scene/msdftext.js +2 -0
  159. package/dist/scene/msdftext.js.map +1 -1
  160. package/dist/scene/msdftextsprite.js +2 -0
  161. package/dist/scene/msdftextsprite.js.map +1 -1
  162. package/dist/scene/particlesys.js +2 -0
  163. package/dist/scene/particlesys.js.map +1 -1
  164. package/dist/scene/scene.js +34 -1
  165. package/dist/scene/scene.js.map +1 -1
  166. package/dist/scene/terrain-cm/grass.js +2 -1
  167. package/dist/scene/terrain-cm/grass.js.map +1 -1
  168. package/dist/scene/terrain-cm/terrain-cm.js +2 -0
  169. package/dist/scene/terrain-cm/terrain-cm.js.map +1 -1
  170. package/dist/scene/water.js +2 -0
  171. package/dist/scene/water.js.map +1 -1
  172. package/dist/shaders/atmosphere.js +5 -4
  173. package/dist/shaders/atmosphere.js.map +1 -1
  174. package/dist/shaders/fog.js +10 -3
  175. package/dist/shaders/fog.js.map +1 -1
  176. package/dist/shaders/shadow.js +96 -29
  177. package/dist/shaders/shadow.js.map +1 -1
  178. package/dist/shaders/ssgi.js +63 -0
  179. package/dist/shaders/ssgi.js.map +1 -0
  180. package/dist/shaders/ssgi_reprojection.js +118 -0
  181. package/dist/shaders/ssgi_reprojection.js.map +1 -0
  182. package/dist/shaders/ssr.js +322 -154
  183. package/dist/shaders/ssr.js.map +1 -1
  184. package/dist/shadow/esm.js +13 -8
  185. package/dist/shadow/esm.js.map +1 -1
  186. package/dist/shadow/pcf_opt.js +15 -12
  187. package/dist/shadow/pcf_opt.js.map +1 -1
  188. package/dist/shadow/pcf_pd.js +15 -12
  189. package/dist/shadow/pcf_pd.js.map +1 -1
  190. package/dist/shadow/pcss.js +17 -11
  191. package/dist/shadow/pcss.js.map +1 -1
  192. package/dist/shadow/shadow_impl.js +20 -2
  193. package/dist/shadow/shadow_impl.js.map +1 -1
  194. package/dist/shadow/shadowmapper.js +10 -3
  195. package/dist/shadow/shadowmapper.js.map +1 -1
  196. package/dist/shadow/ssm.js +16 -13
  197. package/dist/shadow/ssm.js.map +1 -1
  198. package/dist/shadow/vsm.js +10 -8
  199. package/dist/shadow/vsm.js.map +1 -1
  200. package/dist/utility/physical.js +74 -0
  201. package/dist/utility/physical.js.map +1 -0
  202. package/dist/utility/rendermipmap.js +2 -2
  203. package/dist/utility/rendermipmap.js.map +1 -1
  204. package/dist/utility/serialization/manager.js +3 -1
  205. package/dist/utility/serialization/manager.js.map +1 -1
  206. package/dist/utility/serialization/scene/animation.js +3 -1
  207. package/dist/utility/serialization/scene/animation.js.map +1 -1
  208. package/dist/utility/serialization/scene/batch.js +3 -1
  209. package/dist/utility/serialization/scene/batch.js.map +1 -1
  210. package/dist/utility/serialization/scene/camera.js +598 -2
  211. package/dist/utility/serialization/scene/camera.js.map +1 -1
  212. package/dist/utility/serialization/scene/light.js +180 -9
  213. package/dist/utility/serialization/scene/light.js.map +1 -1
  214. package/dist/utility/serialization/scene/material.js +43 -3
  215. package/dist/utility/serialization/scene/material.js.map +1 -1
  216. package/dist/utility/serialization/scene/mesh.js +3 -1
  217. package/dist/utility/serialization/scene/mesh.js.map +1 -1
  218. package/dist/utility/serialization/scene/node.js +3 -1
  219. package/dist/utility/serialization/scene/node.js.map +1 -1
  220. package/dist/utility/serialization/scene/particle.js +3 -1
  221. package/dist/utility/serialization/scene/particle.js.map +1 -1
  222. package/dist/utility/serialization/scene/primitive.js +2 -0
  223. package/dist/utility/serialization/scene/primitive.js.map +1 -1
  224. package/dist/utility/serialization/scene/scene.js +70 -0
  225. package/dist/utility/serialization/scene/scene.js.map +1 -1
  226. package/dist/utility/serialization/scene/sprite.js +3 -1
  227. package/dist/utility/serialization/scene/sprite.js.map +1 -1
  228. package/dist/utility/serialization/scene/terrain.js +3 -1
  229. package/dist/utility/serialization/scene/terrain.js.map +1 -1
  230. package/dist/utility/serialization/scene/text.js +3 -0
  231. package/dist/utility/serialization/scene/text.js.map +1 -1
  232. package/dist/utility/serialization/scene/water.js +3 -1
  233. package/dist/utility/serialization/scene/water.js.map +1 -1
  234. package/dist/values.js +2 -3
  235. package/dist/values.js.map +1 -1
  236. package/package.json +3 -3
  237. package/dist/animation/joint_dynamics/convex_collider.js +0 -320
  238. package/dist/animation/joint_dynamics/convex_collider.js.map +0 -1
@@ -25,13 +25,15 @@ import '../../../render/rendergraph/forward_plus_builder.js';
25
25
  import '../../../render/lightpass.js';
26
26
  import '../../../render/sky.js';
27
27
  import '../../../render/clipmap.js';
28
+ import '../../../render/envlight.js';
28
29
  import '../../../render/dualdepthpeeling_oit.js';
29
30
  import '../../../shaders/atmosphere.js';
31
+ import '../../../render/rendergraph/scene_render_context.js';
30
32
  import { GraphNode } from '../../../scene/graph_node.js';
31
33
  import '../../../shadow/shadowmapper.js';
32
34
  import '../../../scene/mesh.js';
33
- import '../../../scene/basesprite.js';
34
35
  import '../../../scene/meshdrawable.js';
36
+ import '../../../scene/basesprite.js';
35
37
  import '../../../material/msdf_text.js';
36
38
  import '../../../scene/water.js';
37
39
  import '../../../scene/scene_node.js';
@@ -1 +1 @@
1
- {"version":3,"file":"batch.js","sources":["../../../../src/utility/serialization/scene/batch.ts"],"sourcesContent":["import { BatchGroup, GraphNode, type SceneNode } from '../../../scene';\r\nimport type { SerializableClass } from '../types';\r\n\r\n/** @internal */\r\nexport function getBatchGroupClass(): SerializableClass {\r\n return {\r\n ctor: BatchGroup,\r\n parent: GraphNode,\r\n name: 'BatchGroup',\r\n createFunc(ctx: SceneNode) {\r\n const batchGroup = new BatchGroup(ctx.scene!);\r\n batchGroup.parent = ctx;\r\n return { obj: batchGroup };\r\n },\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n}\r\n"],"names":["getBatchGroupClass","ctor","BatchGroup","parent","GraphNode","name","createFunc","ctx","batchGroup","scene","obj","getProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,iBACO,SAASA,kBAAAA,GAAAA;IACd,OAAO;QACLC,IAAMC,EAAAA,UAAAA;QACNC,MAAQC,EAAAA,SAAAA;QACRC,IAAM,EAAA,YAAA;AACNC,QAAAA,UAAAA,CAAAA,CAAWC,GAAc,EAAA;AACvB,YAAA,MAAMC,UAAa,GAAA,IAAIN,UAAWK,CAAAA,GAAAA,CAAIE,KAAK,CAAA;AAC3CD,YAAAA,UAAAA,CAAWL,MAAM,GAAGI,GAAAA;YACpB,OAAO;gBAAEG,GAAKF,EAAAA;AAAW,aAAA;AAC3B,SAAA;AACAG,QAAAA,QAAAA,CAAAA,GAAAA;AACE,YAAA,OAAO,EAAE;AACX;AACF,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"batch.js","sources":["../../../../src/utility/serialization/scene/batch.ts"],"sourcesContent":["import { BatchGroup, GraphNode, type SceneNode } from '../../../scene';\r\nimport type { SerializableClass } from '../types';\r\n\r\n/** @internal */\r\nexport function getBatchGroupClass(): SerializableClass {\r\n return {\r\n ctor: BatchGroup,\r\n parent: GraphNode,\r\n name: 'BatchGroup',\r\n createFunc(ctx: SceneNode) {\r\n const batchGroup = new BatchGroup(ctx.scene!);\r\n batchGroup.parent = ctx;\r\n return { obj: batchGroup };\r\n },\r\n getProps() {\r\n return [];\r\n }\r\n };\r\n}\r\n"],"names":["getBatchGroupClass","ctor","BatchGroup","parent","GraphNode","name","createFunc","ctx","batchGroup","scene","obj","getProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,iBACO,SAASA,kBAAAA,GAAAA;IACd,OAAO;QACLC,IAAMC,EAAAA,UAAAA;QACNC,MAAQC,EAAAA,SAAAA;QACRC,IAAM,EAAA,YAAA;AACNC,QAAAA,UAAAA,CAAAA,CAAWC,GAAc,EAAA;AACvB,YAAA,MAAMC,UAAa,GAAA,IAAIN,UAAWK,CAAAA,GAAAA,CAAIE,KAAK,CAAA;AAC3CD,YAAAA,UAAAA,CAAWL,MAAM,GAAGI,GAAAA;YACpB,OAAO;gBAAEG,GAAKF,EAAAA;AAAW,aAAA;AAC3B,SAAA;AACAG,QAAAA,QAAAA,CAAAA,GAAAA;AACE,YAAA,OAAO,EAAE;AACX;AACF,KAAA;AACF;;;;"}
@@ -29,14 +29,16 @@ import '../../../render/rendergraph/forward_plus_builder.js';
29
29
  import '../../../render/lightpass.js';
30
30
  import '../../../render/sky.js';
31
31
  import '../../../render/clipmap.js';
32
+ import '../../../render/envlight.js';
32
33
  import '../../../render/dualdepthpeeling_oit.js';
33
34
  import { TAA_DEBUG_NONE, TAA_DEBUG_CURRENT_COLOR, TAA_DEBUG_HISTORY_COLOR, TAA_DEBUG_VELOCITY, TAA_DEBUG_EDGE, TAA_DEBUG_ALAPH, TAA_DEBUG_MOTION_VECTOR, TAA_DEBUG_STRENGTH } from '../../../shaders/temporal.js';
34
35
  import '../../../shaders/atmosphere.js';
36
+ import '../../../render/rendergraph/scene_render_context.js';
35
37
  import { SceneNode } from '../../../scene/scene_node.js';
36
38
  import '../../../shadow/shadowmapper.js';
37
39
  import '../../../scene/mesh.js';
38
- import '../../../scene/basesprite.js';
39
40
  import '../../../scene/meshdrawable.js';
41
+ import '../../../scene/basesprite.js';
40
42
  import '../../../material/msdf_text.js';
41
43
  import '../../../scene/water.js';
42
44
  import '../../../scene/particlesys.js';
@@ -277,6 +279,98 @@ import '../../../scene/raycast_visitor.js';
277
279
  },
278
280
  set (value) {
279
281
  this.toneMapExposure = value.num[0];
282
+ },
283
+ isHidden () {
284
+ return this.scene?.lightingMode === 'physical';
285
+ }
286
+ },
287
+ {
288
+ name: 'Aperture',
289
+ type: 'float',
290
+ phase: 1,
291
+ default: 16,
292
+ options: {
293
+ label: 'Aperture (f-number)',
294
+ group: 'PostProcessing/ToneMap',
295
+ minValue: 0.1,
296
+ maxValue: 64,
297
+ animatable: true
298
+ },
299
+ get (value) {
300
+ value.num[0] = this.aperture;
301
+ },
302
+ set (value) {
303
+ this.aperture = value.num[0];
304
+ },
305
+ isHidden () {
306
+ return this.scene?.lightingMode !== 'physical';
307
+ }
308
+ },
309
+ {
310
+ name: 'ShutterSpeed',
311
+ description: 'Shutter-open time in seconds',
312
+ type: 'float',
313
+ phase: 1,
314
+ default: 1 / 125,
315
+ options: {
316
+ label: 'Shutter (seconds)',
317
+ group: 'PostProcessing/ToneMap',
318
+ minValue: 0.000001,
319
+ maxValue: 60,
320
+ animatable: true
321
+ },
322
+ get (value) {
323
+ value.num[0] = this.shutterSpeed;
324
+ },
325
+ set (value) {
326
+ this.shutterSpeed = value.num[0];
327
+ },
328
+ isHidden () {
329
+ return this.scene?.lightingMode !== 'physical';
330
+ }
331
+ },
332
+ {
333
+ name: 'ISO',
334
+ type: 'float',
335
+ phase: 1,
336
+ default: 100,
337
+ options: {
338
+ group: 'PostProcessing/ToneMap',
339
+ minValue: 1,
340
+ maxValue: 204800,
341
+ animatable: true
342
+ },
343
+ get (value) {
344
+ value.num[0] = this.ISO;
345
+ },
346
+ set (value) {
347
+ this.ISO = value.num[0];
348
+ },
349
+ isHidden () {
350
+ return this.scene?.lightingMode !== 'physical';
351
+ }
352
+ },
353
+ {
354
+ name: 'ExposureCompensation',
355
+ description: 'Exposure compensation in stops',
356
+ type: 'float',
357
+ phase: 1,
358
+ default: 0,
359
+ options: {
360
+ label: 'Compensation (EV)',
361
+ group: 'PostProcessing/ToneMap',
362
+ minValue: -10,
363
+ maxValue: 10,
364
+ animatable: true
365
+ },
366
+ get (value) {
367
+ value.num[0] = this.exposureCompensation;
368
+ },
369
+ set (value) {
370
+ this.exposureCompensation = value.num[0];
371
+ },
372
+ isHidden () {
373
+ return this.scene?.lightingMode !== 'physical';
280
374
  }
281
375
  },
282
376
  {
@@ -437,11 +531,14 @@ import '../../../scene/raycast_visitor.js';
437
531
  },
438
532
  {
439
533
  name: 'BloomThreshold',
534
+ description: 'Luminance above which a pixel blooms. Under physical lighting the buffer is camera ' + 'pre-exposed, where 0.8 is roughly a white surface in direct sunlight; lower it for a ' + 'more pronounced glow.',
440
535
  type: 'float',
441
536
  options: {
442
537
  animatable: true,
443
538
  minValue: 0,
444
- maxValue: 1,
539
+ // Not capped at 1: physical scenes legitimately threshold above sunlit white to
540
+ // restrict blooming to genuine emitters.
541
+ maxValue: 8,
445
542
  label: 'Threshold',
446
543
  group: 'PostProcessing/Bloom'
447
544
  },
@@ -603,6 +700,392 @@ import '../../../scene/raycast_visitor.js';
603
700
  return this.motionBlur;
604
701
  }
605
702
  },
703
+ {
704
+ name: 'SSGIEnabled',
705
+ type: 'bool',
706
+ phase: 0,
707
+ default: false,
708
+ options: {
709
+ label: 'Enabled',
710
+ group: 'PostProcessing/SSGI'
711
+ },
712
+ get (value) {
713
+ value.bool[0] = this.SSGI;
714
+ },
715
+ set (value) {
716
+ this.SSGI = value.bool[0];
717
+ }
718
+ },
719
+ {
720
+ name: 'SSGIQualityPreset',
721
+ type: 'string',
722
+ phase: 1,
723
+ default: 'quality',
724
+ options: {
725
+ label: 'Quality',
726
+ group: 'PostProcessing/SSGI',
727
+ enum: {
728
+ labels: [
729
+ 'Quality',
730
+ 'Balanced',
731
+ 'Performance',
732
+ 'Custom'
733
+ ],
734
+ values: [
735
+ 'quality',
736
+ 'balanced',
737
+ 'performance',
738
+ 'custom'
739
+ ]
740
+ }
741
+ },
742
+ get (value) {
743
+ value.str[0] = this.ssgiQualityPreset;
744
+ },
745
+ set (value) {
746
+ this.ssgiQualityPreset = value.str[0];
747
+ },
748
+ isValid () {
749
+ return this.SSGI;
750
+ }
751
+ },
752
+ {
753
+ name: 'SSGIHalfResolution',
754
+ type: 'bool',
755
+ phase: 2,
756
+ default: false,
757
+ options: {
758
+ label: 'HalfResolution',
759
+ group: 'PostProcessing/SSGI'
760
+ },
761
+ get (value) {
762
+ value.bool[0] = this.ssgiHalfResolution;
763
+ },
764
+ set (value) {
765
+ this.ssgiHalfResolution = value.bool[0];
766
+ },
767
+ isValid () {
768
+ return this.SSGI && this.ssgiQualityPreset === 'custom';
769
+ }
770
+ },
771
+ {
772
+ name: 'SSGIRaysPerPixel',
773
+ type: 'int',
774
+ phase: 2,
775
+ default: 2,
776
+ options: {
777
+ label: 'RaysPerPixel',
778
+ group: 'PostProcessing/SSGI',
779
+ minValue: 1,
780
+ maxValue: 4
781
+ },
782
+ get (value) {
783
+ value.num[0] = this.ssgiRaysPerPixel;
784
+ },
785
+ set (value) {
786
+ this.ssgiRaysPerPixel = value.num[0];
787
+ },
788
+ isValid () {
789
+ return this.SSGI && this.ssgiQualityPreset === 'custom';
790
+ }
791
+ },
792
+ {
793
+ name: 'SSGIMaxSteps',
794
+ type: 'int',
795
+ phase: 2,
796
+ default: 64,
797
+ options: {
798
+ label: 'MaxSteps',
799
+ group: 'PostProcessing/SSGI',
800
+ minValue: 1,
801
+ maxValue: 256
802
+ },
803
+ get (value) {
804
+ value.num[0] = this.ssgiMaxSteps;
805
+ },
806
+ set (value) {
807
+ this.ssgiMaxSteps = value.num[0];
808
+ },
809
+ isValid () {
810
+ return this.SSGI && this.ssgiQualityPreset === 'custom';
811
+ }
812
+ },
813
+ {
814
+ name: 'SSGIDenoisePasses',
815
+ type: 'int',
816
+ phase: 2,
817
+ default: 4,
818
+ options: {
819
+ label: 'DenoisePasses',
820
+ group: 'PostProcessing/SSGI',
821
+ minValue: 0,
822
+ maxValue: 5
823
+ },
824
+ get (value) {
825
+ value.num[0] = this.ssgiDenoisePasses;
826
+ },
827
+ set (value) {
828
+ this.ssgiDenoisePasses = value.num[0];
829
+ },
830
+ isValid () {
831
+ return this.SSGI && this.ssgiQualityPreset === 'custom';
832
+ }
833
+ },
834
+ {
835
+ name: 'SSGIIntensity',
836
+ type: 'float',
837
+ phase: 1,
838
+ default: 0.7,
839
+ options: {
840
+ label: 'Intensity',
841
+ group: 'PostProcessing/SSGI',
842
+ minValue: 0,
843
+ maxValue: 4,
844
+ animatable: true
845
+ },
846
+ get (value) {
847
+ value.num[0] = this.ssgiIntensity;
848
+ },
849
+ set (value) {
850
+ this.ssgiIntensity = value.num[0];
851
+ },
852
+ isValid () {
853
+ return this.SSGI;
854
+ }
855
+ },
856
+ {
857
+ name: 'SSGIAOIntensity',
858
+ type: 'float',
859
+ phase: 1,
860
+ default: 0.8,
861
+ options: {
862
+ label: 'AO intensity',
863
+ group: 'PostProcessing/SSGI',
864
+ minValue: 0,
865
+ maxValue: 1,
866
+ animatable: true
867
+ },
868
+ get (value) {
869
+ value.num[0] = this.ssgiAOIntensity;
870
+ },
871
+ set (value) {
872
+ this.ssgiAOIntensity = value.num[0];
873
+ },
874
+ isValid () {
875
+ return this.SSGI;
876
+ }
877
+ },
878
+ {
879
+ name: 'SSGIAOPower',
880
+ type: 'float',
881
+ phase: 1,
882
+ default: 1,
883
+ options: {
884
+ label: 'AO contrast',
885
+ group: 'PostProcessing/SSGI',
886
+ minValue: 0.01,
887
+ maxValue: 4,
888
+ animatable: true
889
+ },
890
+ get (value) {
891
+ value.num[0] = this.ssgiAOPower;
892
+ },
893
+ set (value) {
894
+ this.ssgiAOPower = value.num[0];
895
+ },
896
+ isValid () {
897
+ return this.SSGI;
898
+ }
899
+ },
900
+ {
901
+ name: 'SSGISkyOcclusion',
902
+ type: 'float',
903
+ phase: 1,
904
+ default: 1,
905
+ options: {
906
+ label: 'Sky occlusion',
907
+ group: 'PostProcessing/SSGI',
908
+ minValue: 0,
909
+ maxValue: 1,
910
+ animatable: true
911
+ },
912
+ get (value) {
913
+ value.num[0] = this.ssgiSkyOcclusion;
914
+ },
915
+ set (value) {
916
+ this.ssgiSkyOcclusion = value.num[0];
917
+ },
918
+ isValid () {
919
+ return this.SSGI;
920
+ }
921
+ },
922
+ {
923
+ name: 'SSGIMaxDistance',
924
+ type: 'float',
925
+ phase: 1,
926
+ default: 32,
927
+ options: {
928
+ label: 'MaxDistance',
929
+ group: 'PostProcessing/SSGI',
930
+ minValue: 0.1,
931
+ maxValue: 512
932
+ },
933
+ get (value) {
934
+ value.num[0] = this.ssgiMaxDistance;
935
+ },
936
+ set (value) {
937
+ this.ssgiMaxDistance = value.num[0];
938
+ },
939
+ isValid () {
940
+ return this.SSGI;
941
+ }
942
+ },
943
+ {
944
+ name: 'SSGIThickness',
945
+ type: 'float',
946
+ phase: 1,
947
+ default: 0.5,
948
+ options: {
949
+ label: 'Thickness',
950
+ group: 'PostProcessing/SSGI',
951
+ minValue: 0.001,
952
+ maxValue: 8
953
+ },
954
+ get (value) {
955
+ value.num[0] = this.ssgiThickness;
956
+ },
957
+ set (value) {
958
+ this.ssgiThickness = value.num[0];
959
+ },
960
+ isValid () {
961
+ return this.SSGI;
962
+ }
963
+ },
964
+ {
965
+ name: 'SSGIStride',
966
+ type: 'int',
967
+ phase: 1,
968
+ default: 1,
969
+ options: {
970
+ label: 'Stride',
971
+ group: 'PostProcessing/SSGI',
972
+ minValue: 1,
973
+ maxValue: 16
974
+ },
975
+ get (value) {
976
+ value.num[0] = this.ssgiStride;
977
+ },
978
+ set (value) {
979
+ this.ssgiStride = value.num[0];
980
+ },
981
+ isValid () {
982
+ return this.SSGI;
983
+ }
984
+ },
985
+ {
986
+ name: 'SSGIMaxRayIntensity',
987
+ description: 'Maximum ray radiance after camera exposure in physical lighting mode',
988
+ type: 'float',
989
+ phase: 1,
990
+ default: 10,
991
+ options: {
992
+ label: 'MaxRayIntensity',
993
+ group: 'PostProcessing/SSGI',
994
+ minValue: 0,
995
+ maxValue: 64
996
+ },
997
+ get (value) {
998
+ value.num[0] = this.ssgiMaxRayIntensity;
999
+ },
1000
+ set (value) {
1001
+ this.ssgiMaxRayIntensity = value.num[0];
1002
+ },
1003
+ isValid () {
1004
+ return this.SSGI;
1005
+ }
1006
+ },
1007
+ {
1008
+ name: 'SSGITemporalEnabled',
1009
+ type: 'bool',
1010
+ phase: 1,
1011
+ default: true,
1012
+ options: {
1013
+ label: 'Temporal',
1014
+ group: 'PostProcessing/SSGI'
1015
+ },
1016
+ get (value) {
1017
+ value.bool[0] = this.ssgiTemporal;
1018
+ },
1019
+ set (value) {
1020
+ this.ssgiTemporal = value.bool[0];
1021
+ },
1022
+ isValid () {
1023
+ return this.SSGI;
1024
+ }
1025
+ },
1026
+ {
1027
+ name: 'SSGITemporalWeight',
1028
+ type: 'float',
1029
+ phase: 1,
1030
+ default: 0.94,
1031
+ options: {
1032
+ label: 'TemporalWeight',
1033
+ group: 'PostProcessing/SSGI',
1034
+ minValue: 0,
1035
+ maxValue: 0.99
1036
+ },
1037
+ get (value) {
1038
+ value.num[0] = this.ssgiTemporalWeight;
1039
+ },
1040
+ set (value) {
1041
+ this.ssgiTemporalWeight = value.num[0];
1042
+ },
1043
+ isValid () {
1044
+ return this.SSGI && this.ssgiTemporal;
1045
+ }
1046
+ },
1047
+ {
1048
+ name: 'SSGIDepthReject',
1049
+ type: 'float',
1050
+ phase: 1,
1051
+ default: 0.5,
1052
+ options: {
1053
+ label: 'DepthReject',
1054
+ group: 'PostProcessing/SSGI',
1055
+ minValue: 0,
1056
+ maxValue: 4
1057
+ },
1058
+ get (value) {
1059
+ value.num[0] = this.ssgiDepthReject;
1060
+ },
1061
+ set (value) {
1062
+ this.ssgiDepthReject = value.num[0];
1063
+ },
1064
+ isValid () {
1065
+ return this.SSGI;
1066
+ }
1067
+ },
1068
+ {
1069
+ name: 'SSGINormalReject',
1070
+ type: 'float',
1071
+ phase: 1,
1072
+ default: 0.75,
1073
+ options: {
1074
+ label: 'NormalReject',
1075
+ group: 'PostProcessing/SSGI',
1076
+ minValue: -1,
1077
+ maxValue: 1
1078
+ },
1079
+ get (value) {
1080
+ value.num[0] = this.ssgiNormalReject;
1081
+ },
1082
+ set (value) {
1083
+ this.ssgiNormalReject = value.num[0];
1084
+ },
1085
+ isValid () {
1086
+ return this.SSGI;
1087
+ }
1088
+ },
606
1089
  {
607
1090
  name: 'SSREnabled',
608
1091
  type: 'bool',
@@ -1312,6 +1795,30 @@ import '../../../scene/raycast_visitor.js';
1312
1795
  },
1313
1796
  getProps () {
1314
1797
  return defineProps([
1798
+ {
1799
+ name: 'ProjectionMode',
1800
+ type: 'string',
1801
+ phase: 0,
1802
+ default: 'fov',
1803
+ options: {
1804
+ enum: {
1805
+ labels: [
1806
+ 'Field of View',
1807
+ 'Physical Lens'
1808
+ ],
1809
+ values: [
1810
+ 'fov',
1811
+ 'physical'
1812
+ ]
1813
+ }
1814
+ },
1815
+ get (value) {
1816
+ value.str[0] = this.projectionMode;
1817
+ },
1818
+ set (value) {
1819
+ this.projectionMode = value.str[0];
1820
+ }
1821
+ },
1315
1822
  {
1316
1823
  name: 'FovVertical',
1317
1824
  type: 'float',
@@ -1325,6 +1832,95 @@ import '../../../scene/raycast_visitor.js';
1325
1832
  },
1326
1833
  set (value) {
1327
1834
  this.fovY = value.num[0];
1835
+ },
1836
+ isHidden () {
1837
+ return this.projectionMode === 'physical';
1838
+ }
1839
+ },
1840
+ {
1841
+ name: 'FocalLength',
1842
+ description: 'Physical focal length in millimeters',
1843
+ type: 'float',
1844
+ default: 50,
1845
+ options: {
1846
+ minValue: 0.1,
1847
+ maxValue: 2000,
1848
+ animatable: true
1849
+ },
1850
+ get (value) {
1851
+ value.num[0] = this.focalLengthMm;
1852
+ },
1853
+ set (value) {
1854
+ this.focalLengthMm = value.num[0];
1855
+ },
1856
+ isHidden () {
1857
+ return this.projectionMode !== 'physical';
1858
+ }
1859
+ },
1860
+ {
1861
+ name: 'SensorWidth',
1862
+ description: 'Physical sensor width in millimeters',
1863
+ type: 'float',
1864
+ default: 36,
1865
+ options: {
1866
+ minValue: 0.1,
1867
+ maxValue: 200,
1868
+ animatable: true
1869
+ },
1870
+ get (value) {
1871
+ value.num[0] = this.sensorWidthMm;
1872
+ },
1873
+ set (value) {
1874
+ this.sensorWidthMm = value.num[0];
1875
+ },
1876
+ isHidden () {
1877
+ return this.projectionMode !== 'physical';
1878
+ }
1879
+ },
1880
+ {
1881
+ name: 'SensorHeight',
1882
+ description: 'Physical sensor height in millimeters',
1883
+ type: 'float',
1884
+ default: 24,
1885
+ options: {
1886
+ minValue: 0.1,
1887
+ maxValue: 200,
1888
+ animatable: true
1889
+ },
1890
+ get (value) {
1891
+ value.num[0] = this.sensorHeightMm;
1892
+ },
1893
+ set (value) {
1894
+ this.sensorHeightMm = value.num[0];
1895
+ },
1896
+ isHidden () {
1897
+ return this.projectionMode !== 'physical';
1898
+ }
1899
+ },
1900
+ {
1901
+ name: 'SensorFit',
1902
+ type: 'string',
1903
+ default: 'horizontal',
1904
+ options: {
1905
+ enum: {
1906
+ labels: [
1907
+ 'Horizontal',
1908
+ 'Vertical'
1909
+ ],
1910
+ values: [
1911
+ 'horizontal',
1912
+ 'vertical'
1913
+ ]
1914
+ }
1915
+ },
1916
+ get (value) {
1917
+ value.str[0] = this.sensorFit;
1918
+ },
1919
+ set (value) {
1920
+ this.sensorFit = value.str[0];
1921
+ },
1922
+ isHidden () {
1923
+ return this.projectionMode !== 'physical';
1328
1924
  }
1329
1925
  },
1330
1926
  {