@babylonjs/materials 9.7.0 → 9.9.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/cell/cell.fragment.d.ts +0 -14
- package/cell/cell.fragment.js +20 -14
- package/cell/cell.fragment.js.map +1 -1
- package/cell/cell.vertex.d.ts +0 -16
- package/cell/cell.vertex.js +22 -16
- package/cell/cell.vertex.js.map +1 -1
- package/cell/wgsl/cell.fragment.d.ts +0 -13
- package/cell/wgsl/cell.fragment.js +19 -13
- package/cell/wgsl/cell.fragment.js.map +1 -1
- package/cell/wgsl/cell.vertex.d.ts +0 -16
- package/cell/wgsl/cell.vertex.js +22 -16
- package/cell/wgsl/cell.vertex.js.map +1 -1
- package/custom/pbrCustomMaterial.js +9 -0
- package/custom/pbrCustomMaterial.js.map +1 -1
- package/fire/fire.fragment.d.ts +0 -8
- package/fire/fire.fragment.js +14 -8
- package/fire/fire.fragment.js.map +1 -1
- package/fire/fire.vertex.d.ts +0 -13
- package/fire/fire.vertex.js +19 -13
- package/fire/fire.vertex.js.map +1 -1
- package/fire/wgsl/fire.fragment.d.ts +0 -8
- package/fire/wgsl/fire.fragment.js +14 -8
- package/fire/wgsl/fire.fragment.js.map +1 -1
- package/fire/wgsl/fire.vertex.d.ts +0 -13
- package/fire/wgsl/fire.vertex.js +19 -13
- package/fire/wgsl/fire.vertex.js.map +1 -1
- package/fur/fur.fragment.d.ts +0 -14
- package/fur/fur.fragment.js +20 -14
- package/fur/fur.fragment.js.map +1 -1
- package/fur/fur.vertex.d.ts +0 -16
- package/fur/fur.vertex.js +22 -16
- package/fur/fur.vertex.js.map +1 -1
- package/fur/wgsl/fur.fragment.d.ts +0 -13
- package/fur/wgsl/fur.fragment.js +19 -13
- package/fur/wgsl/fur.fragment.js.map +1 -1
- package/fur/wgsl/fur.vertex.d.ts +0 -16
- package/fur/wgsl/fur.vertex.js +22 -16
- package/fur/wgsl/fur.vertex.js.map +1 -1
- package/gradient/gradient.fragment.d.ts +0 -14
- package/gradient/gradient.fragment.js +20 -14
- package/gradient/gradient.fragment.js.map +1 -1
- package/gradient/gradient.vertex.d.ts +0 -16
- package/gradient/gradient.vertex.js +22 -16
- package/gradient/gradient.vertex.js.map +1 -1
- package/gradient/wgsl/gradient.fragment.d.ts +0 -13
- package/gradient/wgsl/gradient.fragment.js +19 -13
- package/gradient/wgsl/gradient.fragment.js.map +1 -1
- package/gradient/wgsl/gradient.vertex.d.ts +0 -16
- package/gradient/wgsl/gradient.vertex.js +22 -16
- package/gradient/wgsl/gradient.vertex.js.map +1 -1
- package/grid/grid.fragment.d.ts +0 -7
- package/grid/grid.fragment.js +13 -7
- package/grid/grid.fragment.js.map +1 -1
- package/grid/grid.vertex.d.ts +0 -10
- package/grid/grid.vertex.js +16 -10
- package/grid/grid.vertex.js.map +1 -1
- package/grid/wgsl/grid.fragment.d.ts +0 -7
- package/grid/wgsl/grid.fragment.js +13 -7
- package/grid/wgsl/grid.fragment.js.map +1 -1
- package/grid/wgsl/grid.vertex.d.ts +0 -9
- package/grid/wgsl/grid.vertex.js +15 -9
- package/grid/wgsl/grid.vertex.js.map +1 -1
- package/lava/lava.fragment.d.ts +0 -14
- package/lava/lava.fragment.js +20 -14
- package/lava/lava.fragment.js.map +1 -1
- package/lava/lava.vertex.d.ts +0 -16
- package/lava/lava.vertex.js +22 -16
- package/lava/lava.vertex.js.map +1 -1
- package/lava/wgsl/lava.fragment.d.ts +0 -13
- package/lava/wgsl/lava.fragment.js +19 -13
- package/lava/wgsl/lava.fragment.js.map +1 -1
- package/lava/wgsl/lava.vertex.d.ts +0 -16
- package/lava/wgsl/lava.vertex.js +22 -16
- package/lava/wgsl/lava.vertex.js.map +1 -1
- package/mix/mix.fragment.d.ts +0 -14
- package/mix/mix.fragment.js +20 -14
- package/mix/mix.fragment.js.map +1 -1
- package/mix/mix.vertex.d.ts +0 -16
- package/mix/mix.vertex.js +22 -16
- package/mix/mix.vertex.js.map +1 -1
- package/mix/wgsl/mix.fragment.d.ts +0 -13
- package/mix/wgsl/mix.fragment.js +19 -13
- package/mix/wgsl/mix.fragment.js.map +1 -1
- package/mix/wgsl/mix.vertex.d.ts +0 -16
- package/mix/wgsl/mix.vertex.js +22 -16
- package/mix/wgsl/mix.vertex.js.map +1 -1
- package/normal/normal.fragment.d.ts +0 -14
- package/normal/normal.fragment.js +20 -14
- package/normal/normal.fragment.js.map +1 -1
- package/normal/normal.vertex.d.ts +0 -15
- package/normal/normal.vertex.js +21 -15
- package/normal/normal.vertex.js.map +1 -1
- package/normal/wgsl/normal.fragment.d.ts +0 -13
- package/normal/wgsl/normal.fragment.js +19 -13
- package/normal/wgsl/normal.fragment.js.map +1 -1
- package/normal/wgsl/normal.vertex.d.ts +0 -15
- package/normal/wgsl/normal.vertex.js +21 -15
- package/normal/wgsl/normal.vertex.js.map +1 -1
- package/package.json +2 -2
- package/shadowOnly/shadowOnly.fragment.d.ts +0 -15
- package/shadowOnly/shadowOnly.fragment.js +21 -15
- package/shadowOnly/shadowOnly.fragment.js.map +1 -1
- package/shadowOnly/shadowOnly.vertex.d.ts +0 -17
- package/shadowOnly/shadowOnly.vertex.js +23 -17
- package/shadowOnly/shadowOnly.vertex.js.map +1 -1
- package/shadowOnly/wgsl/shadowOnly.fragment.d.ts +0 -12
- package/shadowOnly/wgsl/shadowOnly.fragment.js +18 -12
- package/shadowOnly/wgsl/shadowOnly.fragment.js.map +1 -1
- package/shadowOnly/wgsl/shadowOnly.vertex.d.ts +0 -16
- package/shadowOnly/wgsl/shadowOnly.vertex.js +22 -16
- package/shadowOnly/wgsl/shadowOnly.vertex.js.map +1 -1
- package/simple/simple.fragment.d.ts +0 -14
- package/simple/simple.fragment.js +20 -14
- package/simple/simple.fragment.js.map +1 -1
- package/simple/simple.vertex.d.ts +0 -16
- package/simple/simple.vertex.js +22 -16
- package/simple/simple.vertex.js.map +1 -1
- package/simple/wgsl/simple.fragment.d.ts +0 -13
- package/simple/wgsl/simple.fragment.js +19 -13
- package/simple/wgsl/simple.fragment.js.map +1 -1
- package/simple/wgsl/simple.vertex.d.ts +0 -16
- package/simple/wgsl/simple.vertex.js +22 -16
- package/simple/wgsl/simple.vertex.js.map +1 -1
- package/sky/sky.fragment.d.ts +0 -8
- package/sky/sky.fragment.js +14 -8
- package/sky/sky.fragment.js.map +1 -1
- package/sky/sky.vertex.d.ts +0 -6
- package/sky/sky.vertex.js +12 -6
- package/sky/sky.vertex.js.map +1 -1
- package/sky/wgsl/sky.fragment.d.ts +0 -8
- package/sky/wgsl/sky.fragment.js +14 -8
- package/sky/wgsl/sky.fragment.js.map +1 -1
- package/sky/wgsl/sky.vertex.d.ts +0 -6
- package/sky/wgsl/sky.vertex.js +12 -6
- package/sky/wgsl/sky.vertex.js.map +1 -1
- package/terrain/terrain.fragment.d.ts +0 -14
- package/terrain/terrain.fragment.js +20 -14
- package/terrain/terrain.fragment.js.map +1 -1
- package/terrain/terrain.vertex.d.ts +0 -16
- package/terrain/terrain.vertex.js +22 -16
- package/terrain/terrain.vertex.js.map +1 -1
- package/terrain/wgsl/terrain.fragment.d.ts +0 -13
- package/terrain/wgsl/terrain.fragment.js +19 -13
- package/terrain/wgsl/terrain.fragment.js.map +1 -1
- package/terrain/wgsl/terrain.vertex.d.ts +0 -16
- package/terrain/wgsl/terrain.vertex.js +22 -16
- package/terrain/wgsl/terrain.vertex.js.map +1 -1
- package/triPlanar/triplanar.fragment.d.ts +0 -14
- package/triPlanar/triplanar.fragment.js +20 -14
- package/triPlanar/triplanar.fragment.js.map +1 -1
- package/triPlanar/triplanar.vertex.d.ts +0 -17
- package/triPlanar/triplanar.vertex.js +23 -17
- package/triPlanar/triplanar.vertex.js.map +1 -1
- package/triPlanar/wgsl/triplanar.fragment.d.ts +0 -13
- package/triPlanar/wgsl/triplanar.fragment.js +19 -13
- package/triPlanar/wgsl/triplanar.fragment.js.map +1 -1
- package/triPlanar/wgsl/triplanar.vertex.d.ts +0 -17
- package/triPlanar/wgsl/triplanar.vertex.js +23 -17
- package/triPlanar/wgsl/triplanar.vertex.js.map +1 -1
- package/water/water.fragment.d.ts +0 -14
- package/water/water.fragment.js +20 -14
- package/water/water.fragment.js.map +1 -1
- package/water/water.vertex.d.ts +0 -16
- package/water/water.vertex.js +22 -16
- package/water/water.vertex.js.map +1 -1
- package/water/wgsl/water.fragment.d.ts +0 -13
- package/water/wgsl/water.fragment.js +19 -13
- package/water/wgsl/water.fragment.js.map +1 -1
- package/water/wgsl/water.vertex.d.ts +0 -16
- package/water/wgsl/water.vertex.js +22 -16
- package/water/wgsl/water.vertex.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradient.vertex.js","sourceRoot":"","sources":["../../../../../dev/materials/src/gradient/wgsl/gradient.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,kDAAkD,CAAC;
|
|
1
|
+
{"version":3,"file":"gradient.vertex.js","sourceRoot":"","sources":["../../../../../dev/materials/src/gradient/wgsl/gradient.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,mCAAmC,EAAE,MAAM,iEAAiE,CAAC;AACtH,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAC;AAC5G,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAC;AAC5G,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAE1F,MAAM,IAAI,GAAG,sBAAsB,CAAC;AACpC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,oBAAoB,EAAE,mCAAmC,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,eAAe,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,iBAAiB,EAAE,qBAAqB,CAAC,CAAC;AACvZ,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;IACzB,IAAI,CAAC,WAAW,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAClD,WAAW,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;IAChE,CAAC;AACL,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport { bonesDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/bonesDeclaration\";\nimport { bakedVertexAnimationDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration\";\nimport { instancesDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/instancesDeclaration\";\nimport { clipPlaneVertexDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration\";\nimport { logDepthDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/logDepthDeclaration\";\nimport { fogVertexDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/fogVertexDeclaration\";\nimport { lightVxFragmentDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration\";\nimport { lightVxUboDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/lightVxUboDeclaration\";\nimport { instancesVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/instancesVertex\";\nimport { bonesVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/bonesVertex\";\nimport { bakedVertexAnimationWGSL } from \"core/ShadersWGSL/ShadersInclude/bakedVertexAnimation\";\nimport { clipPlaneVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/clipPlaneVertex\";\nimport { logDepthVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/logDepthVertex\";\nimport { fogVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/fogVertex\";\nimport { shadowsVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/shadowsVertex\";\nimport { vertexColorMixingWGSL } from \"core/ShadersWGSL/ShadersInclude/vertexColorMixing\";\n\nconst name = \"gradientVertexShader\";\nconst shader = `attribute position: vec3f;\n#ifdef NORMAL\nattribute normal: vec3f;\n#endif\n#ifdef UV1\nattribute uv: vec2f;\n#endif\n#ifdef UV2\nattribute uv2: vec2f;\n#endif\n#ifdef VERTEXCOLOR\nattribute color: vec4f;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\nuniform view: mat4x4f;uniform viewProjection: mat4x4f;\n#ifdef POINTSIZE\nuniform pointSize: f32;\n#endif\nvarying vPositionW: vec3f;varying vPosition: vec3f;\n#ifdef NORMAL\nvarying vNormalW: vec3f;\n#endif\n#ifdef VERTEXCOLOR\nvarying vColor: vec4f;\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<logDepthDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightVxFragment>[0..maxSimultaneousLights]\n#if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0\nvarying vViewDepth: f32;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#ifdef VERTEXCOLOR\nvar colorUpdated: vec4f=vertexInputs.color;\n#endif\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvar worldPos: vec4f=finalWorld* vec4f(vertexInputs.position,1.0);vertexOutputs.position=uniforms.viewProjection*worldPos;vertexOutputs.vPositionW= worldPos.xyz;vertexOutputs.vPosition=vertexInputs.position;\n#ifdef NORMAL\nvertexOutputs.vNormalW=normalize(( finalWorld* vec4f(vertexInputs.normal,0.0)).xyz);\n#endif\n#ifndef UV1\nvar uv: vec2f= vec2f(0.,0.);\n#else\nvar uv: vec2f=vertexInputs.uv;\n#endif\n#ifndef UV2\nvar uv2: vec2f= vec2f(0.,0.);\n#else\nvar uv2: vec2f=vertexInputs.uv2;\n#endif\n#include<clipPlaneVertex>\n#include<logDepthVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#include<vertexColorMixing>\n#define CUSTOM_VERTEX_MAIN_END\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\nconst includes = [bonesDeclarationWGSL, bakedVertexAnimationDeclarationWGSL, instancesDeclarationWGSL, clipPlaneVertexDeclarationWGSL, logDepthDeclarationWGSL, fogVertexDeclarationWGSL, lightVxFragmentDeclarationWGSL, lightVxUboDeclarationWGSL, instancesVertexWGSL, bonesVertexWGSL, bakedVertexAnimationWGSL, clipPlaneVertexWGSL, logDepthVertexWGSL, fogVertexWGSL, shadowsVertexWGSL, vertexColorMixingWGSL];\nfor (const inc of includes) {\n if (!ShaderStore.IncludesShadersStoreWGSL[inc.name]) {\n ShaderStore.IncludesShadersStoreWGSL[inc.name] = inc.shader;\n }\n}\n\n/** @internal */\nexport const gradientVertexShaderWGSL = { name, shader };\n"]}
|
package/grid/grid.fragment.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
|
2
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthDeclaration.js";
|
|
3
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
|
4
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
|
5
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
|
6
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthFragment.js";
|
|
7
|
-
import "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
|
8
1
|
/** @internal */
|
|
9
2
|
export declare const gridPixelShader: {
|
|
10
3
|
name: string;
|
package/grid/grid.fragment.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Do not edit.
|
|
2
2
|
import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
|
|
3
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
|
4
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthDeclaration.js";
|
|
5
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
|
6
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
|
7
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthFragment.js";
|
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
|
3
|
+
import { clipPlaneFragmentDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
|
4
|
+
import { logDepthDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/logDepthDeclaration.js";
|
|
5
|
+
import { fogFragmentDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
|
6
|
+
import { clipPlaneFragment } from "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
|
7
|
+
import { fogFragment } from "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
|
8
|
+
import { logDepthFragment } from "@babylonjs/core/Shaders/ShadersInclude/logDepthFragment.js";
|
|
9
|
+
import { imageProcessingCompatibility } from "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
|
10
10
|
const name = "gridPixelShader";
|
|
11
11
|
const shader = `#extension GL_OES_standard_derivatives : enable
|
|
12
12
|
#define SQRT2 1.41421356
|
|
@@ -74,6 +74,12 @@ gl_FragColor.rgb*=opacity;
|
|
|
74
74
|
if (!ShaderStore.ShadersStore[name]) {
|
|
75
75
|
ShaderStore.ShadersStore[name] = shader;
|
|
76
76
|
}
|
|
77
|
+
const includes = [clipPlaneFragmentDeclaration, logDepthDeclaration, fogFragmentDeclaration, clipPlaneFragment, fogFragment, logDepthFragment, imageProcessingCompatibility];
|
|
78
|
+
for (const inc of includes) {
|
|
79
|
+
if (!ShaderStore.IncludesShadersStore[inc.name]) {
|
|
80
|
+
ShaderStore.IncludesShadersStore[inc.name] = inc.shader;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
77
83
|
/** @internal */
|
|
78
84
|
export const gridPixelShader = { name, shader };
|
|
79
85
|
//# sourceMappingURL=grid.fragment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.fragment.js","sourceRoot":"","sources":["../../../../dev/materials/src/grid/grid.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,0DAA0D,CAAC;
|
|
1
|
+
{"version":3,"file":"grid.fragment.js","sourceRoot":"","sources":["../../../../dev/materials/src/grid/grid.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AAExG,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAC/B,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Dd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,4BAA4B,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAE,4BAA4B,CAAC,CAAC;AAC7K,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;IACzB,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,WAAW,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;IAC5D,CAAC;AACL,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport { clipPlaneFragmentDeclaration } from \"core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration\";\nimport { logDepthDeclaration } from \"core/Shaders/ShadersInclude/logDepthDeclaration\";\nimport { fogFragmentDeclaration } from \"core/Shaders/ShadersInclude/fogFragmentDeclaration\";\nimport { clipPlaneFragment } from \"core/Shaders/ShadersInclude/clipPlaneFragment\";\nimport { fogFragment } from \"core/Shaders/ShadersInclude/fogFragment\";\nimport { logDepthFragment } from \"core/Shaders/ShadersInclude/logDepthFragment\";\nimport { imageProcessingCompatibility } from \"core/Shaders/ShadersInclude/imageProcessingCompatibility\";\n\nconst name = \"gridPixelShader\";\nconst shader = `#extension GL_OES_standard_derivatives : enable\n#define SQRT2 1.41421356\n#define PI 3.14159\nprecision highp float;uniform float visibility;uniform vec3 mainColor;uniform vec3 lineColor;uniform vec4 gridControl;uniform vec3 gridOffset;varying vec3 vPosition;varying vec3 vNormal;\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\n#ifdef OPACITY\nvarying vec2 vOpacityUV;uniform sampler2D opacitySampler;uniform vec2 vOpacityInfos;\n#endif\nfloat getDynamicVisibility(float position) {float majorGridFrequency=gridControl.y;if (floor(position+0.5)==floor(position/majorGridFrequency+0.5)*majorGridFrequency)\n{return 1.0;}\nreturn gridControl.z;}\nfloat getAnisotropicAttenuation(float differentialLength) {const float maxNumberOfLines=10.0;return clamp(1.0/(differentialLength+1.0)-1.0/maxNumberOfLines,0.0,1.0);}\nfloat isPointOnLine(float position,float differentialLength) {float fractionPartOfPosition=position-floor(position+0.5); \nfractionPartOfPosition/=differentialLength; \n#ifdef ANTIALIAS\nfractionPartOfPosition=clamp(fractionPartOfPosition,-1.,1.);float result=0.5+0.5*cos(fractionPartOfPosition*PI); \nreturn result;\n#else\nreturn abs(fractionPartOfPosition)<SQRT2/4. ? 1. : 0.;\n#endif\n}\nfloat contributionOnAxis(float position) {float differentialLength=length(vec2(dFdx(position),dFdy(position)));differentialLength*=SQRT2; \nfloat result=isPointOnLine(position,differentialLength);float dynamicVisibility=getDynamicVisibility(position);result*=dynamicVisibility;float anisotropicAttenuation=getAnisotropicAttenuation(differentialLength);result*=anisotropicAttenuation;return result;}\nfloat normalImpactOnAxis(float x) {float normalImpact=clamp(1.0-3.0*abs(x*x*x),0.0,1.0);return normalImpact;}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\nfloat gridRatio=gridControl.x;vec3 gridPos=(vPosition+gridOffset.xyz)/gridRatio;float x=contributionOnAxis(gridPos.x);float y=contributionOnAxis(gridPos.y);float z=contributionOnAxis(gridPos.z);vec3 normal=normalize(vNormal);x*=normalImpactOnAxis(normal.x);y*=normalImpactOnAxis(normal.y);z*=normalImpactOnAxis(normal.z);\n#ifdef MAX_LINE\nfloat grid=clamp(max(max(x,y),z),0.,1.);\n#else\nfloat grid=clamp(x+y+z,0.,1.);\n#endif\nvec3 color=mix(mainColor,lineColor,grid);\n#ifdef FOG\n#include<fogFragment>\n#endif\nfloat opacity=1.0;\n#ifdef TRANSPARENT\nopacity=clamp(grid,0.08,gridControl.w*grid);\n#endif\n#ifdef OPACITY\nopacity*=texture2D(opacitySampler,vOpacityUV).a;\n#endif\ngl_FragColor=vec4(color.rgb,opacity*visibility);\n#ifdef TRANSPARENT\n#ifdef PREMULTIPLYALPHA\ngl_FragColor.rgb*=opacity;\n#endif\n#else\n#endif\n#include<logDepthFragment>\n#include<imageProcessingCompatibility>\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\nconst includes = [clipPlaneFragmentDeclaration, logDepthDeclaration, fogFragmentDeclaration, clipPlaneFragment, fogFragment, logDepthFragment, imageProcessingCompatibility];\nfor (const inc of includes) {\n if (!ShaderStore.IncludesShadersStore[inc.name]) {\n ShaderStore.IncludesShadersStore[inc.name] = inc.shader;\n }\n}\n\n/** @internal */\nexport const gridPixelShader = { name, shader };\n"]}
|
package/grid/grid.vertex.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
|
|
2
|
-
import "@babylonjs/core/Shaders/ShadersInclude/sceneVertexDeclaration.js";
|
|
3
|
-
import "@babylonjs/core/Shaders/ShadersInclude/sceneUboDeclaration.js";
|
|
4
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthDeclaration.js";
|
|
5
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
|
6
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertexDeclaration.js";
|
|
7
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthVertex.js";
|
|
11
1
|
/** @internal */
|
|
12
2
|
export declare const gridVertexShader: {
|
|
13
3
|
name: string;
|
package/grid/grid.vertex.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// Do not edit.
|
|
2
2
|
import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
|
|
3
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
|
|
4
|
-
import "@babylonjs/core/Shaders/ShadersInclude/sceneVertexDeclaration.js";
|
|
5
|
-
import "@babylonjs/core/Shaders/ShadersInclude/sceneUboDeclaration.js";
|
|
6
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthDeclaration.js";
|
|
7
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertexDeclaration.js";
|
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
|
11
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
|
12
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthVertex.js";
|
|
3
|
+
import { instancesDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
|
|
4
|
+
import { sceneVertexDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/sceneVertexDeclaration.js";
|
|
5
|
+
import { sceneUboDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/sceneUboDeclaration.js";
|
|
6
|
+
import { logDepthDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/logDepthDeclaration.js";
|
|
7
|
+
import { fogVertexDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
|
8
|
+
import { clipPlaneVertexDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertexDeclaration.js";
|
|
9
|
+
import { instancesVertex } from "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
|
10
|
+
import { fogVertex } from "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
|
11
|
+
import { clipPlaneVertex } from "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
|
12
|
+
import { logDepthVertex } from "@babylonjs/core/Shaders/ShadersInclude/logDepthVertex.js";
|
|
13
13
|
const name = "gridVertexShader";
|
|
14
14
|
const shader = `precision highp float;attribute vec3 position;attribute vec3 normal;
|
|
15
15
|
#ifdef UV1
|
|
@@ -55,6 +55,12 @@ vPosition=position;vNormal=normal;
|
|
|
55
55
|
if (!ShaderStore.ShadersStore[name]) {
|
|
56
56
|
ShaderStore.ShadersStore[name] = shader;
|
|
57
57
|
}
|
|
58
|
+
const includes = [instancesDeclaration, sceneVertexDeclaration, sceneUboDeclaration, logDepthDeclaration, fogVertexDeclaration, clipPlaneVertexDeclaration, instancesVertex, fogVertex, clipPlaneVertex, logDepthVertex];
|
|
59
|
+
for (const inc of includes) {
|
|
60
|
+
if (!ShaderStore.IncludesShadersStore[inc.name]) {
|
|
61
|
+
ShaderStore.IncludesShadersStore[inc.name] = inc.shader;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
58
64
|
/** @internal */
|
|
59
65
|
export const gridVertexShader = { name, shader };
|
|
60
66
|
//# sourceMappingURL=grid.vertex.js.map
|
package/grid/grid.vertex.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.vertex.js","sourceRoot":"","sources":["../../../../dev/materials/src/grid/grid.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,kDAAkD,CAAC;
|
|
1
|
+
{"version":3,"file":"grid.vertex.js","sourceRoot":"","sources":["../../../../dev/materials/src/grid/grid.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wDAAwD,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAChC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCb,CAAC;AACH,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,oBAAoB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;AACzN,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;IACzB,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,WAAW,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;IAC5D,CAAC;AACL,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport { instancesDeclaration } from \"core/Shaders/ShadersInclude/instancesDeclaration\";\nimport { sceneVertexDeclaration } from \"core/Shaders/ShadersInclude/sceneVertexDeclaration\";\nimport { sceneUboDeclaration } from \"core/Shaders/ShadersInclude/sceneUboDeclaration\";\nimport { logDepthDeclaration } from \"core/Shaders/ShadersInclude/logDepthDeclaration\";\nimport { fogVertexDeclaration } from \"core/Shaders/ShadersInclude/fogVertexDeclaration\";\nimport { clipPlaneVertexDeclaration } from \"core/Shaders/ShadersInclude/clipPlaneVertexDeclaration\";\nimport { instancesVertex } from \"core/Shaders/ShadersInclude/instancesVertex\";\nimport { fogVertex } from \"core/Shaders/ShadersInclude/fogVertex\";\nimport { clipPlaneVertex } from \"core/Shaders/ShadersInclude/clipPlaneVertex\";\nimport { logDepthVertex } from \"core/Shaders/ShadersInclude/logDepthVertex\";\n\nconst name = \"gridVertexShader\";\nconst shader = `precision highp float;attribute vec3 position;attribute vec3 normal;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#include<instancesDeclaration>\n#include<__decl__sceneVertex>\nvarying vec3 vPosition;varying vec3 vNormal;\n#include<logDepthDeclaration>\n#include<fogVertexDeclaration>\n#ifdef OPACITY\nvarying vec2 vOpacityUV;uniform mat4 opacityMatrix;uniform vec2 vOpacityInfos;\n#endif\n#include<clipPlaneVertexDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#include<fogVertex>\nvec4 cameraSpacePosition=view*worldPos;gl_Position=projection*cameraSpacePosition;\n#ifdef OPACITY\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\nif (vOpacityInfos.x==0.)\n{vOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0));}\nelse\n{vOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));}\n#endif \n#include<clipPlaneVertex>\n#include<logDepthVertex>\nvPosition=position;vNormal=normal;\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\nconst includes = [instancesDeclaration, sceneVertexDeclaration, sceneUboDeclaration, logDepthDeclaration, fogVertexDeclaration, clipPlaneVertexDeclaration, instancesVertex, fogVertex, clipPlaneVertex, logDepthVertex];\nfor (const inc of includes) {\n if (!ShaderStore.IncludesShadersStore[inc.name]) {\n ShaderStore.IncludesShadersStore[inc.name] = inc.shader;\n }\n}\n\n/** @internal */\nexport const gridVertexShader = { name, shader };\n"]}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
|
2
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthDeclaration.js";
|
|
3
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogFragmentDeclaration.js";
|
|
4
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneFragment.js";
|
|
5
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogFragment.js";
|
|
6
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthFragment.js";
|
|
7
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/imageProcessingCompatibility.js";
|
|
8
1
|
/** @internal */
|
|
9
2
|
export declare const gridPixelShaderWGSL: {
|
|
10
3
|
name: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Do not edit.
|
|
2
2
|
import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
|
|
3
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
|
4
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthDeclaration.js";
|
|
5
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogFragmentDeclaration.js";
|
|
6
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneFragment.js";
|
|
7
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogFragment.js";
|
|
8
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthFragment.js";
|
|
9
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/imageProcessingCompatibility.js";
|
|
3
|
+
import { clipPlaneFragmentDeclarationWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
|
4
|
+
import { logDepthDeclarationWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthDeclaration.js";
|
|
5
|
+
import { fogFragmentDeclarationWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/fogFragmentDeclaration.js";
|
|
6
|
+
import { clipPlaneFragmentWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneFragment.js";
|
|
7
|
+
import { fogFragmentWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/fogFragment.js";
|
|
8
|
+
import { logDepthFragmentWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthFragment.js";
|
|
9
|
+
import { imageProcessingCompatibilityWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/imageProcessingCompatibility.js";
|
|
10
10
|
const name = "gridPixelShader";
|
|
11
11
|
const shader = `#define SQRT2 1.41421356
|
|
12
12
|
#define PI 3.14159
|
|
@@ -69,6 +69,12 @@ fragmentOutputs.color=vec4f(fragmentOutputs.color.rgb*opacity,fragmentOutputs.co
|
|
|
69
69
|
if (!ShaderStore.ShadersStoreWGSL[name]) {
|
|
70
70
|
ShaderStore.ShadersStoreWGSL[name] = shader;
|
|
71
71
|
}
|
|
72
|
+
const includes = [clipPlaneFragmentDeclarationWGSL, logDepthDeclarationWGSL, fogFragmentDeclarationWGSL, clipPlaneFragmentWGSL, fogFragmentWGSL, logDepthFragmentWGSL, imageProcessingCompatibilityWGSL];
|
|
73
|
+
for (const inc of includes) {
|
|
74
|
+
if (!ShaderStore.IncludesShadersStoreWGSL[inc.name]) {
|
|
75
|
+
ShaderStore.IncludesShadersStoreWGSL[inc.name] = inc.shader;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
72
78
|
/** @internal */
|
|
73
79
|
export const gridPixelShaderWGSL = { name, shader };
|
|
74
80
|
//# sourceMappingURL=grid.fragment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.fragment.js","sourceRoot":"","sources":["../../../../../dev/materials/src/grid/wgsl/grid.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,8DAA8D,CAAC;
|
|
1
|
+
{"version":3,"file":"grid.fragment.js","sourceRoot":"","sources":["../../../../../dev/materials/src/grid/wgsl/grid.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,gCAAgC,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,wDAAwD,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,gCAAgC,EAAE,MAAM,8DAA8D,CAAC;AAEhH,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAC/B,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,gCAAgC,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,eAAe,EAAE,oBAAoB,EAAE,gCAAgC,CAAC,CAAC;AACzM,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;IACzB,IAAI,CAAC,WAAW,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAClD,WAAW,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;IAChE,CAAC;AACL,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport { clipPlaneFragmentDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration\";\nimport { logDepthDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/logDepthDeclaration\";\nimport { fogFragmentDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/fogFragmentDeclaration\";\nimport { clipPlaneFragmentWGSL } from \"core/ShadersWGSL/ShadersInclude/clipPlaneFragment\";\nimport { fogFragmentWGSL } from \"core/ShadersWGSL/ShadersInclude/fogFragment\";\nimport { logDepthFragmentWGSL } from \"core/ShadersWGSL/ShadersInclude/logDepthFragment\";\nimport { imageProcessingCompatibilityWGSL } from \"core/ShadersWGSL/ShadersInclude/imageProcessingCompatibility\";\n\nconst name = \"gridPixelShader\";\nconst shader = `#define SQRT2 1.41421356\n#define PI 3.14159\nuniform visibility: f32;uniform mainColor: vec3f;uniform lineColor: vec3f;uniform gridControl: vec4f;uniform gridOffset: vec3f;varying vPosition: vec3f;varying vNormal: vec3f;\n#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\n#ifdef OPACITY\nvarying vOpacityUV: vec2f;var opacitySamplerSampler: sampler;var opacitySampler: texture_2d<f32>;uniform vOpacityInfos: vec2f;\n#endif\nfn getDynamicVisibility(position: f32)->f32 {var majorGridFrequency: f32=uniforms.gridControl.y;if (floor(position+0.5)==floor(position/majorGridFrequency+0.5)*majorGridFrequency)\n{return 1.0;}\nreturn uniforms.gridControl.z;}\nfn getAnisotropicAttenuation(differentialLength: f32)->f32 {let maxNumberOfLines: f32=10.0;return clamp(1.0/(differentialLength+1.0)-1.0/maxNumberOfLines,0.0,1.0);}\nfn isPointOnLine(position: f32,differentialLength: f32)->f32 {var fractionPartOfPosition: f32=position-floor(position+0.5);fractionPartOfPosition=fractionPartOfPosition/differentialLength;\n#ifdef ANTIALIAS\nfractionPartOfPosition=clamp(fractionPartOfPosition,-1.,1.);var result: f32=0.5+0.5*cos(fractionPartOfPosition*PI);return result;\n#else\nif (abs(fractionPartOfPosition)<SQRT2/4.) {return 1.;}\nreturn 0.;\n#endif\n}\nfn contributionOnAxis(position: f32)->f32 {var differentialLength: f32=length( vec2f(dpdx(position),dpdy(position)));differentialLength=differentialLength*SQRT2;var result: f32=isPointOnLine(position,differentialLength);var dynamicVisibility: f32=getDynamicVisibility(position);result=result*dynamicVisibility;var anisotropicAttenuation: f32=getAnisotropicAttenuation(differentialLength);result=result*anisotropicAttenuation;return result;}\nfn normalImpactOnAxis(x: f32)->f32 {var normalImpact: f32=clamp(1.0-3.0*abs(x*x*x),0.0,1.0);return normalImpact;}\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\nvar gridRatio: f32=uniforms.gridControl.x;var gridPos: vec3f=(fragmentInputs.vPosition+uniforms.gridOffset.xyz)/gridRatio;var x: f32=contributionOnAxis(gridPos.x);var y: f32=contributionOnAxis(gridPos.y);var z: f32=contributionOnAxis(gridPos.z);var normal: vec3f=normalize(fragmentInputs.vNormal);x=x*normalImpactOnAxis(normal.x);y=y*normalImpactOnAxis(normal.y);z=z*normalImpactOnAxis(normal.z);\n#ifdef MAX_LINE\nvar grid: f32=clamp(max(max(x,y),z),0.,1.);\n#else\nvar grid: f32=clamp(x+y+z,0.,1.);\n#endif\nvar color: vec4f=vec4f(mix(uniforms.mainColor,uniforms.lineColor,vec3f(grid)),1.0);\n#ifdef FOG\n#include<fogFragment>\n#endif\nvar opacity: f32=1.0;\n#ifdef TRANSPARENT\nopacity=clamp(grid,0.08,uniforms.gridControl.w*grid);\n#endif\n#ifdef OPACITY\nopacity=opacity*textureSample(opacitySampler,opacitySamplerSampler,fragmentInputs.vOpacityUV).a;\n#endif\nfragmentOutputs.color= vec4f(color.rgb,opacity*uniforms.visibility);\n#ifdef TRANSPARENT\n#ifdef PREMULTIPLYALPHA\nfragmentOutputs.color=vec4f(fragmentOutputs.color.rgb*opacity,fragmentOutputs.color.a);\n#endif\n#else\n#endif\n#include<logDepthFragment>\n#include<imageProcessingCompatibility>\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\nconst includes = [clipPlaneFragmentDeclarationWGSL, logDepthDeclarationWGSL, fogFragmentDeclarationWGSL, clipPlaneFragmentWGSL, fogFragmentWGSL, logDepthFragmentWGSL, imageProcessingCompatibilityWGSL];\nfor (const inc of includes) {\n if (!ShaderStore.IncludesShadersStoreWGSL[inc.name]) {\n ShaderStore.IncludesShadersStoreWGSL[inc.name] = inc.shader;\n }\n}\n\n/** @internal */\nexport const gridPixelShaderWGSL = { name, shader };\n"]}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/instancesDeclaration.js";
|
|
2
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js";
|
|
3
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthDeclaration.js";
|
|
4
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogVertexDeclaration.js";
|
|
5
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration.js";
|
|
6
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/instancesVertex.js";
|
|
7
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogVertex.js";
|
|
8
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneVertex.js";
|
|
9
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthVertex.js";
|
|
10
1
|
/** @internal */
|
|
11
2
|
export declare const gridVertexShaderWGSL: {
|
|
12
3
|
name: string;
|
package/grid/wgsl/grid.vertex.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// Do not edit.
|
|
2
2
|
import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
|
|
3
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/instancesDeclaration.js";
|
|
4
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js";
|
|
5
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthDeclaration.js";
|
|
6
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogVertexDeclaration.js";
|
|
7
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration.js";
|
|
8
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/instancesVertex.js";
|
|
9
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogVertex.js";
|
|
10
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneVertex.js";
|
|
11
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthVertex.js";
|
|
3
|
+
import { instancesDeclarationWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/instancesDeclaration.js";
|
|
4
|
+
import { sceneUboDeclarationWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js";
|
|
5
|
+
import { logDepthDeclarationWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthDeclaration.js";
|
|
6
|
+
import { fogVertexDeclarationWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/fogVertexDeclaration.js";
|
|
7
|
+
import { clipPlaneVertexDeclarationWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration.js";
|
|
8
|
+
import { instancesVertexWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/instancesVertex.js";
|
|
9
|
+
import { fogVertexWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/fogVertex.js";
|
|
10
|
+
import { clipPlaneVertexWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneVertex.js";
|
|
11
|
+
import { logDepthVertexWGSL } from "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthVertex.js";
|
|
12
12
|
const name = "gridVertexShader";
|
|
13
13
|
const shader = `attribute position: vec3f;attribute normal: vec3f;
|
|
14
14
|
#ifdef UV1
|
|
@@ -60,6 +60,12 @@ vertexOutputs.vPosition=vertexInputs.position;vertexOutputs.vNormal=vertexInputs
|
|
|
60
60
|
if (!ShaderStore.ShadersStoreWGSL[name]) {
|
|
61
61
|
ShaderStore.ShadersStoreWGSL[name] = shader;
|
|
62
62
|
}
|
|
63
|
+
const includes = [instancesDeclarationWGSL, sceneUboDeclarationWGSL, logDepthDeclarationWGSL, fogVertexDeclarationWGSL, clipPlaneVertexDeclarationWGSL, instancesVertexWGSL, fogVertexWGSL, clipPlaneVertexWGSL, logDepthVertexWGSL];
|
|
64
|
+
for (const inc of includes) {
|
|
65
|
+
if (!ShaderStore.IncludesShadersStoreWGSL[inc.name]) {
|
|
66
|
+
ShaderStore.IncludesShadersStoreWGSL[inc.name] = inc.shader;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
63
69
|
/** @internal */
|
|
64
70
|
export const gridVertexShaderWGSL = { name, shader };
|
|
65
71
|
//# sourceMappingURL=grid.vertex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.vertex.js","sourceRoot":"","sources":["../../../../../dev/materials/src/grid/wgsl/grid.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,sDAAsD,CAAC;
|
|
1
|
+
{"version":3,"file":"grid.vertex.js","sourceRoot":"","sources":["../../../../../dev/materials/src/grid/wgsl/grid.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAC;AAC5G,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAChC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Cd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,wBAAwB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,CAAC,CAAC;AACrO,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;IACzB,IAAI,CAAC,WAAW,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAClD,WAAW,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;IAChE,CAAC;AACL,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport { instancesDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/instancesDeclaration\";\nimport { sceneUboDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/sceneUboDeclaration\";\nimport { logDepthDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/logDepthDeclaration\";\nimport { fogVertexDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/fogVertexDeclaration\";\nimport { clipPlaneVertexDeclarationWGSL } from \"core/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration\";\nimport { instancesVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/instancesVertex\";\nimport { fogVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/fogVertex\";\nimport { clipPlaneVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/clipPlaneVertex\";\nimport { logDepthVertexWGSL } from \"core/ShadersWGSL/ShadersInclude/logDepthVertex\";\n\nconst name = \"gridVertexShader\";\nconst shader = `attribute position: vec3f;attribute normal: vec3f;\n#ifdef UV1\nattribute uv: vec2f;\n#endif\n#ifdef UV2\nattribute uv2: vec2f;\n#endif\n#include<instancesDeclaration>\n#include<sceneUboDeclaration>\nvarying vPosition: vec3f;varying vNormal: vec3f;\n#include<logDepthDeclaration>\n#include<fogVertexDeclaration>\n#ifdef OPACITY\nvarying vOpacityUV: vec2f;uniform opacityMatrix: mat4x4f;uniform vOpacityInfos: vec2f;\n#endif\n#include<clipPlaneVertexDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\nvar worldPos: vec4f=finalWorld* vec4f(vertexInputs.position,1.0);\n#include<fogVertex>\nvar cameraSpacePosition: vec4f=scene.view*worldPos;vertexOutputs.position=scene.projection*cameraSpacePosition;\n#ifdef OPACITY\n#ifndef UV1\nvar uv: vec2f= vec2f(0.,0.);\n#else\nvar uv: vec2f=vertexInputs.uv;\n#endif\n#ifndef UV2\nvar uv2: vec2f= vec2f(0.,0.);\n#else\nvar uv2: vec2f=vertexInputs.uv2;\n#endif\nif (uniforms.vOpacityInfos.x==0.)\n{vertexOutputs.vOpacityUV=(uniforms.opacityMatrix* vec4f(uv,1.0,0.0)).xy;}\nelse\n{vertexOutputs.vOpacityUV=(uniforms.opacityMatrix* vec4f(uv2,1.0,0.0)).xy;}\n#endif\n#include<clipPlaneVertex>\n#include<logDepthVertex>\nvertexOutputs.vPosition=vertexInputs.position;vertexOutputs.vNormal=vertexInputs.normal;\n#define CUSTOM_VERTEX_MAIN_END\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\nconst includes = [instancesDeclarationWGSL, sceneUboDeclarationWGSL, logDepthDeclarationWGSL, fogVertexDeclarationWGSL, clipPlaneVertexDeclarationWGSL, instancesVertexWGSL, fogVertexWGSL, clipPlaneVertexWGSL, logDepthVertexWGSL];\nfor (const inc of includes) {\n if (!ShaderStore.IncludesShadersStoreWGSL[inc.name]) {\n ShaderStore.IncludesShadersStoreWGSL[inc.name] = inc.shader;\n }\n}\n\n/** @internal */\nexport const gridVertexShaderWGSL = { name, shader };\n"]}
|
package/lava/lava.fragment.d.ts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
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/logDepthDeclaration.js";
|
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/depthPrePass.js";
|
|
11
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragment.js";
|
|
12
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthFragment.js";
|
|
13
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
|
14
|
-
import "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
|
15
1
|
/** @internal */
|
|
16
2
|
export declare const lavaPixelShader: {
|
|
17
3
|
name: string;
|
package/lava/lava.fragment.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// Do not edit.
|
|
2
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/logDepthDeclaration.js";
|
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
|
11
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
|
12
|
-
import "@babylonjs/core/Shaders/ShadersInclude/depthPrePass.js";
|
|
13
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragment.js";
|
|
14
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthFragment.js";
|
|
15
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
|
16
|
-
import "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
|
3
|
+
import { helperFunctions } from "@babylonjs/core/Shaders/ShadersInclude/helperFunctions.js";
|
|
4
|
+
import { lightFragmentDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
|
5
|
+
import { lightUboDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
|
6
|
+
import { lightsFragmentFunctions } from "@babylonjs/core/Shaders/ShadersInclude/lightsFragmentFunctions.js";
|
|
7
|
+
import { shadowsFragmentFunctions } from "@babylonjs/core/Shaders/ShadersInclude/shadowsFragmentFunctions.js";
|
|
8
|
+
import { clipPlaneFragmentDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
|
9
|
+
import { logDepthDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/logDepthDeclaration.js";
|
|
10
|
+
import { fogFragmentDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/fogFragmentDeclaration.js";
|
|
11
|
+
import { clipPlaneFragment } from "@babylonjs/core/Shaders/ShadersInclude/clipPlaneFragment.js";
|
|
12
|
+
import { depthPrePass } from "@babylonjs/core/Shaders/ShadersInclude/depthPrePass.js";
|
|
13
|
+
import { lightFragment } from "@babylonjs/core/Shaders/ShadersInclude/lightFragment.js";
|
|
14
|
+
import { logDepthFragment } from "@babylonjs/core/Shaders/ShadersInclude/logDepthFragment.js";
|
|
15
|
+
import { fogFragment } from "@babylonjs/core/Shaders/ShadersInclude/fogFragment.js";
|
|
16
|
+
import { imageProcessingCompatibility } from "@babylonjs/core/Shaders/ShadersInclude/imageProcessingCompatibility.js";
|
|
17
17
|
const name = "lavaPixelShader";
|
|
18
18
|
const shader = `precision highp float;uniform vec4 vEyePosition;uniform vec4 vDiffuseColor;varying vec3 vPositionW;uniform float time;uniform float speed;uniform float movingSpeed;uniform vec3 fogColor;uniform sampler2D noiseTexture;uniform float fogDensity;varying float noise;
|
|
19
19
|
#ifdef NORMAL
|
|
@@ -87,6 +87,12 @@ gl_FragColor=color;
|
|
|
87
87
|
if (!ShaderStore.ShadersStore[name]) {
|
|
88
88
|
ShaderStore.ShadersStore[name] = shader;
|
|
89
89
|
}
|
|
90
|
+
const includes = [helperFunctions, lightFragmentDeclaration, lightUboDeclaration, lightsFragmentFunctions, shadowsFragmentFunctions, clipPlaneFragmentDeclaration, logDepthDeclaration, fogFragmentDeclaration, clipPlaneFragment, depthPrePass, lightFragment, logDepthFragment, fogFragment, imageProcessingCompatibility];
|
|
91
|
+
for (const inc of includes) {
|
|
92
|
+
if (!ShaderStore.IncludesShadersStore[inc.name]) {
|
|
93
|
+
ShaderStore.IncludesShadersStore[inc.name] = inc.shader;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
90
96
|
/** @internal */
|
|
91
97
|
export const lavaPixelShader = { name, shader };
|
|
92
98
|
//# sourceMappingURL=lava.fragment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lava.fragment.js","sourceRoot":"","sources":["../../../../dev/materials/src/lava/lava.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"lava.fragment.js","sourceRoot":"","sources":["../../../../dev/materials/src/lava/lava.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AAExG,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAC/B,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmEb,CAAC;AACH,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,eAAe,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,4BAA4B,CAAC,CAAC;AAC7T,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;IACzB,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,WAAW,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;IAC5D,CAAC;AACL,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport { helperFunctions } from \"core/Shaders/ShadersInclude/helperFunctions\";\nimport { lightFragmentDeclaration } from \"core/Shaders/ShadersInclude/lightFragmentDeclaration\";\nimport { lightUboDeclaration } from \"core/Shaders/ShadersInclude/lightUboDeclaration\";\nimport { lightsFragmentFunctions } from \"core/Shaders/ShadersInclude/lightsFragmentFunctions\";\nimport { shadowsFragmentFunctions } from \"core/Shaders/ShadersInclude/shadowsFragmentFunctions\";\nimport { clipPlaneFragmentDeclaration } from \"core/Shaders/ShadersInclude/clipPlaneFragmentDeclaration\";\nimport { logDepthDeclaration } from \"core/Shaders/ShadersInclude/logDepthDeclaration\";\nimport { fogFragmentDeclaration } from \"core/Shaders/ShadersInclude/fogFragmentDeclaration\";\nimport { clipPlaneFragment } from \"core/Shaders/ShadersInclude/clipPlaneFragment\";\nimport { depthPrePass } from \"core/Shaders/ShadersInclude/depthPrePass\";\nimport { lightFragment } from \"core/Shaders/ShadersInclude/lightFragment\";\nimport { logDepthFragment } from \"core/Shaders/ShadersInclude/logDepthFragment\";\nimport { fogFragment } from \"core/Shaders/ShadersInclude/fogFragment\";\nimport { imageProcessingCompatibility } from \"core/Shaders/ShadersInclude/imageProcessingCompatibility\";\n\nconst name = \"lavaPixelShader\";\nconst shader = `precision highp float;uniform vec4 vEyePosition;uniform vec4 vDiffuseColor;varying vec3 vPositionW;uniform float time;uniform float speed;uniform float movingSpeed;uniform vec3 fogColor;uniform sampler2D noiseTexture;uniform float fogDensity;varying float noise;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include<helperFunctions>\n#include<__decl__lightFragment>[0]\n#include<__decl__lightFragment>[1]\n#include<__decl__lightFragment>[2]\n#include<__decl__lightFragment>[3]\n#include<lightsFragmentFunctions>\n#include<shadowsFragmentFunctions>\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;uniform sampler2D diffuseSampler;uniform vec2 vDiffuseInfos;\n#endif\n#include<clipPlaneFragmentDeclaration>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nfloat random( vec3 scale,float seed ){return fract( sin( dot( gl_FragCoord.xyz+seed,scale ) )*43758.5453+seed ) ;}\n#if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0\nvarying float vViewDepth;\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);vec4 baseColor=vec4(1.,1.,1.,1.);vec3 diffuseColor=vDiffuseColor.rgb;float alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nvec4 noiseTex=texture2D( noiseTexture,vDiffuseUV );vec2 T1=vDiffuseUV+vec2( 1.5,-1.5 )*time *0.02;vec2 T2=vDiffuseUV+vec2( -0.5,2.0 )*time*0.01*speed;T1.x+=noiseTex.x*2.0;T1.y+=noiseTex.y*2.0;T2.x-=noiseTex.y*0.2+time*0.001*movingSpeed;T2.y+=noiseTex.z*0.2+time*0.002*movingSpeed;float p=texture2D( noiseTexture,T1*3.0 ).a;vec4 lavaColor=texture2D( diffuseSampler,T2*4.0);vec4 temp=lavaColor*( vec4( p,p,p,p )*2. )+( lavaColor*lavaColor-0.1 );baseColor=temp;float depth=gl_FragCoord.z*4.0;const float LOG2=1.442695;float fogFactor=exp2(-fogDensity*fogDensity*depth*depth*LOG2 );fogFactor=1.0-clamp( fogFactor,0.0,1.0 );baseColor=mix( baseColor,vec4( fogColor,baseColor.w ),fogFactor );diffuseColor=baseColor.rgb;\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\n#ifdef UNLIT\nvec3 diffuseBase=vec3(1.,1.,1.);\n#else\nvec3 diffuseBase=vec3(0.,0.,0.);lightingInfo info;float shadow=1.;float glossiness=0.;float aggShadow=0.;float numLights=0.;\n#include<lightFragment>[0]\n#include<lightFragment>[1]\n#include<lightFragment>[2]\n#include<lightFragment>[3]\n#endif\n#if defined(VERTEXALPHA) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;vec4 color=vec4(finalDiffuse,alpha);\n#include<logDepthFragment>\n#include<fogFragment>\ngl_FragColor=color;\n#include<imageProcessingCompatibility>\n#define CUSTOM_FRAGMENT_MAIN_END\n}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\nconst includes = [helperFunctions, lightFragmentDeclaration, lightUboDeclaration, lightsFragmentFunctions, shadowsFragmentFunctions, clipPlaneFragmentDeclaration, logDepthDeclaration, fogFragmentDeclaration, clipPlaneFragment, depthPrePass, lightFragment, logDepthFragment, fogFragment, imageProcessingCompatibility];\nfor (const inc of includes) {\n if (!ShaderStore.IncludesShadersStore[inc.name]) {\n ShaderStore.IncludesShadersStore[inc.name] = inc.shader;\n }\n}\n\n/** @internal */\nexport const lavaPixelShader = { name, shader };\n"]}
|
package/lava/lava.vertex.d.ts
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
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/logDepthDeclaration.js";
|
|
6
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
|
7
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bonesVertex.js";
|
|
11
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimation.js";
|
|
12
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
|
13
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
|
14
|
-
import "@babylonjs/core/Shaders/ShadersInclude/shadowsVertex.js";
|
|
15
|
-
import "@babylonjs/core/Shaders/ShadersInclude/vertexColorMixing.js";
|
|
16
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthVertex.js";
|
|
17
1
|
/** @internal */
|
|
18
2
|
export declare const lavaVertexShader: {
|
|
19
3
|
name: string;
|
package/lava/lava.vertex.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// Do not edit.
|
|
2
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/logDepthDeclaration.js";
|
|
8
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
|
9
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
|
10
|
-
import "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
|
11
|
-
import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
|
12
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bonesVertex.js";
|
|
13
|
-
import "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimation.js";
|
|
14
|
-
import "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
|
15
|
-
import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
|
16
|
-
import "@babylonjs/core/Shaders/ShadersInclude/shadowsVertex.js";
|
|
17
|
-
import "@babylonjs/core/Shaders/ShadersInclude/vertexColorMixing.js";
|
|
18
|
-
import "@babylonjs/core/Shaders/ShadersInclude/logDepthVertex.js";
|
|
3
|
+
import { bonesDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/bonesDeclaration.js";
|
|
4
|
+
import { bakedVertexAnimationDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimationDeclaration.js";
|
|
5
|
+
import { instancesDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
|
|
6
|
+
import { clipPlaneVertexDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertexDeclaration.js";
|
|
7
|
+
import { logDepthDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/logDepthDeclaration.js";
|
|
8
|
+
import { fogVertexDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
|
|
9
|
+
import { lightFragmentDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/lightFragmentDeclaration.js";
|
|
10
|
+
import { lightUboDeclaration } from "@babylonjs/core/Shaders/ShadersInclude/lightUboDeclaration.js";
|
|
11
|
+
import { instancesVertex } from "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
|
|
12
|
+
import { bonesVertex } from "@babylonjs/core/Shaders/ShadersInclude/bonesVertex.js";
|
|
13
|
+
import { bakedVertexAnimation } from "@babylonjs/core/Shaders/ShadersInclude/bakedVertexAnimation.js";
|
|
14
|
+
import { clipPlaneVertex } from "@babylonjs/core/Shaders/ShadersInclude/clipPlaneVertex.js";
|
|
15
|
+
import { fogVertex } from "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
|
|
16
|
+
import { shadowsVertex } from "@babylonjs/core/Shaders/ShadersInclude/shadowsVertex.js";
|
|
17
|
+
import { vertexColorMixing } from "@babylonjs/core/Shaders/ShadersInclude/vertexColorMixing.js";
|
|
18
|
+
import { logDepthVertex } from "@babylonjs/core/Shaders/ShadersInclude/logDepthVertex.js";
|
|
19
19
|
const name = "lavaVertexShader";
|
|
20
20
|
const shader = `precision highp float;uniform float time;uniform float lowFrequencySpeed;varying float noise;attribute vec3 position;
|
|
21
21
|
#ifdef NORMAL
|
|
@@ -111,6 +111,12 @@ gl_PointSize=pointSize;
|
|
|
111
111
|
if (!ShaderStore.ShadersStore[name]) {
|
|
112
112
|
ShaderStore.ShadersStore[name] = shader;
|
|
113
113
|
}
|
|
114
|
+
const includes = [bonesDeclaration, bakedVertexAnimationDeclaration, instancesDeclaration, clipPlaneVertexDeclaration, logDepthDeclaration, fogVertexDeclaration, lightFragmentDeclaration, lightUboDeclaration, instancesVertex, bonesVertex, bakedVertexAnimation, clipPlaneVertex, fogVertex, shadowsVertex, vertexColorMixing, logDepthVertex];
|
|
115
|
+
for (const inc of includes) {
|
|
116
|
+
if (!ShaderStore.IncludesShadersStore[inc.name]) {
|
|
117
|
+
ShaderStore.IncludesShadersStore[inc.name] = inc.shader;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
114
120
|
/** @internal */
|
|
115
121
|
export const lavaVertexShader = { name, shader };
|
|
116
122
|
//# sourceMappingURL=lava.vertex.js.map
|
package/lava/lava.vertex.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lava.vertex.js","sourceRoot":"","sources":["../../../../dev/materials/src/lava/lava.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"lava.vertex.js","sourceRoot":"","sources":["../../../../dev/materials/src/lava/lava.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,+BAA+B,EAAE,MAAM,6DAA6D,CAAC;AAC9G,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wDAAwD,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAChC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFb,CAAC;AACH,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,gBAAgB,EAAE,+BAA+B,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAoB,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,CAAC,CAAC;AACnV,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;IACzB,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,WAAW,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;IAC5D,CAAC;AACL,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\nimport { bonesDeclaration } from \"core/Shaders/ShadersInclude/bonesDeclaration\";\nimport { bakedVertexAnimationDeclaration } from \"core/Shaders/ShadersInclude/bakedVertexAnimationDeclaration\";\nimport { instancesDeclaration } from \"core/Shaders/ShadersInclude/instancesDeclaration\";\nimport { clipPlaneVertexDeclaration } from \"core/Shaders/ShadersInclude/clipPlaneVertexDeclaration\";\nimport { logDepthDeclaration } from \"core/Shaders/ShadersInclude/logDepthDeclaration\";\nimport { fogVertexDeclaration } from \"core/Shaders/ShadersInclude/fogVertexDeclaration\";\nimport { lightFragmentDeclaration } from \"core/Shaders/ShadersInclude/lightFragmentDeclaration\";\nimport { lightUboDeclaration } from \"core/Shaders/ShadersInclude/lightUboDeclaration\";\nimport { instancesVertex } from \"core/Shaders/ShadersInclude/instancesVertex\";\nimport { bonesVertex } from \"core/Shaders/ShadersInclude/bonesVertex\";\nimport { bakedVertexAnimation } from \"core/Shaders/ShadersInclude/bakedVertexAnimation\";\nimport { clipPlaneVertex } from \"core/Shaders/ShadersInclude/clipPlaneVertex\";\nimport { fogVertex } from \"core/Shaders/ShadersInclude/fogVertex\";\nimport { shadowsVertex } from \"core/Shaders/ShadersInclude/shadowsVertex\";\nimport { vertexColorMixing } from \"core/Shaders/ShadersInclude/vertexColorMixing\";\nimport { logDepthVertex } from \"core/Shaders/ShadersInclude/logDepthVertex\";\n\nconst name = \"lavaVertexShader\";\nconst shader = `precision highp float;uniform float time;uniform float lowFrequencySpeed;varying float noise;attribute 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;uniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;uniform mat4 diffuseMatrix;uniform 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<logDepthDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n/* NOISE FUNCTIONS */\nvec3 mod289(vec3 x)\n{return x-floor(x*(1.0/289.0))*289.0;}\nvec4 mod289(vec4 x)\n{return x-floor(x*(1.0/289.0))*289.0;}\nvec4 permute(vec4 x)\n{return mod289(((x*34.0)+1.0)*x);}\nvec4 taylorInvSqrt(vec4 r)\n{return 1.79284291400159-0.85373472095314*r;}\nvec3 fade(vec3 t) {return t*t*t*(t*(t*6.0-15.0)+10.0);}\nfloat pnoise(vec3 P,vec3 rep)\n{vec3 Pi0=mod(floor(P),rep); \nvec3 Pi1=mod(Pi0+vec3(1.0),rep); \nPi0=mod289(Pi0);Pi1=mod289(Pi1);vec3 Pf0=fract(P); \nvec3 Pf1=Pf0-vec3(1.0); \nvec4 ix=vec4(Pi0.x,Pi1.x,Pi0.x,Pi1.x);vec4 iy=vec4(Pi0.yy,Pi1.yy);vec4 iz0=Pi0.zzzz;vec4 iz1=Pi1.zzzz;vec4 ixy=permute(permute(ix)+iy);vec4 ixy0=permute(ixy+iz0);vec4 ixy1=permute(ixy+iz1);vec4 gx0=ixy0*(1.0/7.0);vec4 gy0=fract(floor(gx0)*(1.0/7.0))-0.5;gx0=fract(gx0);vec4 gz0=vec4(0.5)-abs(gx0)-abs(gy0);vec4 sz0=step(gz0,vec4(0.0));gx0-=sz0*(step(0.0,gx0)-0.5);gy0-=sz0*(step(0.0,gy0)-0.5);vec4 gx1=ixy1*(1.0/7.0);vec4 gy1=fract(floor(gx1)*(1.0/7.0))-0.5;gx1=fract(gx1);vec4 gz1=vec4(0.5)-abs(gx1)-abs(gy1);vec4 sz1=step(gz1,vec4(0.0));gx1-=sz1*(step(0.0,gx1)-0.5);gy1-=sz1*(step(0.0,gy1)-0.5);vec3 g000=vec3(gx0.x,gy0.x,gz0.x);vec3 g100=vec3(gx0.y,gy0.y,gz0.y);vec3 g010=vec3(gx0.z,gy0.z,gz0.z);vec3 g110=vec3(gx0.w,gy0.w,gz0.w);vec3 g001=vec3(gx1.x,gy1.x,gz1.x);vec3 g101=vec3(gx1.y,gy1.y,gz1.y);vec3 g011=vec3(gx1.z,gy1.z,gz1.z);vec3 g111=vec3(gx1.w,gy1.w,gz1.w);vec4 norm0=taylorInvSqrt(vec4(dot(g000,g000),dot(g010,g010),dot(g100,g100),dot(g110,g110)));g000*=norm0.x;g010*=norm0.y;g100*=norm0.z;g110*=norm0.w;vec4 norm1=taylorInvSqrt(vec4(dot(g001,g001),dot(g011,g011),dot(g101,g101),dot(g111,g111)));g001*=norm1.x;g011*=norm1.y;g101*=norm1.z;g111*=norm1.w;float n000=dot(g000,Pf0);float n100=dot(g100,vec3(Pf1.x,Pf0.yz));float n010=dot(g010,vec3(Pf0.x,Pf1.y,Pf0.z));float n110=dot(g110,vec3(Pf1.xy,Pf0.z));float n001=dot(g001,vec3(Pf0.xy,Pf1.z));float n101=dot(g101,vec3(Pf1.x,Pf0.y,Pf1.z));float n011=dot(g011,vec3(Pf0.x,Pf1.yz));float n111=dot(g111,Pf1);vec3 fade_xyz=fade(Pf0);vec4 n_z=mix(vec4(n000,n100,n010,n110),vec4(n001,n101,n011,n111),fade_xyz.z);vec2 n_yz=mix(n_z.xy,n_z.zw,fade_xyz.y);float n_xyz=mix(n_yz.x,n_yz.y,fade_xyz.x);return 2.2*n_xyz;}\n/* END FUNCTION */\nfloat turbulence( vec3 p ) {float w=100.0;float t=-.5;for (float f=1.0 ; f<=10.0 ; f++ ){float power=pow( 2.0,f );t+=abs( pnoise( vec3( power*p ),vec3( 10.0,10.0,10.0 ) )/power );}\nreturn t;}\n#if defined(CLUSTLIGHT_BATCH) && CLUSTLIGHT_BATCH>0\nvarying float vViewDepth;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#ifdef VERTEXCOLOR\nvec4 colorUpdated=color;\n#endif\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\n#ifdef NORMAL\nnoise=10.0* -.10*turbulence( .5*normal+time*1.15 );float b=lowFrequencySpeed*5.0*pnoise( 0.05*position +vec3(time*1.025),vec3( 100.0 ) );float displacement=- 1.5*noise+b;vec3 newPosition=position+normal*displacement;gl_Position=viewProjection*finalWorld*vec4( newPosition,1.0 );vec4 worldPos=finalWorld*vec4(newPosition,1.0);vPositionW=vec3(worldPos);vNormalW=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{vDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));}\nelse\n{vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));}\n#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#include<vertexColorMixing>\n#include<logDepthVertex>\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\nconst includes = [bonesDeclaration, bakedVertexAnimationDeclaration, instancesDeclaration, clipPlaneVertexDeclaration, logDepthDeclaration, fogVertexDeclaration, lightFragmentDeclaration, lightUboDeclaration, instancesVertex, bonesVertex, bakedVertexAnimation, clipPlaneVertex, fogVertex, shadowsVertex, vertexColorMixing, logDepthVertex];\nfor (const inc of includes) {\n if (!ShaderStore.IncludesShadersStore[inc.name]) {\n ShaderStore.IncludesShadersStore[inc.name] = inc.shader;\n }\n}\n\n/** @internal */\nexport const lavaVertexShader = { name, shader };\n"]}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/helperFunctions.js";
|
|
2
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/lightUboDeclaration.js";
|
|
3
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js";
|
|
4
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions.js";
|
|
5
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration.js";
|
|
6
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthDeclaration.js";
|
|
7
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogFragmentDeclaration.js";
|
|
8
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/clipPlaneFragment.js";
|
|
9
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/depthPrePass.js";
|
|
10
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/lightFragment.js";
|
|
11
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/logDepthFragment.js";
|
|
12
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/fogFragment.js";
|
|
13
|
-
import "@babylonjs/core/ShadersWGSL/ShadersInclude/imageProcessingCompatibility.js";
|
|
14
1
|
/** @internal */
|
|
15
2
|
export declare const lavaPixelShaderWGSL: {
|
|
16
3
|
name: string;
|