float4 normal_spec = tex2D (_CameraNormalsTexture, i.uv);
float4 result = float4(0, 0, 0, 1);
return (normal_spec.a < 0.001) ? result : calculateSSR(i, result, normal_spec);
I know what is normal_spec.xyz.
but what is normal_spec.a ?
There is some explanation here:
When it comes to SSR, the advice is to use the normals from the G-buffer instead when rendering deferred. Those are just world space normals scaled from the -1 to 1 range to the 0 to 1 range:
float3 normal_world = normalize(2.0 * tex2Dlod(_CameraGBufferTexture2, float4(uv_screen, 0.0, 0.0)).rgb - 1.0);
I’m seeing reports that _CameraNormalsTexture actually contains the same information in deferred, but I’ve never used it.