Hi,

Here is my setup for blurred glass material but it does not work. Could you check if I am missing something?

Custom Material Expression I used:

float3 CurColor;

float2 BaseUV = MaterialFloat2(ScreenAlignedPosition(Parameters.ScreenPosition).xy);

float2 NewUV = BaseUV;

float StepSize = Distance / (int) DistanceSteps;

float CurDistance;

float2 CurOffset;

float TwoPi = 6.283185;

float Substep;

float2 ScenePixels=View.RenderTargetSize*BaseUV;
ScenePixels+=View.TemporalAAParams.r;
float2 RandomSamp = ((uint)(ScenePixels.x) + 2 * (uint)(ScenePixels.y)) % 5;
RandomSamp+=TempAARandom+Texture2DSample(Tex,TexSampler,ScenePixels);
RandomSamp/=6;
RandomSamp-=0.5;
RandomSamp*=TempAARandom;

int i;

if (DistanceSteps<1)

{

return DecodeSceneColorForMaterialNode(NewUV);

}

else

{

while ( i < (int) DistanceSteps)

{

CurDistance += StepSize;

for (int j = 0; j < (int) RadialSteps; j++)

{

Substep++;

CurOffset.x = cos(TwoPi*((RandomSamp+Substep) / RadialSteps));

CurOffset.y = sin(TwoPi*((RandomSamp+Substep) / RadialSteps));

CurOffset *=DistanceMask;
NewUV.x = BaseUV.x + (CurOffset.x * (CurDistance));
NewUV.y = BaseUV.y + (CurOffset.y * (CurDistance));
CurColor += DecodeSceneColorForMaterialNode(NewUV);
}
Substep+=0.618;
i++;
}
CurColor = CurColor / ((int)DistanceSteps*(int)RadialSteps);

return CurColor;

}