@luma.gl/shaders 10.0.0-alpha.10 → 10.0.0-alpha.11

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 (89) hide show
  1. package/dist/dist.dev.js +1776 -58
  2. package/dist/dist.min.js +1394 -147
  3. package/dist/index.cjs +35 -0
  4. package/dist/index.cjs.map +3 -3
  5. package/dist/index.d.ts +17 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +9 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/modules/lighting/clustered-light-grid/clustered-light-grid.cjs +40 -0
  10. package/dist/modules/lighting/clustered-light-grid/clustered-light-grid.d.ts +6 -0
  11. package/dist/modules/lighting/clustered-light-grid/clustered-light-grid.d.ts.map +1 -0
  12. package/dist/modules/lighting/clustered-light-grid/clustered-light-grid.js +15 -0
  13. package/dist/modules/lighting/clustered-light-grid/clustered-light-grid.js.map +1 -0
  14. package/dist/modules/lighting/contact-shadow/contact-shadow.cjs +348 -0
  15. package/dist/modules/lighting/contact-shadow/contact-shadow.d.ts +188 -0
  16. package/dist/modules/lighting/contact-shadow/contact-shadow.d.ts.map +1 -0
  17. package/dist/modules/lighting/contact-shadow/contact-shadow.js +307 -0
  18. package/dist/modules/lighting/contact-shadow/contact-shadow.js.map +1 -0
  19. package/dist/modules/lighting/pbr-ambient-occlusion/pbr-ambient-occlusion.cjs +87 -0
  20. package/dist/modules/lighting/pbr-ambient-occlusion/pbr-ambient-occlusion.d.ts +21 -0
  21. package/dist/modules/lighting/pbr-ambient-occlusion/pbr-ambient-occlusion.d.ts.map +1 -0
  22. package/dist/modules/lighting/pbr-ambient-occlusion/pbr-ambient-occlusion.js +61 -0
  23. package/dist/modules/lighting/pbr-ambient-occlusion/pbr-ambient-occlusion.js.map +1 -0
  24. package/dist/modules/lighting/pbr-contact-shadow/pbr-contact-shadow.cjs +87 -0
  25. package/dist/modules/lighting/pbr-contact-shadow/pbr-contact-shadow.d.ts +21 -0
  26. package/dist/modules/lighting/pbr-contact-shadow/pbr-contact-shadow.d.ts.map +1 -0
  27. package/dist/modules/lighting/pbr-contact-shadow/pbr-contact-shadow.js +61 -0
  28. package/dist/modules/lighting/pbr-contact-shadow/pbr-contact-shadow.js.map +1 -0
  29. package/dist/modules/lighting/pbr-material/pbr-material-glsl.cjs +33 -11
  30. package/dist/modules/lighting/pbr-material/pbr-material-glsl.d.ts +2 -2
  31. package/dist/modules/lighting/pbr-material/pbr-material-glsl.d.ts.map +1 -1
  32. package/dist/modules/lighting/pbr-material/pbr-material-glsl.js +33 -11
  33. package/dist/modules/lighting/pbr-material/pbr-material-glsl.js.map +1 -1
  34. package/dist/modules/lighting/pbr-material/pbr-material-wgsl.cjs +33 -11
  35. package/dist/modules/lighting/pbr-material/pbr-material-wgsl.d.ts +1 -1
  36. package/dist/modules/lighting/pbr-material/pbr-material-wgsl.d.ts.map +1 -1
  37. package/dist/modules/lighting/pbr-material/pbr-material-wgsl.js +33 -11
  38. package/dist/modules/lighting/pbr-material/pbr-material-wgsl.js.map +1 -1
  39. package/dist/modules/lighting/pbr-material/pbr-material.d.ts +3 -3
  40. package/dist/modules/lighting/pbr-shadow/pbr-shadow.cjs +97 -0
  41. package/dist/modules/lighting/pbr-shadow/pbr-shadow.d.ts +15 -0
  42. package/dist/modules/lighting/pbr-shadow/pbr-shadow.d.ts.map +1 -0
  43. package/dist/modules/lighting/pbr-shadow/pbr-shadow.js +69 -0
  44. package/dist/modules/lighting/pbr-shadow/pbr-shadow.js.map +1 -0
  45. package/dist/modules/lighting/pbr-surface/pbr-surface.cjs +114 -0
  46. package/dist/modules/lighting/pbr-surface/pbr-surface.d.ts +15 -0
  47. package/dist/modules/lighting/pbr-surface/pbr-surface.d.ts.map +1 -0
  48. package/dist/modules/lighting/pbr-surface/pbr-surface.js +88 -0
  49. package/dist/modules/lighting/pbr-surface/pbr-surface.js.map +1 -0
  50. package/dist/modules/lighting/prefiltered-environment/prefiltered-environment.cjs +379 -0
  51. package/dist/modules/lighting/prefiltered-environment/prefiltered-environment.d.ts +41 -0
  52. package/dist/modules/lighting/prefiltered-environment/prefiltered-environment.d.ts.map +1 -0
  53. package/dist/modules/lighting/prefiltered-environment/prefiltered-environment.js +345 -0
  54. package/dist/modules/lighting/prefiltered-environment/prefiltered-environment.js.map +1 -0
  55. package/dist/modules/lighting/shadow/shadow-glsl.cjs +228 -0
  56. package/dist/modules/lighting/shadow/shadow-glsl.d.ts +3 -0
  57. package/dist/modules/lighting/shadow/shadow-glsl.d.ts.map +1 -0
  58. package/dist/modules/lighting/shadow/shadow-glsl.js +204 -0
  59. package/dist/modules/lighting/shadow/shadow-glsl.js.map +1 -0
  60. package/dist/modules/lighting/shadow/shadow-types.cjs +15 -0
  61. package/dist/modules/lighting/shadow/shadow-types.d.ts +63 -0
  62. package/dist/modules/lighting/shadow/shadow-types.d.ts.map +1 -0
  63. package/dist/modules/lighting/shadow/shadow-types.js +5 -0
  64. package/dist/modules/lighting/shadow/shadow-types.js.map +1 -0
  65. package/dist/modules/lighting/shadow/shadow.cjs +458 -0
  66. package/dist/modules/lighting/shadow/shadow.d.ts +117 -0
  67. package/dist/modules/lighting/shadow/shadow.d.ts.map +1 -0
  68. package/dist/modules/lighting/shadow/shadow.js +450 -0
  69. package/dist/modules/lighting/shadow/shadow.js.map +1 -0
  70. package/dist/modules/lighting/unlit-material/unlit-material.cjs +60 -0
  71. package/dist/modules/lighting/unlit-material/unlit-material.d.ts +9 -0
  72. package/dist/modules/lighting/unlit-material/unlit-material.d.ts.map +1 -0
  73. package/dist/modules/lighting/unlit-material/unlit-material.js +40 -0
  74. package/dist/modules/lighting/unlit-material/unlit-material.js.map +1 -0
  75. package/package.json +3 -3
  76. package/src/index.ts +48 -0
  77. package/src/modules/lighting/clustered-light-grid/clustered-light-grid.ts +17 -0
  78. package/src/modules/lighting/contact-shadow/contact-shadow.ts +365 -0
  79. package/src/modules/lighting/pbr-ambient-occlusion/pbr-ambient-occlusion.ts +78 -0
  80. package/src/modules/lighting/pbr-contact-shadow/pbr-contact-shadow.ts +78 -0
  81. package/src/modules/lighting/pbr-material/pbr-material-glsl.ts +33 -11
  82. package/src/modules/lighting/pbr-material/pbr-material-wgsl.ts +33 -11
  83. package/src/modules/lighting/pbr-shadow/pbr-shadow.ts +85 -0
  84. package/src/modules/lighting/pbr-surface/pbr-surface.ts +103 -0
  85. package/src/modules/lighting/prefiltered-environment/prefiltered-environment.ts +370 -0
  86. package/src/modules/lighting/shadow/shadow-glsl.ts +204 -0
  87. package/src/modules/lighting/shadow/shadow-types.ts +68 -0
  88. package/src/modules/lighting/shadow/shadow.ts +536 -0
  89. package/src/modules/lighting/unlit-material/unlit-material.ts +44 -0
