             }
 
             /*!
+             * @brief Get depth of the specified position.
+             * @param [in] p  3D-position.
+             * @return Depth of the p.
+             */
+            float getDepth(float3 p)
+            {
+                const float4 projPos = UnityObjectToClipPos(float4(p, 1.0));
+                return projPos.z / projPos.w;
+            }
+
+            /*!
              * @brief Get color of reflection probe.
              * @param [in] refDir  Reflect direction.
              * @return Color of reflection probe.

                // Discard if it is determined that the ray is not in collision.
                clip(_MinRayDist - d);

                const float finalPos = localSpaceCameraPos + rayDir * t;

                // Normal.
                const float3 normal = getNormal(finalPos);
                // Directional light angles to local coordinates.
                const float3 lightDir = normalize(mul(unity_WorldToObject, _WorldSpaceLightPos0).xyz);
                // View direction.
                const float3 viewDir = normalize(localSpacaCameraPos - finalPos);

                // Lambertian reflectance.
                const float3 lightCol = _LightColor0.rgb * LIGHT_ATTENUATION(i);
                const float nDotL = saturate(dot(normal, lightDir));

#if defined(_DIFFUSEMODE_SQURED_HALF_LEMBERT)
                const float3 diffuse = lightCol * sq(nDotL * 0.5 + 0.5);
#elif defined(_DIFFUSEMODE_HALF_LEMBERT)
                const float3 diffuse = lightCol * (nDotL * 0.5 + 0.5);
#elif defined(_DIFFUSEMODE_LEMBERT)
                const float3 diffuse = lightCol * nDotL;
#else
                const float3 diffuse = float3(1.0, 1.0, 1.0);
#endif  // defined(_DIFFUSEMODE_SQURED_HALF_LEMBERT)

                // Specular reflection.
#ifdef _SPECULARMODE_HALF_VECTOR
                const float3 specular = pow(max(0.0, dot(normalize(lightDir + viewDir), normal)), _SpecularPower) * _SpecularColor.xyz * lightCol;
#elif _SPECULARMODE_ORIGINAL
                const float3 specular = pow(max(0.0, dot(reflect(-lightDir, normal), viewDir)), _SpecularPower) * _SpecularColor.xyz * lightCol;
#else
                const float3 specular = float3(0.0, 0.0, 0.0);
#endif  // _SPECULARMODE_HALF_VECTOR


            /*!
             * @brief Fragment shader function.
             * @param [in] fi  Input data from vertex shader
             * @return Output of each texels (fout).
             */
            fout frag(v2f fi)
            {
                // Define ray direction by finding the direction of the local coordinates
                // of the mesh from the local coordinates of the viewpoint.
                const float3 rayDir = normalize(fi.pos.xyz - fi.localSpaceCameraPos);
                const float invScale = 1.0 / _Scale;

                // Distance.
