@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
40 lines (37 loc) • 2.04 kB
JavaScript
import { S as ShaderStore } from './index-MZPybX0H.esm.js';
import { b as bonesDeclaration, a as bakedVertexAnimationDeclaration, i as instancesVertex, c as bonesVertex, d as bakedVertexAnimation } from './bakedVertexAnimation-wpiWOSwD.esm.js';
import { i as instancesDeclaration } from './instancesDeclaration-BsiN991H.esm.js';
import { m as morphTargetsVertexGlobalDeclaration, a as morphTargetsVertexDeclaration, b as morphTargetsVertexGlobal, c as morphTargetsVertex } from './morphTargetsVertex-BRsti3ha.esm.js';
// Do not edit.
const name = "iblVoxelGridVertexShader";
const shader = `attribute vec3 position;varying vec3 vNormalizedPosition;
uniform mat4 invWorldScale;uniform mat4 viewMatrix;void main(void) {vec3 positionUpdated=position;
vec4 worldPos=finalWorld*vec4(positionUpdated,1.0);gl_Position=viewMatrix*invWorldScale*worldPos;vNormalizedPosition.xyz=gl_Position.xyz*0.5+0.5;
gl_Position.z=gl_Position.z*0.5+0.5;
}`;
// Sideeffect
if (!ShaderStore.ShadersStore[name]) {
ShaderStore.ShadersStore[name] = shader;
}
const includes = [bonesDeclaration, bakedVertexAnimationDeclaration, instancesDeclaration, morphTargetsVertexGlobalDeclaration, morphTargetsVertexDeclaration, morphTargetsVertexGlobal, morphTargetsVertex, instancesVertex, bonesVertex, bakedVertexAnimation];
for (const inc of includes) {
if (!ShaderStore.IncludesShadersStore[inc.name]) {
ShaderStore.IncludesShadersStore[inc.name] = inc.shader;
}
}
/** @internal */
const iblVoxelGridVertexShader = { name, shader };
export { iblVoxelGridVertexShader };
//# sourceMappingURL=iblVoxelGrid.vertex-KY-XdLON.esm.js.map