summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl10
2 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
index 3efc9c1689..7e81516f93 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
@@ -125,6 +125,8 @@ vec4 texture2DLodSpecular(vec2 tc, float lod);
vec4 getPosition(vec2 pos_screen);
+const float M_PI = 3.14159265;
+
void main()
{
#if defined(LOCAL_LIGHT_KILL)
@@ -201,8 +203,12 @@ void main()
dlit = getProjectedLightDiffuseColor( l_dist, proj_tc.xy );
slit = getProjectedLightSpecularColor( pos, n );
- colorDiffuse = shadow * lit * (dlit*0.5 + BRDFLambertian ( reflect0, reflect90, c_diff , specWeight, vh ));
- colorSpec = shadow * lit * (slit + BRDFSpecularGGX( reflect0, reflect90, alphaRough, specWeight, vh, nl, nv, nh ));
+ float exposure = M_PI;
+ dlit *= exposure;
+ slit *= exposure;
+
+ colorDiffuse = shadow * lit * dlit * BRDFLambertian ( reflect0, reflect90, c_diff , specWeight, vh );
+ colorSpec = shadow * lit * slit * BRDFSpecularGGX( reflect0, reflect90, alphaRough, specWeight, vh, nl, nv, nh );
#if DEBUG_PBR_SPOT_DIFFUSE
colorDiffuse = dlit.rgb; colorSpec = vec3(0);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
index 87b7977f64..f186db5a50 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
@@ -99,6 +99,8 @@ vec4 texture2DLodSpecular(vec2 tc, float lod);
vec4 getPosition(vec2 pos_screen);
+const float M_PI = 3.14159265;
+
void main()
{
#if defined(LOCAL_LIGHT_KILL)
@@ -173,8 +175,12 @@ void main()
dlit = getProjectedLightDiffuseColor( l_dist, proj_tc.xy );
slit = getProjectedLightSpecularColor( pos, n );
- colorDiffuse = shadow * dist_atten * nl * (dlit*0.5 + BRDFLambertian ( reflect0, reflect90, c_diff , specWeight, vh ));
- colorSpec = shadow * dist_atten * nl * (slit + BRDFSpecularGGX( reflect0, reflect90, alphaRough, specWeight, vh, nl, nv, nh ));
+ float exposure = M_PI;
+ dlit *= exposure;
+ slit *= exposure;
+
+ colorDiffuse = shadow * lit * dlit * BRDFLambertian ( reflect0, reflect90, c_diff , specWeight, vh );
+ colorSpec = shadow * lit * slit * BRDFSpecularGGX( reflect0, reflect90, alphaRough, specWeight, vh, nl, nv, nh );
#if DEBUG_PBR_SPOT_DIFFUSE
colorDiffuse = dlit.rgb; colorSpec = vec3(0);