@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.
25 lines • 920 B
JavaScript
// Do not edit.
import { ShaderStore } from "../../Engines/shaderStore.js";
const name = "pbrBlockNormalFinal";
const shader = `
var faceNormal: vec3f=normalize(cross(dpdx(fragmentInputs.vPositionW),dpdy(fragmentInputs.vPositionW)))*scene.vEyePosition.w;
faceNormal=select(-faceNormal,faceNormal,fragmentInputs.frontFacing);
normalW*=sign(dot(normalW,faceNormal));
normalW=select(normalW,-normalW,fragmentInputs.frontFacing);
normalW=select(-normalW,normalW,fragmentInputs.frontFacing);
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name]) {
ShaderStore.IncludesShadersStoreWGSL[name] = shader;
}
/** @internal */
export const pbrBlockNormalFinalWGSL = { name, shader };
//# sourceMappingURL=pbrBlockNormalFinal.js.map