@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-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;
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-BJktRmGp.esm.js.map