summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-08-09 01:15:53 -0700
committerPtolemy <ptolemy@lindenlab.com>2022-08-09 01:15:53 -0700
commitf9615f7cffc3c9b2e9c8c4031cc81a3f6eb07afb (patch)
tree704d4a97eb45d08e3543532fa00e863dc0d4e7e7 /indra/newview/app_settings/shaders
parent38b895162ccd15281c214dccd54bacb0c6485c5a (diff)
SL-17763: PBR: Add BRDF to spot light
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl11
2 files changed, 4 insertions, 15 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
index eed714c8db..371c9d88f4 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
@@ -196,12 +196,8 @@ void main()
dlit = getProjectedLightDiffuseColor( l_dist, proj_tc.xy );
slit = getProjectedLightSpecularColor( pos, n );
-// vec3 intensity = getLightIntensitySpot( color, size, lightDist, v );
- colorDiffuse = shadow * dlit * nl * dist_atten;
- colorSpec = shadow * slit * nl * dist_atten;
-
-// colorDiffuse *= BRDFLambertian ( reflect0, reflect90, c_diff , specWeight, vh );
-// colorSpec *= BRDFSpecularGGX( reflect0, reflect90, alphaRough, specWeight, vh, nl, nv, nh );
+ 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 ));
#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 a82581d1a1..3b028d9fae 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl
@@ -167,15 +167,8 @@ void main()
dlit = getProjectedLightDiffuseColor( l_dist, proj_tc.xy );
slit = getProjectedLightSpecularColor( pos, n );
-// vec3 intensity = getLightIntensitySpot( color, size, lightDist, v );
-// colorDiffuse = shadow * dlit * nl;
-// colorSpec = shadow * slit * nl;
-
-// colorDiffuse *= BRDFLambertian ( reflect0, reflect90, c_diff , specWeight, vh );
-// colorSpec *= BRDFSpecularGGX( reflect0, reflect90, alphaRough, specWeight, vh, nl, nv, nh );
-
- colorDiffuse = shadow * dlit * nl * dist_atten;
- colorSpec = shadow * slit * nl * dist_atten;
+ 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 ));
#if DEBUG_PBR_SPOT_DIFFUSE
colorDiffuse = dlit.rgb; colorSpec = vec3(0);