diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-06-29 17:49:10 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-06-29 17:49:10 -0700 |
commit | 251b75ea2ed5e652c245f9bed33ff96092b830fe (patch) | |
tree | 228251b7cb5ef7237068323616d427e2497af9fb /indra | |
parent | 36fd0f7ca932cce5cd3614c16cd26aceedf57952 (diff) |
SL-17274: PBR: Add c_diff and fix kDiffuse
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index a64d059d06..2749dfed30 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -222,6 +222,7 @@ void main() #endif float metal = packedORM.b; + vec3 c_diff = mix(diffuse.rgb,vec3(0),metal); vec3 reflect90 = vec3(0); vec3 v = -normalize(pos.xyz); #if DEBUG_PBR_VERT2CAM1 @@ -276,7 +277,7 @@ void main() vec3 avg = specWeight * (reflect0 + (1.0 - reflect0) / 21.0); vec3 AvgEms = avg * Ems; vec3 FmsEms = AvgEms * FssEssLambert / (1.0 - AvgEms); - vec3 kDiffuse = colorDiffuse * (1.0 - FssEssLambert + FmsEms); + vec3 kDiffuse = c_diff * (1.0 - FssEssLambert + FmsEms); colorDiffuse += (FmsEms + kDiffuse) * irradiance; colorDiffuse *= packedORM.r; // Occlusion -- NOTE: pbropaque will need occlusion_strength pre-multiplied into spec.r @@ -330,6 +331,9 @@ void main() #if DEBUG_PBR_BRDF_SCALE_BIAS color.rgb = vec3(vScaleBias,0.0); #endif + #if DEBUG_PBR_DIFFUSE_C + color.rgb = c_diff; + #endif #if DEBUG_PBR_DIFFUSE_K color.rgb = kDiffuse; #endif |