@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
JavaScript
import { S as ShaderStore } from './index-D8dpgsp6.esm.js';
import './bonesVertex-DFI4CZxp.esm.js';
import './bakedVertexAnimation-Di6Zkmrd.esm.js';
import './instancesDeclaration-B5iSHPdH.esm.js';
import './morphTargetsVertex-CEdtNEE0.esm.js';
// Do not edit.
const name = "iblVoxelGridVertexShader";
const shader = `attribute position: vec3f;varying vNormalizedPosition: vec3f;
uniform invWorldScale: mat4x4f;uniform viewMatrix: mat4x4f;@vertex
fn main(input : VertexInputs)->FragmentInputs {var positionUpdated=vertexInputs.position;
let worldPos=finalWorld*vec4f(positionUpdated,1.0);vertexOutputs.position=uniforms.viewMatrix*uniforms.invWorldScale*worldPos;vertexOutputs.vNormalizedPosition=vertexOutputs.position.xyz*0.5+0.5;
vertexOutputs.position=vec4f(vertexOutputs.position.x,vertexOutputs.position.y,vertexOutputs.position.z*0.5+0.5,vertexOutputs.position.w);
}
`;
// Sideeffect
if (!ShaderStore.ShadersStoreWGSL[name]) {
ShaderStore.ShadersStoreWGSL[name] = shader;
}
/** @internal */
const iblVoxelGridVertexShaderWGSL = { name, shader };
export { iblVoxelGridVertexShaderWGSL };
//# sourceMappingURL=iblVoxelGrid.vertex-CVMW7kBF.esm.js.map