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.

19 lines 768 B
// Do not edit. import { ShaderStore } from "../../Engines/shaderStore.js"; const name = "shadowMapVertexNormalBias"; const shader = `#if SM_NORMALBIAS==1 #if SM_DIRECTIONINLIGHTDATA==1 vec3 worldLightDirSM=normalize(-lightDataSM.xyz); #else vec3 directionToLightSM=lightDataSM.xyz-worldPos.xyz;vec3 worldLightDirSM=normalize(directionToLightSM); #endif float ndlSM=dot(vNormalW,worldLightDirSM);float sinNLSM=sqrt(1.0-ndlSM*ndlSM);float normalBiasSM=biasAndScaleSM.y*sinNLSM;worldPos.xyz-=vNormalW*normalBiasSM; #endif `; // Sideeffect if (!ShaderStore.IncludesShadersStore[name]) { ShaderStore.IncludesShadersStore[name] = shader; } /** @internal */ export const shadowMapVertexNormalBias = { name, shader }; //# sourceMappingURL=shadowMapVertexNormalBias.js.map