UNPKG

@babylonjs/core

Version:

Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.

39 lines 1.88 kB
// Do not edit. import { ShaderStore } from "../Engines/shaderStore.js"; import "./ShadersInclude/bonesDeclaration.js"; import "./ShadersInclude/bakedVertexAnimationDeclaration.js"; import "./ShadersInclude/instancesDeclaration.js"; import "./ShadersInclude/morphTargetsVertexGlobalDeclaration.js"; import "./ShadersInclude/morphTargetsVertexDeclaration.js"; import "./ShadersInclude/morphTargetsVertexGlobal.js"; import "./ShadersInclude/morphTargetsVertex.js"; import "./ShadersInclude/instancesVertex.js"; import "./ShadersInclude/bonesVertex.js"; import "./ShadersInclude/bakedVertexAnimation.js"; const name = "iblVoxelGridVertexShader"; const shader = `attribute position: vec3f;varying vNormalizedPosition: vec3f; #include<bonesDeclaration> #include<bakedVertexAnimationDeclaration> #include<instancesDeclaration> #include<morphTargetsVertexGlobalDeclaration> #include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets] uniform invWorldScale: mat4x4f;uniform viewMatrix: mat4x4f;@vertex fn main(input : VertexInputs)->FragmentInputs {var positionUpdated=vertexInputs.position; #include<morphTargetsVertexGlobal> #include<morphTargetsVertex>[0..maxSimultaneousMorphTargets] #include<instancesVertex> #include<bonesVertex> #include<bakedVertexAnimation> let worldPos=finalWorld*vec4f(positionUpdated,1.0);vertexOutputs.position=uniforms.viewMatrix*uniforms.invWorldScale*worldPos;vertexOutputs.vNormalizedPosition=vertexOutputs.position.xyz*0.5+0.5; #ifdef IS_NDC_HALF_ZRANGE vertexOutputs.position=vec4f(vertexOutputs.position.x,vertexOutputs.position.y,vertexOutputs.position.z*0.5+0.5,vertexOutputs.position.w); #endif } `; // Sideeffect if (!ShaderStore.ShadersStoreWGSL[name]) { ShaderStore.ShadersStoreWGSL[name] = shader; } /** @internal */ export const iblVoxelGridVertexShaderWGSL = { name, shader }; //# sourceMappingURL=iblVoxelGrid.vertex.js.map