@luma.gl/shadertools 9.0.21 → 9.0.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.
package/dist/dist.dev.js CHANGED
@@ -5433,7 +5433,7 @@ vec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 positio
5433
5433
  if (uniforms.specularColor) {
5434
5434
  uniforms.specularColor = uniforms.specularColor.map((x) => x / 255);
5435
5435
  }
5436
- return { ...gouraudMaterial.defaultUniforms, ...props };
5436
+ return { ...gouraudMaterial.defaultUniforms, ...uniforms };
5437
5437
  }
5438
5438
  };
5439
5439
 
@@ -5464,7 +5464,7 @@ vec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 positio
5464
5464
  if (uniforms.specularColor) {
5465
5465
  uniforms.specularColor = uniforms.specularColor.map((x) => x / 255);
5466
5466
  }
5467
- return { ...phongMaterial.defaultUniforms, ...props };
5467
+ return { ...phongMaterial.defaultUniforms, ...uniforms };
5468
5468
  }
5469
5469
  };
5470
5470
 
package/dist/dist.min.js CHANGED
@@ -416,7 +416,7 @@ lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction,
416
416
  }
417
417
  return lightColor;
418
418
  }
419
- `;var Zt={name:"gouraudMaterial",vs:We.replace("phongMaterial","gouraudMaterial"),fs:Ge.replace("phongMaterial","gouraudMaterial"),defines:{LIGHTING_VERTEX:1},dependencies:[Q],uniformTypes:{ambient:"f32",diffuse:"f32",shininess:"f32",specularColor:"vec3<f32>"},defaultUniforms:{ambient:.35,diffuse:.6,shininess:32,specularColor:[.15,.15,.15]},getUniforms(n){let e={...n};return e.specularColor&&(e.specularColor=e.specularColor.map(t=>t/255)),{...Zt.defaultUniforms,...n}}};var Jt={name:"phongMaterial",vs:Ge,fs:We,defines:{LIGHTING_FRAGMENT:1},dependencies:[Q],uniformTypes:{ambient:"f32",diffuse:"f32",shininess:"f32",specularColor:"vec3<f32>"},defaultUniforms:{ambient:.35,diffuse:.6,shininess:32,specularColor:[.15,.15,.15]},getUniforms(n){let e={...n};return e.specularColor&&(e.specularColor=e.specularColor.map(t=>t/255)),{...Jt.defaultUniforms,...n}}};var $n=`uniform projection {
419
+ `;var Zt={name:"gouraudMaterial",vs:We.replace("phongMaterial","gouraudMaterial"),fs:Ge.replace("phongMaterial","gouraudMaterial"),defines:{LIGHTING_VERTEX:1},dependencies:[Q],uniformTypes:{ambient:"f32",diffuse:"f32",shininess:"f32",specularColor:"vec3<f32>"},defaultUniforms:{ambient:.35,diffuse:.6,shininess:32,specularColor:[.15,.15,.15]},getUniforms(n){let e={...n};return e.specularColor&&(e.specularColor=e.specularColor.map(t=>t/255)),{...Zt.defaultUniforms,...e}}};var Jt={name:"phongMaterial",vs:Ge,fs:We,defines:{LIGHTING_FRAGMENT:1},dependencies:[Q],uniformTypes:{ambient:"f32",diffuse:"f32",shininess:"f32",specularColor:"vec3<f32>"},defaultUniforms:{ambient:.35,diffuse:.6,shininess:32,specularColor:[.15,.15,.15]},getUniforms(n){let e={...n};return e.specularColor&&(e.specularColor=e.specularColor.map(t=>t/255)),{...Jt.defaultUniforms,...e}}};var $n=`uniform projection {
420
420
  mat4 u_MVPMatrix;
421
421
  mat4 u_ModelMatrix;
422
422
  mat4 u_NormalMatrix;
package/dist/index.cjs CHANGED
@@ -1820,7 +1820,7 @@ var gouraudMaterial = {
1820
1820
  if (uniforms.specularColor) {
1821
1821
  uniforms.specularColor = uniforms.specularColor.map((x) => x / 255);
1822
1822
  }
1823
- return { ...gouraudMaterial.defaultUniforms, ...props };
1823
+ return { ...gouraudMaterial.defaultUniforms, ...uniforms };
1824
1824
  }
1825
1825
  };
1826
1826
 
@@ -1851,7 +1851,7 @@ var phongMaterial = {
1851
1851
  if (uniforms.specularColor) {
1852
1852
  uniforms.specularColor = uniforms.specularColor.map((x) => x / 255);
1853
1853
  }
1854
- return { ...phongMaterial.defaultUniforms, ...props };
1854
+ return { ...phongMaterial.defaultUniforms, ...uniforms };
1855
1855
  }
1856
1856
  };
1857
1857