diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-06-11 13:38:43 +0200 |
---|---|---|
committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-06-11 13:38:43 +0200 |
commit | d9789bfaf230e301873bd700f6f360d306dc2486 (patch) | |
tree | 4b2dd2680905ca9821e2b11b36aa63dfe7af4f84 /indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl | |
parent | 9f6b8484dfb7dfa981d8a8ac3693d3f68e32bc12 (diff) | |
parent | a73773bc1abdac6bc3beea36fd4ba58eba686e13 (diff) |
Merge branch 'main' of https://github.com/secondlife/viewer into DRTVWR-600-maint-A
# Conflicts:
# indra/llappearance/llavatarappearance.h
# indra/llimage/llimage.cpp
# indra/llmath/llvolume.cpp
# indra/llmath/llvolume.h
# indra/llprimitive/llgltfmaterial.h
# indra/llrender/llrendertarget.cpp
# indra/llrender/llshadermgr.cpp
# indra/newview/lldynamictexture.cpp
# indra/newview/llenvironment.cpp
# indra/newview/llfetchedgltfmaterial.cpp
# indra/newview/llfloaterimagepreview.cpp
# indra/newview/llfloaterimagepreview.h
# indra/newview/llfloaterregioninfo.cpp
# indra/newview/llfloaterregioninfo.h
# indra/newview/llmaniprotate.cpp
# indra/newview/llmaniptranslate.cpp
# indra/newview/llpanelvolume.cpp
# indra/newview/llselectmgr.cpp
# indra/newview/llselectmgr.h
# indra/newview/llsurface.cpp
# indra/newview/llsurface.h
# indra/newview/llsurfacepatch.cpp
# indra/newview/lltexturectrl.cpp
# indra/newview/lltexturectrl.h
# indra/newview/lltinygltfhelper.cpp
# indra/newview/llviewertexture.cpp
# indra/newview/llviewerwindow.cpp
# indra/newview/llviewerwindow.h
# indra/newview/llvlcomposition.cpp
# indra/newview/llvlcomposition.h
# indra/newview/llvocache.cpp
# indra/newview/llvovolume.cpp
# indra/newview/pipeline.cpp
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl index 19fc660c2d..8627ab1852 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl @@ -1,24 +1,24 @@ -/** +/** * @file blurLightF.glsl * * $LicenseInfo:firstyear=2007&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2007, Linden Research, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License only. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -40,18 +40,18 @@ uniform float kern_scale; in vec2 vary_fragcoord; vec4 getPosition(vec2 pos_screen); -vec3 getNorm(vec2 pos_screen); +vec4 getNorm(vec2 pos_screen); -void main() +void main() { vec2 tc = vary_fragcoord.xy; - vec3 norm = getNorm(tc); + vec4 norm = getNorm(tc); vec3 pos = getPosition(tc).xyz; vec4 ccol = texture(lightMap, tc).rgba; - + vec2 dlt = kern_scale * delta / (1.0+norm.xy*norm.xy); dlt /= max(-pos.z*dist_factor, 1.0); - + vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free' vec4 col = defined_weight.xyxx * ccol; @@ -75,15 +75,15 @@ void main() k[1] = (k[0]+k[2])*0.5f; k[3] = (k[2]+k[4])*0.5f; k[5] = (k[4]+k[6])*0.5f; - + for (int i = 1; i < 7; i++) { vec2 samptc = tc + k[i].z*dlt*2.0; samptc /= screen_res; - vec3 samppos = getPosition(samptc).xyz; + vec3 samppos = getPosition(samptc).xyz; float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane - + if (d*d <= pointplanedist_tolerance_pow2) { col += texture(lightMap, samptc)*k[i].xyxx; @@ -95,10 +95,10 @@ void main() { vec2 samptc = tc - k[i].z*dlt*2.0; samptc /= screen_res; - vec3 samppos = getPosition(samptc).xyz; + vec3 samppos = getPosition(samptc).xyz; float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane - + if (d*d <= pointplanedist_tolerance_pow2) { col += texture(lightMap, samptc)*k[i].xyxx; @@ -108,7 +108,7 @@ void main() col /= defined_weight.xyxx; //col.y *= col.y; - + frag_color = max(col, vec4(0)); #ifdef IS_AMD_CARD |