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