UNPKG

@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.

37 lines (34 loc) 1.59 kB
import { S as ShaderStore } from './index-FzOfPXLV.esm.js'; import './bonesVertex-lAGOY5tc.esm.js'; import './bakedVertexAnimation-B-j7AgLw.esm.js'; import './instancesDeclaration-CGcPa0tb.esm.js'; import './morphTargetsVertex-C_o673bp.esm.js'; // Do not edit. 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 */ const iblVoxelGridVertexShaderWGSL = { name, shader }; export { iblVoxelGridVertexShaderWGSL }; //# sourceMappingURL=iblVoxelGrid.vertex-BJktRmGp.esm.js.map