@babylonjs/materials 6.7.0 → 6.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/materials",
3
- "version": "6.7.0",
3
+ "version": "6.8.0",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "postcompile": "build-tools -c add-js-to-es6"
19
19
  },
20
20
  "devDependencies": {
21
- "@babylonjs/core": "^6.7.0",
21
+ "@babylonjs/core": "^6.8.0",
22
22
  "@dev/build-tools": "^1.0.0",
23
23
  "@lts/materials": "^1.0.0",
24
24
  "rimraf": "^3.0.2",
@@ -53,9 +53,7 @@ vTextureUVZ=worldPos.xy/tileSize;
53
53
  #ifdef NORMAL
54
54
  vec3 xtan=vec3(0,0,1);
55
55
  normalWorld=transposeMat3(inverseMat3(normalWorld));
56
- worldTangent=(normalWorld*worldTangent).xyz;
57
- worldTangent=normalize(worldTangent);
58
- tangentSpace[0]=worldTangent;
56
+ worldTangent=normalize((normalWorld*worldTangent).xyz);
59
57
  #include<clipPlaneVertex>
60
58
  #include<fogVertex>
61
59
  #include<shadowsVertex>[0..maxSimultaneousLights]
@@ -1 +1 @@
1
- {"version":3,"file":"triplanar.vertex.js","sourceRoot":"","sources":["../../../../lts/materials/generated/triPlanar/triplanar.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,+CAAiC;AACvD,mEAAqD;AACrD,oEAAsD;AACtD,mFAAqE;AACrE,wEAA0D;AAC1D,8EAAgE;AAChE,wEAA0D;AAC1D,4EAA8D;AAC9D,uEAAyD;AACzD,mEAAqD;AACrD,+DAAiD;AACjD,wEAA0D;AAC1D,mEAAqD;AACrD,6DAA+C;AAC/C,iEAAmD;AACnD,qEAAuD;AAEvD,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Fd,CAAC;AACF,aAAa;AACb,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC,gBAAgB;AAChB,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport \"core/Shaders/ShadersInclude/helperFunctions\";\nimport \"core/Shaders/ShadersInclude/bonesDeclaration\";\nimport \"core/Shaders/ShadersInclude/bakedVertexAnimationDeclaration\";\nimport \"core/Shaders/ShadersInclude/instancesDeclaration\";\nimport \"core/Shaders/ShadersInclude/clipPlaneVertexDeclaration\";\nimport \"core/Shaders/ShadersInclude/fogVertexDeclaration\";\nimport \"core/Shaders/ShadersInclude/lightFragmentDeclaration\";\nimport \"core/Shaders/ShadersInclude/lightUboDeclaration\";\nimport \"core/Shaders/ShadersInclude/instancesVertex\";\nimport \"core/Shaders/ShadersInclude/bonesVertex\";\nimport \"core/Shaders/ShadersInclude/bakedVertexAnimation\";\nimport \"core/Shaders/ShadersInclude/clipPlaneVertex\";\nimport \"core/Shaders/ShadersInclude/fogVertex\";\nimport \"core/Shaders/ShadersInclude/shadowsVertex\";\nimport \"core/Shaders/ShadersInclude/vertexColorMixing\";\n\nconst name = \"triplanarVertexShader\";\nconst shader = `precision highp float;\rattribute vec3 position;\r#ifdef NORMAL\nattribute vec3 normal;\r#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\r#endif\n#include<helperFunctions>\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\nuniform mat4 view;\runiform mat4 viewProjection;\r#ifdef DIFFUSEX\nvarying vec2 vTextureUVX;\r#endif\n#ifdef DIFFUSEY\nvarying vec2 vTextureUVY;\r#endif\n#ifdef DIFFUSEZ\nvarying vec2 vTextureUVZ;\r#endif\nuniform float tileSize;\r#ifdef POINTSIZE\nuniform float pointSize;\r#endif\nvarying vec3 vPositionW;\r#ifdef NORMAL\nvarying mat3 tangentSpace;\r#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\r#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void)\r{\r#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(position,1.0);\rgl_Position=viewProjection*worldPos;\rvPositionW=vec3(worldPos);\r#ifdef DIFFUSEX\nvTextureUVX=worldPos.zy/tileSize;\r#endif\n#ifdef DIFFUSEY\nvTextureUVY=worldPos.xz/tileSize;\r#endif\n#ifdef DIFFUSEZ\nvTextureUVZ=worldPos.xy/tileSize;\r#endif\n#ifdef NORMAL\nvec3 xtan=vec3(0,0,1);\rvec3 xbin=vec3(0,1,0);\rvec3 ytan=vec3(1,0,0);\rvec3 ybin=vec3(0,0,1);\rvec3 ztan=vec3(1,0,0);\rvec3 zbin=vec3(0,1,0);\rvec3 normalizedNormal=normalize(normal);\rnormalizedNormal*=normalizedNormal;\rvec3 worldBinormal=normalize(xbin*normalizedNormal.x+ybin*normalizedNormal.y+zbin*normalizedNormal.z);\rvec3 worldTangent=normalize(xtan*normalizedNormal.x+ytan*normalizedNormal.y+ztan*normalizedNormal.z);\rmat3 normalWorld=mat3(world);\r#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\r#endif\nworldTangent=(normalWorld*worldTangent).xyz;\rworldBinormal=(normalWorld*worldBinormal).xyz;\rvec3 worldNormal=(normalWorld*normalize(normal)).xyz;\r#ifdef NONUNIFORMSCALING\nworldTangent=normalize(worldTangent);\rworldBinormal=normalize(worldBinormal);\rworldNormal=normalize(worldNormal);\r#endif\ntangentSpace[0]=worldTangent;\rtangentSpace[1]=worldBinormal;\rtangentSpace[2]=worldNormal;\r#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#include<vertexColorMixing>\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\r#endif\n#define CUSTOM_VERTEX_MAIN_END\n}\r`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const triplanarVertexShader = { name, shader };\n"]}
1
+ {"version":3,"file":"triplanar.vertex.js","sourceRoot":"","sources":["../../../../lts/materials/generated/triPlanar/triplanar.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,+CAAiC;AACvD,mEAAqD;AACrD,oEAAsD;AACtD,mFAAqE;AACrE,wEAA0D;AAC1D,8EAAgE;AAChE,wEAA0D;AAC1D,4EAA8D;AAC9D,uEAAyD;AACzD,mEAAqD;AACrD,+DAAiD;AACjD,wEAA0D;AAC1D,mEAAqD;AACrD,6DAA+C;AAC/C,iEAAmD;AACnD,qEAAuD;AAEvD,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuFd,CAAC;AACF,aAAa;AACb,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC,gBAAgB;AAChB,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport \"core/Shaders/ShadersInclude/helperFunctions\";\nimport \"core/Shaders/ShadersInclude/bonesDeclaration\";\nimport \"core/Shaders/ShadersInclude/bakedVertexAnimationDeclaration\";\nimport \"core/Shaders/ShadersInclude/instancesDeclaration\";\nimport \"core/Shaders/ShadersInclude/clipPlaneVertexDeclaration\";\nimport \"core/Shaders/ShadersInclude/fogVertexDeclaration\";\nimport \"core/Shaders/ShadersInclude/lightFragmentDeclaration\";\nimport \"core/Shaders/ShadersInclude/lightUboDeclaration\";\nimport \"core/Shaders/ShadersInclude/instancesVertex\";\nimport \"core/Shaders/ShadersInclude/bonesVertex\";\nimport \"core/Shaders/ShadersInclude/bakedVertexAnimation\";\nimport \"core/Shaders/ShadersInclude/clipPlaneVertex\";\nimport \"core/Shaders/ShadersInclude/fogVertex\";\nimport \"core/Shaders/ShadersInclude/shadowsVertex\";\nimport \"core/Shaders/ShadersInclude/vertexColorMixing\";\n\nconst name = \"triplanarVertexShader\";\nconst shader = `precision highp float;\rattribute vec3 position;\r#ifdef NORMAL\nattribute vec3 normal;\r#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\r#endif\n#include<helperFunctions>\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\nuniform mat4 view;\runiform mat4 viewProjection;\r#ifdef DIFFUSEX\nvarying vec2 vTextureUVX;\r#endif\n#ifdef DIFFUSEY\nvarying vec2 vTextureUVY;\r#endif\n#ifdef DIFFUSEZ\nvarying vec2 vTextureUVZ;\r#endif\nuniform float tileSize;\r#ifdef POINTSIZE\nuniform float pointSize;\r#endif\nvarying vec3 vPositionW;\r#ifdef NORMAL\nvarying mat3 tangentSpace;\r#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\r#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void)\r{\r#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(position,1.0);\rgl_Position=viewProjection*worldPos;\rvPositionW=vec3(worldPos);\r#ifdef DIFFUSEX\nvTextureUVX=worldPos.zy/tileSize;\r#endif\n#ifdef DIFFUSEY\nvTextureUVY=worldPos.xz/tileSize;\r#endif\n#ifdef DIFFUSEZ\nvTextureUVZ=worldPos.xy/tileSize;\r#endif\n#ifdef NORMAL\nvec3 xtan=vec3(0,0,1);\rvec3 xbin=vec3(0,1,0);\rvec3 ytan=vec3(1,0,0);\rvec3 ybin=vec3(0,0,1);\rvec3 ztan=vec3(1,0,0);\rvec3 zbin=vec3(0,1,0);\rvec3 normalizedNormal=normalize(normal);\rnormalizedNormal*=normalizedNormal;\rvec3 worldBinormal=normalize(xbin*normalizedNormal.x+ybin*normalizedNormal.y+zbin*normalizedNormal.z);\rvec3 worldTangent=normalize(xtan*normalizedNormal.x+ytan*normalizedNormal.y+ztan*normalizedNormal.z);\rmat3 normalWorld=mat3(world);\r#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\r#endif\nworldTangent=normalize((normalWorld*worldTangent).xyz);\rworldBinormal=normalize((normalWorld*worldBinormal).xyz);\rvec3 worldNormal=normalize((normalWorld*normalize(normal)).xyz);\rtangentSpace[0]=worldTangent;\rtangentSpace[1]=worldBinormal;\rtangentSpace[2]=worldNormal;\r#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#include<vertexColorMixing>\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\r#endif\n#define CUSTOM_VERTEX_MAIN_END\n}\r`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const triplanarVertexShader = { name, shader };\n"]}