SingleLayerWater receives specular highlights from occluded local light sources

Local light sources that should be occluded by shadow casters are still creating specular highlights on SingleLayerWater materials.

Steps to Reproduce
In the sample level provided a lightsource is placed behind a wall shining towards the SingleLayerWater material. Notice the specular highlight of the light source on the SingleLayerWater material even though it should be occluded by the wall

Hello,

Thank you for reaching out.

I’ve been assigned this issue, and we will be looking into these specular highlights for you.

Hello,

It looks like the test project you have attached does not have the Water plugin enabled, and does not show the issue.

Can you please attach a test project that shows the issue, and does not contain other content? Please also include a screenshot of the issue.

The guide for test projects:

[Content removed]

Thanks - I wanted to follow the guide, but the link on [Content removed] is broken [Content removed]

I’ve created a new blank project from scratch that shows the issue. I have not enabled the water plugin as it’s not required to repro the issue.

I can only attach a single item - so the screenshot is in the zip file as Saved/AutoScreenshot.png

Hello,

SingleLayerWater uses forward shading and disables forward local lights, so shadows cast by local lights is not expected to apply.

For more information, please see how “EnvironmentDefines->bDisableForwardLocalLights” is assigned in “FHLSLMaterialTranslator::PrepareEnvironmentDefines()” from HLSLMaterialTranslator.cpp.

You can also look at the function “GetForwardDirectLightingSplit(…)” from ForwardLightingCommon.ush.

Please let us know if this helps.