@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.
80 lines • 2.74 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../../Engines/shaderStore.js";
const name = "lightUboDeclaration";
const shader = `
uniform Light{X}
{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;
vec4 vLightDirection;vec4 vLightFalloff;
vec4 vLightFalloff;
vec3 vLightGround;
float vNumLights;
vec4 vLightWidth;vec4 vLightHeight;
vec4 shadowsInfo;vec2 depthValues;} light{X};
uniform sampler2D iesLightTexture{X};
uniform mat4 textureProjectionMatrix{X};uniform sampler2D projectionLightTexture{X};
uniform sampler2D lightDataTexture{X};uniform highp sampler2D tileMaskTexture{X};
uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}];uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}];uniform float cascadeBlendFactor{X};varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};
uniform highp sampler2DArrayShadow shadowTexture{X};uniform highp sampler2DArray depthTexture{X};uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float penumbraDarkness{X};
uniform highp sampler2DArrayShadow shadowTexture{X};
uniform highp sampler2DArray shadowTexture{X};
const vec3 vCascadeColorsMultiplier{X}[8]=vec3[8]
(
vec3 ( 1.5,0.0,0.0 ),
vec3 ( 0.0,1.5,0.0 ),
vec3 ( 0.0,0.0,5.5 ),
vec3 ( 1.5,0.0,5.5 ),
vec3 ( 1.5,1.5,0.0 ),
vec3 ( 1.0,1.0,1.0 ),
vec3 ( 0.0,1.0,5.5 ),
vec3 ( 0.5,3.5,0.75 )
);vec3 shadowDebug{X};
int index{X}=-1;
int index{X}=SHADOWCSMNUM_CASCADES{X}-1;
float diff{X}=0.;
uniform samplerCube shadowTexture{X};
varying vec4 vPositionFromLight{X};varying float vDepthMetric{X};
uniform highp sampler2DShadow shadowTexture{X};uniform highp sampler2D depthTexture{X};
uniform highp sampler2DShadow shadowTexture{X};
uniform sampler2D shadowTexture{X};
uniform mat4 lightMatrix{X};
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStore[name]) {
ShaderStore.IncludesShadersStore[name] = shader;
}
/** @internal */
export const lightUboDeclaration = { name, shader };
//# sourceMappingURL=lightUboDeclaration.js.map