@babylonjs/materials 5.0.0-rc.5 → 5.0.0-rc.9
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/cell/cell.fragment.d.ts +17 -17
- package/cell/cell.fragment.js +20 -20
- package/cell/cell.vertex.d.ts +18 -18
- package/cell/cell.vertex.js +21 -21
- package/cell/cellMaterial.d.ts +37 -37
- package/cell/cellMaterial.js +304 -304
- package/cell/index.d.ts +1 -1
- package/cell/index.js +1 -1
- package/custom/customMaterial.d.ts +69 -69
- package/custom/customMaterial.js +216 -216
- package/custom/index.d.ts +2 -2
- package/custom/index.js +2 -2
- package/custom/pbrCustomMaterial.d.ts +71 -71
- package/custom/pbrCustomMaterial.js +241 -241
- package/fire/fire.fragment.d.ts +11 -11
- package/fire/fire.fragment.js +14 -14
- package/fire/fire.vertex.d.ts +15 -15
- package/fire/fire.vertex.js +18 -18
- package/fire/fireMaterial.d.ts +38 -38
- package/fire/fireMaterial.js +342 -342
- package/fire/index.d.ts +1 -1
- package/fire/index.js +1 -1
- package/fur/fur.fragment.d.ts +17 -17
- package/fur/fur.fragment.js +20 -20
- package/fur/fur.vertex.d.ts +18 -18
- package/fur/fur.vertex.js +21 -21
- package/fur/furMaterial.d.ts +56 -56
- package/fur/furMaterial.js +500 -500
- package/fur/index.d.ts +1 -1
- package/fur/index.js +1 -1
- package/gradient/gradient.fragment.d.ts +17 -17
- package/gradient/gradient.fragment.js +20 -20
- package/gradient/gradient.vertex.d.ts +18 -18
- package/gradient/gradient.vertex.js +21 -21
- package/gradient/gradientMaterial.d.ts +37 -37
- package/gradient/gradientMaterial.js +275 -275
- package/gradient/index.d.ts +1 -1
- package/gradient/index.js +1 -1
- package/grid/grid.fragment.d.ts +8 -8
- package/grid/grid.fragment.js +11 -11
- package/grid/grid.vertex.d.ts +9 -9
- package/grid/grid.vertex.js +12 -12
- package/grid/gridMaterial.d.ts +77 -77
- package/grid/gridMaterial.js +276 -276
- package/grid/index.d.ts +1 -1
- package/grid/index.js +1 -1
- package/index.d.ts +15 -15
- package/index.js +15 -15
- package/lava/index.d.ts +1 -1
- package/lava/index.js +1 -1
- package/lava/lava.fragment.d.ts +17 -17
- package/lava/lava.fragment.js +20 -20
- package/lava/lava.vertex.d.ts +18 -18
- package/lava/lava.vertex.js +21 -21
- package/lava/lavaMaterial.d.ts +45 -45
- package/lava/lavaMaterial.js +394 -394
- package/legacy/legacy-cell.d.ts +1 -1
- package/legacy/legacy-cell.js +12 -12
- package/legacy/legacy-custom.d.ts +1 -1
- package/legacy/legacy-custom.js +12 -12
- package/legacy/legacy-fire.d.ts +1 -1
- package/legacy/legacy-fire.js +12 -12
- package/legacy/legacy-fur.d.ts +1 -1
- package/legacy/legacy-fur.js +12 -12
- package/legacy/legacy-gradient.d.ts +1 -1
- package/legacy/legacy-gradient.js +12 -12
- package/legacy/legacy-grid.d.ts +1 -1
- package/legacy/legacy-grid.js +12 -12
- package/legacy/legacy-lava.d.ts +1 -1
- package/legacy/legacy-lava.js +12 -12
- package/legacy/legacy-mix.d.ts +1 -1
- package/legacy/legacy-mix.js +12 -12
- package/legacy/legacy-normal.d.ts +1 -1
- package/legacy/legacy-normal.js +12 -12
- package/legacy/legacy-shadowOnly.d.ts +1 -1
- package/legacy/legacy-shadowOnly.js +12 -12
- package/legacy/legacy-simple.d.ts +1 -1
- package/legacy/legacy-simple.js +12 -12
- package/legacy/legacy-sky.d.ts +1 -1
- package/legacy/legacy-sky.js +12 -12
- package/legacy/legacy-terrain.d.ts +1 -1
- package/legacy/legacy-terrain.js +12 -12
- package/legacy/legacy-triPlanar.d.ts +1 -1
- package/legacy/legacy-triPlanar.js +12 -12
- package/legacy/legacy-water.d.ts +1 -1
- package/legacy/legacy-water.js +12 -12
- package/legacy/legacy.d.ts +1 -1
- package/legacy/legacy.js +15 -15
- package/mix/index.d.ts +1 -1
- package/mix/index.js +1 -1
- package/mix/mix.fragment.d.ts +17 -17
- package/mix/mix.fragment.js +20 -20
- package/mix/mix.vertex.d.ts +18 -18
- package/mix/mix.vertex.js +21 -21
- package/mix/mixMaterial.d.ts +65 -65
- package/mix/mixMaterial.js +510 -510
- package/normal/index.d.ts +1 -1
- package/normal/index.js +1 -1
- package/normal/normal.fragment.d.ts +17 -17
- package/normal/normal.fragment.js +20 -20
- package/normal/normal.vertex.d.ts +18 -18
- package/normal/normal.vertex.js +21 -21
- package/normal/normalMaterial.d.ts +36 -36
- package/normal/normalMaterial.js +336 -336
- package/package.json +2 -2
- package/shadowOnly/index.d.ts +1 -1
- package/shadowOnly/index.js +1 -1
- package/shadowOnly/shadowOnly.fragment.d.ts +16 -16
- package/shadowOnly/shadowOnly.fragment.js +19 -19
- package/shadowOnly/shadowOnly.vertex.d.ts +18 -18
- package/shadowOnly/shadowOnly.vertex.js +21 -21
- package/shadowOnly/shadowOnlyMaterial.d.ts +30 -30
- package/shadowOnly/shadowOnlyMaterial.js +254 -254
- package/simple/index.d.ts +1 -1
- package/simple/index.js +1 -1
- package/simple/simple.fragment.d.ts +17 -17
- package/simple/simple.fragment.js +20 -20
- package/simple/simple.vertex.d.ts +18 -18
- package/simple/simple.vertex.js +21 -21
- package/simple/simpleMaterial.d.ts +35 -35
- package/simple/simpleMaterial.js +295 -295
- package/sky/index.d.ts +1 -1
- package/sky/index.js +1 -1
- package/sky/sky.fragment.d.ts +10 -10
- package/sky/sky.fragment.js +13 -13
- package/sky/sky.vertex.d.ts +9 -9
- package/sky/sky.vertex.js +12 -12
- package/sky/skyMaterial.d.ts +146 -146
- package/sky/skyMaterial.js +359 -359
- package/terrain/index.d.ts +1 -1
- package/terrain/index.js +1 -1
- package/terrain/terrain.fragment.d.ts +17 -17
- package/terrain/terrain.fragment.js +20 -20
- package/terrain/terrain.vertex.d.ts +18 -18
- package/terrain/terrain.vertex.js +21 -21
- package/terrain/terrainMaterial.d.ts +50 -50
- package/terrain/terrainMaterial.js +426 -426
- package/triPlanar/index.d.ts +1 -1
- package/triPlanar/index.js +1 -1
- package/triPlanar/triPlanarMaterial.d.ts +49 -49
- package/triPlanar/triPlanarMaterial.js +403 -403
- package/triPlanar/triplanar.fragment.d.ts +17 -17
- package/triPlanar/triplanar.fragment.js +20 -20
- package/triPlanar/triplanar.vertex.d.ts +18 -18
- package/triPlanar/triplanar.vertex.js +21 -21
- package/water/index.d.ts +1 -1
- package/water/index.js +1 -1
- package/water/water.fragment.d.ts +19 -19
- package/water/water.fragment.js +22 -22
- package/water/water.vertex.d.ts +20 -20
- package/water/water.vertex.js +23 -23
- package/water/waterMaterial.d.ts +135 -135
- package/water/waterMaterial.js +736 -736
package/cell/cell.fragment.d.ts
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
import "@babylonjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
2
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
3
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
4
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightsFragmentFunctions.js";
|
5
|
-
import "@babylonjs/core/Shaders/ShadersInclude/shadowsFragmentFunctions.js";
|
6
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
7
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/depthPrePass.js";
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragment.js";
|
11
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
12
|
-
import "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
13
|
-
/** @hidden */
|
14
|
-
export declare const cellPixelShader: {
|
15
|
-
name: string;
|
16
|
-
shader: string;
|
17
|
-
};
|
1
|
+
import "@babylonjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
2
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
3
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
4
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightsFragmentFunctions.js";
|
5
|
+
import "@babylonjs/core/Shaders/ShadersInclude/shadowsFragmentFunctions.js";
|
6
|
+
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
7
|
+
import "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
8
|
+
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
9
|
+
import "@babylonjs/core/Shaders/ShadersInclude/depthPrePass.js";
|
10
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightFragment.js";
|
11
|
+
import "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
12
|
+
import "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
13
|
+
/** @hidden */
|
14
|
+
export declare const cellPixelShader: {
|
15
|
+
name: string;
|
16
|
+
shader: string;
|
17
|
+
};
|
package/cell/cell.fragment.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
// Do not edit.
|
2
|
-
import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
|
3
|
-
import "@babylonjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
4
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
5
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
6
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightsFragmentFunctions.js";
|
7
|
-
import "@babylonjs/core/Shaders/ShadersInclude/shadowsFragmentFunctions.js";
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
11
|
-
import "@babylonjs/core/Shaders/ShadersInclude/depthPrePass.js";
|
12
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragment.js";
|
13
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
14
|
-
import "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
15
|
-
var name = "cellPixelShader";
|
16
|
-
var shader = "precision highp float;\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include<helperFunctions>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include<lightsFragmentFunctions>\n#include<shadowsFragmentFunctions>\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include<clipPlaneFragmentDeclaration>\n#include<fogFragmentDeclaration>\nvec3 computeCustomDiffuseLighting(lightingInfo info,vec3 diffuseBase,float shadow)\n{\ndiffuseBase=info.diffuse*shadow;\n#ifdef CELLBASIC\nfloat level=1.0;\nif (info.ndl<0.5)\nlevel=0.5;\ndiffuseBase.rgb*vec3(level,level,level);\n#else\nfloat ToonThresholds[4];\nToonThresholds[0]=0.95;\nToonThresholds[1]=0.5;\nToonThresholds[2]=0.2;\nToonThresholds[3]=0.03;\nfloat ToonBrightnessLevels[5];\nToonBrightnessLevels[0]=1.0;\nToonBrightnessLevels[1]=0.8;\nToonBrightnessLevels[2]=0.6;\nToonBrightnessLevels[3]=0.35;\nToonBrightnessLevels[4]=0.2;\nif (info.ndl>ToonThresholds[0])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[0];\n}\nelse if (info.ndl>ToonThresholds[1])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[1];\n}\nelse if (info.ndl>ToonThresholds[2])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[2];\n}\nelse if (info.ndl>ToonThresholds[3])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[3];\n}\nelse\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[4];\n}\n#endif\nreturn max(diffuseBase,vec3(0.2));\n}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include<depthPrePass>\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\nlightingInfo info;\nvec3 diffuseBase=vec3(0.,0.,0.);\nfloat shadow=1.;\nfloat glossiness=0.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif \n#include<lightFragment>[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\nvec4 color=vec4(finalDiffuse,alpha);\n#include<fogFragment>\ngl_FragColor=color;\n#include<imageProcessingCompatibility>\n#define CUSTOM_FRAGMENT_MAIN_END\n}";
|
17
|
-
// Sideeffect
|
18
|
-
ShaderStore.ShadersStore[name] = shader;
|
19
|
-
/** @hidden */
|
20
|
-
export var cellPixelShader = { name: name, shader: shader };
|
1
|
+
// Do not edit.
|
2
|
+
import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
|
3
|
+
import "@babylonjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
4
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
5
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
6
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightsFragmentFunctions.js";
|
7
|
+
import "@babylonjs/core/Shaders/ShadersInclude/shadowsFragmentFunctions.js";
|
8
|
+
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
9
|
+
import "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
10
|
+
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
11
|
+
import "@babylonjs/core/Shaders/ShadersInclude/depthPrePass.js";
|
12
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightFragment.js";
|
13
|
+
import "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
14
|
+
import "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
15
|
+
var name = "cellPixelShader";
|
16
|
+
var shader = "precision highp float;\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include<helperFunctions>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include<lightsFragmentFunctions>\n#include<shadowsFragmentFunctions>\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include<clipPlaneFragmentDeclaration>\n#include<fogFragmentDeclaration>\nvec3 computeCustomDiffuseLighting(lightingInfo info,vec3 diffuseBase,float shadow)\n{\ndiffuseBase=info.diffuse*shadow;\n#ifdef CELLBASIC\nfloat level=1.0;\nif (info.ndl<0.5)\nlevel=0.5;\ndiffuseBase.rgb*vec3(level,level,level);\n#else\nfloat ToonThresholds[4];\nToonThresholds[0]=0.95;\nToonThresholds[1]=0.5;\nToonThresholds[2]=0.2;\nToonThresholds[3]=0.03;\nfloat ToonBrightnessLevels[5];\nToonBrightnessLevels[0]=1.0;\nToonBrightnessLevels[1]=0.8;\nToonBrightnessLevels[2]=0.6;\nToonBrightnessLevels[3]=0.35;\nToonBrightnessLevels[4]=0.2;\nif (info.ndl>ToonThresholds[0])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[0];\n}\nelse if (info.ndl>ToonThresholds[1])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[1];\n}\nelse if (info.ndl>ToonThresholds[2])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[2];\n}\nelse if (info.ndl>ToonThresholds[3])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[3];\n}\nelse\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[4];\n}\n#endif\nreturn max(diffuseBase,vec3(0.2));\n}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include<depthPrePass>\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\nlightingInfo info;\nvec3 diffuseBase=vec3(0.,0.,0.);\nfloat shadow=1.;\nfloat glossiness=0.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif \n#include<lightFragment>[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\nvec4 color=vec4(finalDiffuse,alpha);\n#include<fogFragment>\ngl_FragColor=color;\n#include<imageProcessingCompatibility>\n#define CUSTOM_FRAGMENT_MAIN_END\n}";
|
17
|
+
// Sideeffect
|
18
|
+
ShaderStore.ShadersStore[name] = shader;
|
19
|
+
/** @hidden */
|
20
|
+
export var cellPixelShader = { name: name, shader: shader };
|
21
21
|
//# sourceMappingURL=cell.fragment.js.map
|
package/cell/cell.vertex.d.ts
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bonesDeclaration.js";
|
2
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimationDeclaration.js";
|
3
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
|
4
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertexDeclaration.js";
|
5
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
6
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
7
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bonesVertex.js";
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimation.js";
|
11
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
12
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
13
|
-
import "@babylonjs/core/Shaders/ShadersInclude/shadowsVertex.js";
|
14
|
-
/** @hidden */
|
15
|
-
export declare const cellVertexShader: {
|
16
|
-
name: string;
|
17
|
-
shader: string;
|
18
|
-
};
|
1
|
+
import "@babylonjs/core/Shaders/ShadersInclude/bonesDeclaration.js";
|
2
|
+
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimationDeclaration.js";
|
3
|
+
import "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
|
4
|
+
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertexDeclaration.js";
|
5
|
+
import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
6
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
7
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
8
|
+
import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
9
|
+
import "@babylonjs/core/Shaders/ShadersInclude/bonesVertex.js";
|
10
|
+
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimation.js";
|
11
|
+
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
12
|
+
import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
13
|
+
import "@babylonjs/core/Shaders/ShadersInclude/shadowsVertex.js";
|
14
|
+
/** @hidden */
|
15
|
+
export declare const cellVertexShader: {
|
16
|
+
name: string;
|
17
|
+
shader: string;
|
18
|
+
};
|
package/cell/cell.vertex.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
// Do not edit.
|
2
|
-
import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
|
3
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bonesDeclaration.js";
|
4
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimationDeclaration.js";
|
5
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
|
6
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertexDeclaration.js";
|
7
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
11
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bonesVertex.js";
|
12
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimation.js";
|
13
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
14
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
15
|
-
import "@babylonjs/core/Shaders/ShadersInclude/shadowsVertex.js";
|
16
|
-
var name = "cellVertexShader";
|
17
|
-
var shader = "precision highp float;\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x==0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#ifdef VERTEXCOLOR\nvColor=color;\n#elif INSTANCESCOLOR\nvColor=instanceColor;\n#endif\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#define CUSTOM_VERTEX_MAIN_END\n}\n";
|
18
|
-
// Sideeffect
|
19
|
-
ShaderStore.ShadersStore[name] = shader;
|
20
|
-
/** @hidden */
|
21
|
-
export var cellVertexShader = { name: name, shader: shader };
|
1
|
+
// Do not edit.
|
2
|
+
import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
|
3
|
+
import "@babylonjs/core/Shaders/ShadersInclude/bonesDeclaration.js";
|
4
|
+
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimationDeclaration.js";
|
5
|
+
import "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
|
6
|
+
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertexDeclaration.js";
|
7
|
+
import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
8
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
9
|
+
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
10
|
+
import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
11
|
+
import "@babylonjs/core/Shaders/ShadersInclude/bonesVertex.js";
|
12
|
+
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimation.js";
|
13
|
+
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
14
|
+
import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
15
|
+
import "@babylonjs/core/Shaders/ShadersInclude/shadowsVertex.js";
|
16
|
+
var name = "cellVertexShader";
|
17
|
+
var shader = "precision highp float;\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x==0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#ifdef VERTEXCOLOR\nvColor=color;\n#elif INSTANCESCOLOR\nvColor=instanceColor;\n#endif\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#define CUSTOM_VERTEX_MAIN_END\n}\n";
|
18
|
+
// Sideeffect
|
19
|
+
ShaderStore.ShadersStore[name] = shader;
|
20
|
+
/** @hidden */
|
21
|
+
export var cellVertexShader = { name: name, shader: shader };
|
22
22
|
//# sourceMappingURL=cell.vertex.js.map
|
package/cell/cellMaterial.d.ts
CHANGED
@@ -1,37 +1,37 @@
|
|
1
|
-
import { Nullable } from "@babylonjs/core/types.js";
|
2
|
-
import { Matrix } from "@babylonjs/core/Maths/math.vector.js";
|
3
|
-
import { Color3 } from "@babylonjs/core/Maths/math.color.js";
|
4
|
-
import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
5
|
-
import { PushMaterial } from "@babylonjs/core/Materials/pushMaterial.js";
|
6
|
-
import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
|
7
|
-
import { SubMesh } from "@babylonjs/core/Meshes/subMesh.js";
|
8
|
-
import { Mesh } from "@babylonjs/core/Meshes/mesh.js";
|
9
|
-
import { Scene } from "@babylonjs/core/scene.js";
|
10
|
-
import { IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
|
11
|
-
import "./cell.fragment";
|
12
|
-
import "./cell.vertex";
|
13
|
-
export declare class CellMaterial extends PushMaterial {
|
14
|
-
private _diffuseTexture;
|
15
|
-
diffuseTexture: BaseTexture;
|
16
|
-
diffuseColor: Color3;
|
17
|
-
_computeHighLevel: boolean;
|
18
|
-
computeHighLevel: boolean;
|
19
|
-
private _disableLighting;
|
20
|
-
disableLighting: boolean;
|
21
|
-
private _maxSimultaneousLights;
|
22
|
-
maxSimultaneousLights: number;
|
23
|
-
constructor(name: string, scene?: Scene);
|
24
|
-
needAlphaBlending(): boolean;
|
25
|
-
needAlphaTesting(): boolean;
|
26
|
-
getAlphaTestTexture(): Nullable<BaseTexture>;
|
27
|
-
isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
|
28
|
-
bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
|
29
|
-
getAnimatables(): IAnimatable[];
|
30
|
-
getActiveTextures(): BaseTexture[];
|
31
|
-
hasTexture(texture: BaseTexture): boolean;
|
32
|
-
dispose(forceDisposeEffect?: boolean): void;
|
33
|
-
getClassName(): string;
|
34
|
-
clone(name: string): CellMaterial;
|
35
|
-
serialize(): any;
|
36
|
-
static Parse(source: any, scene: Scene, rootUrl: string): CellMaterial;
|
37
|
-
}
|
1
|
+
import { Nullable } from "@babylonjs/core/types.js";
|
2
|
+
import { Matrix } from "@babylonjs/core/Maths/math.vector.js";
|
3
|
+
import { Color3 } from "@babylonjs/core/Maths/math.color.js";
|
4
|
+
import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
|
5
|
+
import { PushMaterial } from "@babylonjs/core/Materials/pushMaterial.js";
|
6
|
+
import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
|
7
|
+
import { SubMesh } from "@babylonjs/core/Meshes/subMesh.js";
|
8
|
+
import { Mesh } from "@babylonjs/core/Meshes/mesh.js";
|
9
|
+
import { Scene } from "@babylonjs/core/scene.js";
|
10
|
+
import { IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
|
11
|
+
import "./cell.fragment";
|
12
|
+
import "./cell.vertex";
|
13
|
+
export declare class CellMaterial extends PushMaterial {
|
14
|
+
private _diffuseTexture;
|
15
|
+
diffuseTexture: BaseTexture;
|
16
|
+
diffuseColor: Color3;
|
17
|
+
_computeHighLevel: boolean;
|
18
|
+
computeHighLevel: boolean;
|
19
|
+
private _disableLighting;
|
20
|
+
disableLighting: boolean;
|
21
|
+
private _maxSimultaneousLights;
|
22
|
+
maxSimultaneousLights: number;
|
23
|
+
constructor(name: string, scene?: Scene);
|
24
|
+
needAlphaBlending(): boolean;
|
25
|
+
needAlphaTesting(): boolean;
|
26
|
+
getAlphaTestTexture(): Nullable<BaseTexture>;
|
27
|
+
isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
|
28
|
+
bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
|
29
|
+
getAnimatables(): IAnimatable[];
|
30
|
+
getActiveTextures(): BaseTexture[];
|
31
|
+
hasTexture(texture: BaseTexture): boolean;
|
32
|
+
dispose(forceDisposeEffect?: boolean): void;
|
33
|
+
getClassName(): string;
|
34
|
+
clone(name: string): CellMaterial;
|
35
|
+
serialize(): any;
|
36
|
+
static Parse(source: any, scene: Scene, rootUrl: string): CellMaterial;
|
37
|
+
}
|