@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.
47 lines • 1.93 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../../Engines/shaderStore.js";
const name = "prePassVertex";
const shader = `
vertexOutputs.vViewPos=(scene.view*worldPos).rgb;
vertexOutputs.vPosition=positionUpdated.xyz;
vertexOutputs.vCurrentPosition=scene.viewProjection*worldPos;
var previousInfluence: mat4x4f;previousInfluence=mPreviousBones[ i32(matricesIndices[0])]*matricesWeights[0];
previousInfluence+=mPreviousBones[ i32(matricesIndices[1])]*matricesWeights[1];
previousInfluence+=mPreviousBones[ i32(matricesIndices[2])]*matricesWeights[2];
previousInfluence+=mPreviousBones[ i32(matricesIndices[3])]*matricesWeights[3];
previousInfluence+=mPreviousBones[ i32(matricesIndicesExtra[0])]*matricesWeightsExtra[0];
previousInfluence+=mPreviousBones[ i32(matricesIndicesExtra[1])]*matricesWeightsExtra[1];
previousInfluence+=mPreviousBones[ i32(matricesIndicesExtra[2])]*matricesWeightsExtra[2];
previousInfluence+=mPreviousBones[ i32(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*previousInfluence* vec4f(positionUpdated,1.0);
vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld* vec4f(positionUpdated,1.0);
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name]) {
ShaderStore.IncludesShadersStoreWGSL[name] = shader;
}
/** @internal */
export const prePassVertexWGSL = { name, shader };
//# sourceMappingURL=prePassVertex.js.map