summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-13 08:06:17 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-03-13 08:06:17 -0700
commit75dea34e3f80b054c56c38c880166d5e610eef88 (patch)
tree8a8a54cb3e446213b33dcdd64c0c89d3c47369b4 /indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
parentf3ce17701e8dbbbc7a0e8e73c740b161bb2f36c0 (diff)
parent0e178e12562b95915a9a775cd40d3bb44729332c (diff)
Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl10
1 files changed, 3 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
index 6ab966ae01..4bf16b50bf 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/deferredUtil.glsl
@@ -74,7 +74,6 @@ const float ONE_OVER_PI = 0.3183098861;
vec3 srgb_to_linear(vec3 cs);
vec3 atmosFragLightingLinear(vec3 light, vec3 additive, vec3 atten);
-vec3 scaleSoftClipFragLinear(vec3 light);
float calcLegacyDistanceAttenuation(float distance, float falloff)
{
@@ -396,7 +395,7 @@ vec3 pbrIbl(vec3 diffuseColor,
specContrib = specular * ao;
- return (diffuse + specular*0.5) * ao; //reduce by half to place in appropriate color space for atmospherics
+ return (diffuse + specular) * ao;
}
vec3 pbrIbl(vec3 diffuseColor,
@@ -562,16 +561,13 @@ vec3 pbrBaseLight(vec3 diffuseColor, vec3 specularColor, float metallic, vec3 v,
float NdotV = clamp(abs(dot(norm, v)), 0.001, 1.0);
vec3 ibl_spec;
- color += pbrIbl(diffuseColor, specularColor, radiance, irradiance, ao, NdotV, 0.2, ibl_spec);
+ color += pbrIbl(diffuseColor, specularColor, radiance, irradiance, ao, NdotV, perceptualRoughness, ibl_spec);
color += pbrPunctual(diffuseColor, specularColor, perceptualRoughness, metallic, norm, v, normalize(light_dir), specContrib) * sunlit * 2.75 * scol;
specContrib *= sunlit * 2.75 * scol;
specContrib += ibl_spec;
- color += colorEmissive*0.5;
-
- color = atmosFragLightingLinear(color, additive, atten);
- color = scaleSoftClipFragLinear(color);
+ color += colorEmissive;
return color;
}