I’m trying to control the look of my shadows (different shadow colors for different materials for example) and I’m struggling to access the shadow map.
I was using the following process (forward shading + LightAttenuationTexture) in 4.18 :
But since 4.19 the LightAttenuationTexture appears to be black and no longer contains shadows from the engine. Is there a way to achieve the same effect with recent version of the engine ? Looking through the .ush files I’ve found the following function :
float ShadowDepth = Texture2DSampleLevel(ForwardLightData.DirectionalLightShadowmapAtlas, ForwardLightData.ShadowmapSampler, ShadowUVs, 0).x;
But trying to access it from a custom node in the material editor crash the engine.
Maybe there is a way with SceneCapture to generate my own shadow map but I don’t know if that’s possible to compute it for a point light ?
Any help appreciated !
edit : found this related issue : Unreal Engine Issues and Bug Tracker (UE-61513)