package/dist/index.cjs CHANGED
@@ -18,6 +18,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
18
18
  var dist_exports = {};
19
19
  __export(dist_exports, {
20
20
  GLSLShaderAssembler: () => import_shader_assembler.GLSLShaderAssembler,
21
+ PBR_ENVIRONMENT_FRAGMENT_GLSL: () => import_prefiltered_environment.PBR_ENVIRONMENT_FRAGMENT_GLSL,
22
+ PBR_ENVIRONMENT_FRAGMENT_WGSL: () => import_prefiltered_environment.PBR_ENVIRONMENT_FRAGMENT_WGSL,
21
23
  PBR_TONE_MAP_MODE: () => import_pbr_scene.PBR_TONE_MAP_MODE,
22
24
  SKIN_MAX_JOINTS: () => import_skin.SKIN_MAX_JOINTS,
23
25
  STORAGE_COLOR_DEFAULT_BYTE_STRIDES: () => import_float_colors.STORAGE_COLOR_DEFAULT_BYTE_STRIDES,
@@ -33,8 +35,12 @@ __export(dist_exports, {
33
35
  checkShaderModuleDeprecations: () => import_shader_module3.checkShaderModuleDeprecations,
34
36
  clipShaderPlugin: () => import_clip.clipShaderPlugin,
35
37
  clouds: () => import_clouds.clouds,
38
+ clusteredLightGrid: () => import_clustered_light_grid.clusteredLightGrid,
36
39
  colors: () => import_float_colors.colors,
37
40
  combineInjects: () => import_shader_injections.combineInjects,
41
+ contactShadowBilateralBlur: () => import_contact_shadow.contactShadowBilateralBlur,
42
+ contactShadowComposite: () => import_contact_shadow.contactShadowComposite,
43
+ contactShadowTrace: () => import_contact_shadow.contactShadowTrace,
38
44
  convertToVec4: () => import_shader_utils.convertToVec4,
39
45
  dggs: () => import_dggs.dggs,
40
46
  dirlight: () => import_dirlight.dirlight,
@@ -75,8 +81,13 @@ __export(dist_exports, {
75
81
  normalizeByteColor4: () => import_normalize_byte_colors.normalizeByteColor4,
76
82
  pathDash: () => import_path_dash.pathDash,
77
83
  patternFill: () => import_pattern_fill.patternFill,
84
+ pbrAmbientOcclusion: () => import_pbr_ambient_occlusion.pbrAmbientOcclusion,
85
+ pbrContactShadow: () => import_pbr_contact_shadow.pbrContactShadow,
86
+ pbrEnvironmentFilter: () => import_prefiltered_environment.pbrEnvironmentFilter,
78
87
  pbrMaterial: () => import_pbr_material.pbrMaterial,
79
88
  pbrScene: () => import_pbr_scene.pbrScene,
89
+ pbrShadow: () => import_pbr_shadow.pbrShadow,
90
+ pbrSurface: () => import_pbr_surface.pbrSurface,
80
91
  phongMaterial: () => import_phong_material.phongMaterial,
81
92
  picking: () => import_picking.picking,
82
93
  pointGlow: () => import_point_glow.pointGlow,
@@ -87,6 +98,7 @@ __export(dist_exports, {
87
98
  resolveUseByteColors: () => import_normalize_byte_colors.resolveUseByteColors,
88
99
  riverWaterMaterial: () => import_river_water_material.riverWaterMaterial,
89
100
  scanWGSLInterface: () => import_wgsl_interface_scan.scanWGSLInterface,
101
+ shadow: () => import_shadow.shadow,
90
102
  sketchStroke: () => import_sketch_stroke.sketchStroke,
91
103
  skin: () => import_skin.skin,
92
104
  storageColors: () => import_float_colors.storageColors,
@@ -94,6 +106,7 @@ __export(dist_exports, {
94
106
  toHalfFloat: () => import_fp16_utils.toHalfFloat,
95
107
  typeToChannelCount: () => import_shader_utils.typeToChannelCount,
96
108
  typeToChannelSuffix: () => import_shader_utils.typeToChannelSuffix,
109
+ unlitMaterial: () => import_unlit_material.unlitMaterial,
97
110
  validateShaderModuleUniformLayout: () => import_shader_module_uniform_layout.validateShaderModuleUniformLayout,
98
111
  valueNoise: () => import_value_noise.valueNoise,
99
112
  volumeRaymarch: () => import_volume_raymarch.volumeRaymarch,
@@ -137,6 +150,7 @@ var import_gpu_animation = require("./modules/engine/gpu-animation/gpu-animation
137
150
  var import_lighting = require("./modules/lighting/lights/lighting.cjs");
138
151
  var import_ibl = require("./modules/lighting/ibl/ibl.cjs");
139
152
  var import_dirlight = require("./modules/lighting/no-material/dirlight.cjs");
153
+ var import_unlit_material = require("./modules/lighting/unlit-material/unlit-material.cjs");
140
154
  var import_lambert_material = require("./modules/lighting/lambert-material/lambert-material.cjs");
141
155
  var import_gouraud_material = require("./modules/lighting/gouraud-material/gouraud-material.cjs");
142
156
  var import_phong_material = require("./modules/lighting/phong-material/phong-material.cjs");
@@ -156,9 +170,19 @@ var import_surface_weather = require("./modules/lighting/surface-weather/surface
156
170
  var import_firefly = require("./modules/lighting/firefly/firefly.cjs");
157
171
  var import_globe_clouds = require("./modules/lighting/globe-clouds/globe-clouds.cjs");
158
172
  var import_area_lighting = require("./modules/lighting/area-lighting/area-lighting.cjs");
173
+ var import_prefiltered_environment = require("./modules/lighting/prefiltered-environment/prefiltered-environment.cjs");
174
+ var import_shadow = require("./modules/lighting/shadow/shadow.cjs");
175
+ var import_pbr_shadow = require("./modules/lighting/pbr-shadow/pbr-shadow.cjs");
176
+ var import_pbr_surface = require("./modules/lighting/pbr-surface/pbr-surface.cjs");
177
+ var import_contact_shadow = require("./modules/lighting/contact-shadow/contact-shadow.cjs");
178
+ var import_pbr_contact_shadow = require("./modules/lighting/pbr-contact-shadow/pbr-contact-shadow.cjs");
179
+ var import_clustered_light_grid = require("./modules/lighting/clustered-light-grid/clustered-light-grid.cjs");
180
+ var import_pbr_ambient_occlusion = require("./modules/lighting/pbr-ambient-occlusion/pbr-ambient-occlusion.cjs");
159
181
  // Annotate the CommonJS export names for ESM import in node:
160
182
  0 && (module.exports = {
161
183
  GLSLShaderAssembler,
184
+ PBR_ENVIRONMENT_FRAGMENT_GLSL,
185
+ PBR_ENVIRONMENT_FRAGMENT_WGSL,
162
186
  PBR_TONE_MAP_MODE,
163
187
  SKIN_MAX_JOINTS,
164
188
  STORAGE_COLOR_DEFAULT_BYTE_STRIDES,
@@ -174,8 +198,12 @@ var import_area_lighting = require("./modules/lighting/area-lighting/area-lighti
174
198
  checkShaderModuleDeprecations,
175
199
  clipShaderPlugin,
176
200
  clouds,
201
+ clusteredLightGrid,
177
202
  colors,
178
203
  combineInjects,
204
+ contactShadowBilateralBlur,
205
+ contactShadowComposite,
206
+ contactShadowTrace,
179
207
  convertToVec4,
180
208
  dggs,
181
209
  dirlight,
@@ -216,8 +244,13 @@ var import_area_lighting = require("./modules/lighting/area-lighting/area-lighti
216
244
  normalizeByteColor4,
217
245
  pathDash,
218
246
  patternFill,
247
+ pbrAmbientOcclusion,
248
+ pbrContactShadow,
249
+ pbrEnvironmentFilter,
219
250
  pbrMaterial,
220
251
  pbrScene,
252
+ pbrShadow,
253
+ pbrSurface,
221
254
  phongMaterial,
222
255
  picking,
223
256
  pointGlow,
@@ -228,6 +261,7 @@ var import_area_lighting = require("./modules/lighting/area-lighting/area-lighti
228
261
  resolveUseByteColors,
229
262
  riverWaterMaterial,
230
263
  scanWGSLInterface,
264
+ shadow,
231
265
  sketchStroke,
232
266
  skin,
233
267
  storageColors,
@@ -235,6 +269,7 @@ var import_area_lighting = require("./modules/lighting/area-lighting/area-lighti
235
269
  toHalfFloat,
236
270
  typeToChannelCount,
237
271
  typeToChannelSuffix,
272
+ unlitMaterial,
238
273
  validateShaderModuleUniformLayout,
239
274
  valueNoise,
240
275
  volumeRaymarch,