UNPKG

@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 818 B
// Do not edit. import { ShaderStore } from "../../Engines/shaderStore.js"; const name = "pbrBlockNormalFinal"; const shader = `#if defined(FORCENORMALFORWARD) && defined(NORMAL) vec3 faceNormal=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w; #if defined(TWOSIDEDLIGHTING) faceNormal=gl_FrontFacing ? faceNormal : -faceNormal; #endif normalW*=sign(dot(normalW,faceNormal)); #endif #if defined(TWOSIDEDLIGHTING) && defined(NORMAL) #if defined(MIRRORED) normalW=gl_FrontFacing ? -normalW : normalW; #else normalW=gl_FrontFacing ? normalW : -normalW; #endif #endif `; // Sideeffect if (!ShaderStore.IncludesShadersStore[name]) { ShaderStore.IncludesShadersStore[name] = shader; } /** @internal */ export const pbrBlockNormalFinal = { name, shader }; //# sourceMappingURL=pbrBlockNormalFinal.js.map