Cleanup: EEVEE: Rename aperture to cone angle when it make sense

Aperture for a cone is 2 times the cone angle.
This commit is contained in:
2021-02-21 01:04:33 +01:00
parent 33b4a03ca9
commit 2ce4a403d9
2 changed files with 2 additions and 2 deletions

View File

@@ -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)

View File

@@ -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;