From 2ce4a403d99ccd5c3d608ae9eae2f8b32ec835f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 21 Feb 2021 01:04:33 +0100 Subject: [PATCH] Cleanup: EEVEE: Rename aperture to cone angle when it make sense Aperture for a cone is 2 times the cone angle. --- source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | 2 +- .../blender/draw/engines/eevee/shaders/bsdf_sampling_lib.glsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl index 241b9240606..bc2895ef3df 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl @@ -135,7 +135,7 @@ void accumulate_light(vec3 light, float fac, inout vec4 accum) accum += vec4(light, 1.0) * min(fac, (1.0 - accum.a)); } -/* ----------- Cone Aperture Approximation --------- */ +/* ----------- Cone angle Approximation --------- */ /* Return a fitted cone angle given the input roughness */ float cone_cosine(float r) diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_sampling_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_sampling_lib.glsl index 20c3b64e07a..4abc313d7e3 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_sampling_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_sampling_lib.glsl @@ -34,7 +34,7 @@ float pdf_hemisphere() vec3 sample_ggx(vec3 rand, float a2) { - /* Theta is the aperture angle of the cone */ + /* Theta is the cone angle. */ float z = sqrt((1.0 - rand.x) / (1.0 + a2 * rand.x - rand.x)); /* cos theta */ float r = sqrt(max(0.0, 1.0f - z * z)); /* sin theta */ float x = r * rand.y;