I am running a PostProcess material that invokes HLSL code which involves a nested for-loop doing scene texture lookups.
for (int i = 0; i < 4; i++)
{
for (int j = 0; j <= Radius.x; j++)
{
for (int k = 0; k <= Radius.y; k++)
{
[stuff]
col = SceneTextureLookup(uvPos, 14, false);
[stuff]
}
}
}
In Unreal 5.0.3 this material cost me about 0.5ms. In 5.1 it is costing me over 80ms, with no apparent changes to the material. I verified SM6 DX12 and Vulkan. Clearly there is a change in the rendering pipeline that is affecting this, but I could not find an obvious culprit in the changelog.
Does anybody know what might have changed?
Only other thing of note is that I am using ViewportUVToSceneTextureUV(UV,14) in a separate custom node…other than that, the material itself is straightforward.
They recently did some changes to the shader code for Unreal Engine Version 5.1. I am not sure if I know the full reason for why you are experiencing these issues, all I know is that the default shading model is set to 6.
Hi, thanks for your reply. Yes, I confirmed the behavior in SM6 and in Vulkan, so it seems that just the switch to SM6 would not explain it. I did go through the changelog but it was not granular enough to show me actual API differences in the RHI, so now I’m looking through Github and taking a look at differences in frames between 5.0.3 and 5.1 in RenderDoc.
Hey!
I experience the same issue with a directional Kuwahara shader!
To be honest, I was quite happy to find this topic and to see that this seems to be in issue with SM6 - i though my shader implementation sucks big time!
Anything came up about this issue yet?
I switched back to SM5 but get warnings that Nanite and Virtal Shadow Maps won’t work unless I switch to SM6.
With SM6, my PPM performance drops and is unusable.