Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2021-03-10 19:43:10 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-03-10 19:57:09 +0300
commit352385d1097adf7c7bc147a31c1608795873ac21 (patch)
tree533e7049aab8a6f00862124850a668cccdfca4b0 /source/blender/draw
parent5ab2252a6631bfa58a3ceb57f9778253a477e642 (diff)
Cleanup: EEVEE: Remove unused function and fix comment
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl11
1 files changed, 1 insertions, 10 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl
index a0bfd440dd9..4398247472d 100644
--- a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl
@@ -50,14 +50,6 @@ OcclusionData unpack_occlusion_data(vec4 v)
return OcclusionData((1.0 - v) * vec4(1, -1, 1, -1) * M_PI, 0.0);
}
-/* Returns maximum screen distance an AO ray can travel for a given view depth, in NDC space. */
-vec2 get_ao_area(float view_depth, float radius)
-{
- float homcco = ProjectionMatrix[2][3] * view_depth + ProjectionMatrix[3][3];
- float max_dist = radius / homcco;
- return vec2(ProjectionMatrix[0][0], ProjectionMatrix[1][1]) * max_dist;
-}
-
vec2 get_ao_noise(void)
{
vec2 noise = texelfetch_noise_tex(gl_FragCoord.xy).xy;
@@ -108,7 +100,7 @@ float search_horizon(vec3 vI,
float depth = textureLod(depth_tx, uv * hizUvScale.xy, floor(lod)).r;
if (depth == 1.0 && inverted == 0.0) {
- /* Skip background. This avoids issues with the thickness heuristic. */
+ /* Skip background. Avoids making shadow on the geometry near the far plane. */
continue;
}
@@ -146,7 +138,6 @@ OcclusionData occlusion_search(
}
vec2 noise = get_ao_noise();
- vec2 area = get_ao_area(vP.z, radius);
vec2 dir = get_ao_dir(noise.x);
vec2 uv = get_uvs_from_view(vP);
vec3 vI = ((ProjectionMatrix[3][3] == 0.0) ? normalize(-vP) : vec3(0.0, 0.0, 1.0));