Files
UnrealEngineUWP/Engine/Shaders/Private/VolumeLightingCommon.ush
ben ingram d1124c2e41 Move a bunch of lighting calculations to translated world space, fixes various problems at LWC scale
#preflight 61f1760afd5285142b43178a
#rb Daniel.Wright, tiago.costa, Andrew.Lauritzen, charles.derousiers
#jira UE-139831

#ROBOMERGE-AUTHOR: ben.ingram
#ROBOMERGE-SOURCE: CL 18738670 in //UE5/Release-5.0/... via CL 18738820 via CL 18739464
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18740039 by ben ingram in ue5-main branch]
2022-01-26 13:56:31 -05:00

36 lines
1.0 KiB
Plaintext

// Copyright Epic Games, Inc. All Rights Reserved.
/**
* VolumeLightingCommon.usf
*/
// use low quality shadow sampling on translucency for better performance
#define SHADOW_QUALITY 2
#include "ShadowProjectionCommon.ush"
#include "ShadowFilteringCommon.ush"
/** Parameters needed to access the shadow map of the light. */
float4x4 TranslatedWorldToShadowMatrix;
float4 ShadowmapMinMax;
// .x:1/SplitNearFadeRegion, .y:1/SplitFarFadeRegion .zw:DistanceFadeMAD
float4 ShadowInjectParams;
// .x:DepthBias, .y:SlopeDepthBias, .z:MaxSlopeDepthBias, .w:Projection parameters
float4 DepthBiasParameters;
/** Whether to compute static shadowing. */
uint bStaticallyShadowed;
/** Shadow depth map computed for static geometry by Lightmass. */
Texture2D StaticShadowDepthTexture;
SamplerState StaticShadowDepthTextureSampler;
/** Transform used for static shadowing by spot and directional lights. */
float4x4 TranslatedWorldToStaticShadowMatrix;
float4 StaticShadowBufferSize;
// Declare shadow sampling function
#include "VolumeLightingCommonSampling.ush"