Merge branch 'blender-v2.93-release'
This commit is contained in:
@@ -61,7 +61,7 @@ int EEVEE_occlusion_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
||||
const int fs_size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
|
||||
|
||||
common_data->ao_dist = scene_eval->eevee.gtao_distance;
|
||||
common_data->ao_factor = scene_eval->eevee.gtao_factor;
|
||||
common_data->ao_factor = max_ff(1e-4f, scene_eval->eevee.gtao_factor);
|
||||
common_data->ao_quality = scene_eval->eevee.gtao_quality;
|
||||
|
||||
if (scene_eval->eevee.flag & SCE_EEVEE_GTAO_ENABLED) {
|
||||
|
||||
@@ -386,7 +386,8 @@ float specular_occlusion(
|
||||
float specular_solid_angle = spherical_cap_intersection(M_PI_2, spec_angle, cone_nor_dist);
|
||||
float specular_occlusion = isect_solid_angle / specular_solid_angle;
|
||||
/* Mix because it is unstable in unoccluded areas. */
|
||||
visibility = mix(specular_occlusion, 1.0, pow(visibility, 8.0));
|
||||
float tmp = saturate(pow8(visibility));
|
||||
visibility = mix(specular_occlusion, 1.0, tmp);
|
||||
|
||||
/* Scale by user factor */
|
||||
visibility = pow(saturate(visibility), aoFactor);
|
||||
|
||||
@@ -91,6 +91,8 @@ vec2 sqr(vec2 a) { return a * a; }
|
||||
vec3 sqr(vec3 a) { return a * a; }
|
||||
vec4 sqr(vec4 a) { return a * a; }
|
||||
|
||||
float pow8(float x) { return sqr(sqr(sqr(x))); }
|
||||
|
||||
float len_squared(vec3 a) { return dot(a, a); }
|
||||
float len_squared(vec2 a) { return dot(a, a); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user