From b7cb20bfcdd0a8dab7882ccaad0982d3cdd65d5f Mon Sep 17 00:00:00 2001 From: Ptolemy <ptolemy@lindenlab.com> Date: Wed, 24 Aug 2022 22:59:28 -0700 Subject: [PATCH] SL-17702: PBR: Document lights are in linear from C++ side --- .../app_settings/shaders/class3/deferred/multiPointLightF.glsl | 2 +- .../app_settings/shaders/class3/deferred/pointLightF.glsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl index 98a03c2aaaa..1175f3e644c 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl @@ -100,7 +100,7 @@ void main() for (int light_idx = 0; light_idx < LIGHT_COUNT; ++light_idx) { - vec3 lightColor = light_col[ light_idx ].rgb; + vec3 lightColor = light_col[ light_idx ].rgb; // Already in linear, see pipeline.cpp: volume->getLightLinearColor(); float falloff = light_col[ light_idx ].a; float lightSize = light [ light_idx ].w; vec3 lv =(light [ light_idx ].xyz - pos); diff --git a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl index d65a53b6d3b..6f39b0173be 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl @@ -106,7 +106,7 @@ void main() vec3 colorEmissive = spec.rgb; // PBR sRGB Emissive. See: pbropaqueF.glsl vec3 packedORM = texture2DRect(emissiveRect, tc).rgb; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl float lightSize = size; - vec3 lightColor = color; + vec3 lightColor = color; // Already in linear, see pipeline.cpp: volume->getLightLinearColor(); vec3 c_diff, reflect0, reflect90; float alphaRough, specWeight; -- GitLab