This code works perfectly in 4.18.3, does not in 4.20.1. It doesn’t give any errors, the shader just doesn’t compile.
float3 res = 0;
float2 invSize = GetPostProcessInputSize(0).zw;
int TexIndex = 14;
float weights] =
{
0.01, 0.02, 0.04, 0.02, 0.01,
0.02, 0.04, 0.08, 0.04, 0.02,
0.04, 0.08, 0.16, 0.08, 0.04,
0.02, 0.04, 0.08, 0.04, 0.02,
0.01, 0.02, 0.04, 0.02, 0.01
};
float offsets] = { 2*a, a, 0, -1*a, -2*a};
uv *= 0.5;
for (int i = 0; i < 5; ++i)
{
float v = uv.y + offsets* * invSize.y;
int temp = i * 5;
for (int j = 0; j < 5; ++j)
{
float u = uv.x + offsets[j] * invSize.x;
float2 uvShifted = uv + float2(u, v);
float weight = weights[temp + j];
float3 tex = SceneTextureLookup(uvShifted, TexIndex, false);
res += tex * weight;
}
}
return float4(res, 1);
Any ideas?