diff options
author | Graham Linden <graham@lindenlab.com> | 2019-06-18 14:33:28 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-06-18 14:33:28 -0700 |
commit | 5bd055fe585233b3c43e02f2082f5a95f79b825b (patch) | |
tree | 412b48d1a20c9eac4e139a66942024dde181c076 /indra | |
parent | 782ddfdb48e1bdf6995783c11342eed2de4a30bb (diff) |
SL-10829 the 2nd
Made pointLightF use correct colorspace as multiPoint already was.
Diffstat (limited to 'indra')
4 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 241857dd92..20dc03d7a5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -122,9 +122,9 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec lv = normalize(lv); //distance attenuation - fa += 1.0f; float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0); dist_atten *= dist_atten; + dist_atten *= 2.0f; if (dist_atten <= 0.0) { diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 8ebb2f44d3..6e5ec7d34c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -117,10 +117,9 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe lv = normalize(lv); //distance attenuation - fa += 1.0f; float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0); dist_atten *= dist_atten; - //dist_atten *= 2.0f; + dist_atten *= 2.0f; if (dist_atten <= 0.0) { diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl index b3ce1ce2e0..d805c9ea48 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl @@ -58,6 +58,7 @@ uniform vec4 viewport; vec3 getNorm(vec2 pos_screen); vec4 getPosition(vec2 pos_screen); +vec3 srgb_to_linear(vec3 c); void main() { @@ -89,6 +90,7 @@ void main() float noise = texture2D(noiseMap, frag.xy/128.0).b; vec3 col = texture2DRect(diffuseRect, frag.xy).rgb; + col.rgb = srgb_to_linear(col.rgb); float fa = falloff+1.0; float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index d1a6fd12f2..bbc521f90e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6350,7 +6350,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) F32 linatten = x / (light_radius); // % of brightness at radius // get falloff to match for forward deferred rendering lights - F32 falloff = light->getLightFalloff() + (sRenderDeferred ? 0.0 : 1.f); + F32 falloff = light->getLightFalloff() + (sRenderDeferred ? 1.0 : 0.f); mHWLightColors[cur_light] = light_color; LLLightState* light_state = gGL.getLight(cur_light); |