API Reference GE Extensions Client Advanced Lighting - Shaders Defines all shader data, state blocks, and custom materials for the Advanced Lighting deferred rendering pipeline: vector lights (sun), point lights, spot lights, and particle point lights.
Defines all shader data, state blocks, and custom materials for the Advanced Lighting deferred rendering pipeline: vector lights (sun), point lights, spot lights, and particle point lights.
Property Value Source lua/ge/client/lighting/advanced/shaders.luaReturns - (side-effect module) Dependencies Sampler states from client/core
Object Type Purpose AL_VectorLightStateGFXStateBlockData Additive blend, stencil-tested, no z-write AL_VectorLightShaderShaderData farFrustumQuadV.hlsl + vectorLightP.hlslAL_VectorLightMaterialCustomMaterial Full-screen quad, targets lightinfo
Object Type Purpose AL_ConvexLightStateGFXStateBlockData Additive blend, z-test (reversed depth aware), CW cull AL_PointLightShaderShaderData convexGeometryV.hlsl + pointLightP.hlslAL_PointLightMaterialCustomMaterial Convex geometry, targets lightinfo
Object Type Purpose AL_SpotLightShaderShaderData convexGeometryV.hlsl + spotLightP.hlslAL_SpotLightMaterialCustomMaterial Convex geometry, targets lightinfo
Object Type Purpose AL_ParticlePointLightShaderShaderData particlePointLightV/P.hlslAL_ParticlePointLightMaterialCustomMaterial Particle-emitted lights
Object Type Purpose AL_DefaultPrePassMaterialMaterial Fallback for objects without materials (prepass) AL_DefaultShadowMaterialMaterial Fallback for shadow rendering; double-sided for terrain
Blend: One + One (additive)
Stencil: enabled, ref=4, func=Less
Cull: None (full-screen quad)
7 sampler slots: G-buffer (0,1,5,6), shadow map (2), SSAO (3), random direction (4)
Same additive blend
Z-enable with reversed depth support (GFXCmpLessEqual or GFXCmpGreaterEqual)
Cull: CW (back-face of light volume)
Stencil: ref=4, func=Less
Slot Sampler Texture prePassBuffer - #prepass[RT0]prePassDepthBuffer - #prepass[Depth]ShadowMap - $dynamiclightssaoMask - #ssaoMaskprePassBuffer1–5 - #prepass[RT1]–[RT5]
All shaders use pixel version 5.0.
Reversed depth buffer is detected via $Scene::useReversedDepthBuffer.
The convex light state is shared between point and spot lights.
Shadow material is double-sided to handle terrain at sunset/sunrise angles.