Fix issue #51897 (horizon occlusion causing black blob), fix ver. SP1
No, not service pack 1. Removes comments from the original fix commit.
This commit is contained in:
parent
16642e2838
commit
324c487c63
2 changed files with 2 additions and 2 deletions
|
@ -1688,12 +1688,12 @@ FRAGMENT_SHADER_CODE
|
||||||
#ifdef USE_RADIANCE_MAP
|
#ifdef USE_RADIANCE_MAP
|
||||||
|
|
||||||
vec3 ref_vec = reflect(-eye_position, N);
|
vec3 ref_vec = reflect(-eye_position, N);
|
||||||
|
float horizon = min(1.0 + dot(ref_vec, normal), 1.0);
|
||||||
ref_vec = normalize((radiance_inverse_xform * vec4(ref_vec, 0.0)).xyz);
|
ref_vec = normalize((radiance_inverse_xform * vec4(ref_vec, 0.0)).xyz);
|
||||||
|
|
||||||
ref_vec.z *= -1.0;
|
ref_vec.z *= -1.0;
|
||||||
|
|
||||||
specular_light = textureCubeLod(radiance_map, ref_vec, roughness * RADIANCE_MAX_LOD).xyz * bg_energy;
|
specular_light = textureCubeLod(radiance_map, ref_vec, roughness * RADIANCE_MAX_LOD).xyz * bg_energy;
|
||||||
float horizon = min(1.0 + dot(ref_vec, normal), 1.0);
|
|
||||||
specular_light *= horizon * horizon;
|
specular_light *= horizon * horizon;
|
||||||
#ifndef USE_LIGHTMAP
|
#ifndef USE_LIGHTMAP
|
||||||
{
|
{
|
||||||
|
|
|
@ -1884,10 +1884,10 @@ FRAGMENT_SHADER_CODE
|
||||||
{ //read radiance from dual paraboloid
|
{ //read radiance from dual paraboloid
|
||||||
|
|
||||||
vec3 ref_vec = reflect(-eye_vec, normal);
|
vec3 ref_vec = reflect(-eye_vec, normal);
|
||||||
|
float horizon = min(1.0 + dot(ref_vec, normal), 1.0);
|
||||||
ref_vec = normalize((radiance_inverse_xform * vec4(ref_vec, 0.0)).xyz);
|
ref_vec = normalize((radiance_inverse_xform * vec4(ref_vec, 0.0)).xyz);
|
||||||
vec3 radiance = textureDualParaboloid(radiance_map, ref_vec, roughness) * bg_energy;
|
vec3 radiance = textureDualParaboloid(radiance_map, ref_vec, roughness) * bg_energy;
|
||||||
env_reflection_light = radiance;
|
env_reflection_light = radiance;
|
||||||
float horizon = min(1.0 + dot(ref_vec, normal), 1.0);
|
|
||||||
env_reflection_light *= horizon * horizon;
|
env_reflection_light *= horizon * horizon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue