@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.
21 lines • 825 B
JavaScript
// Do not edit.
import { ShaderStore } from "../../Engines/shaderStore.js";
const name = "pbrBlockNormalGeometric";
const shader = `var viewDirectionW: vec3f=normalize(scene.vEyePosition.xyz-input.vPositionW);
var normalW: vec3f=normalize(input.vNormalW);
var normalW: vec3f=normalize(cross(dpdx(input.vPositionW),dpdy(input.vPositionW)))*scene.vEyePosition.w;
var geometricNormalW: vec3f=normalW;
geometricNormalW=select(-geometricNormalW,geometricNormalW,fragmentInputs.frontFacing);
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name]) {
ShaderStore.IncludesShadersStoreWGSL[name] = shader;
}
/** @internal */
export const pbrBlockNormalGeometricWGSL = { name, shader };
//# sourceMappingURL=pbrBlockNormalGeometric.js.map