diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl index ee3a5f1f31..16cc7cfbbc 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowUtil.glsl @@ -1,24 +1,24 @@ -/** +/** * @file class1/deferred/shadowUtil.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$ */ @@ -83,7 +83,7 @@ float pcfSpotShadow(sampler2DShadow shadowMap, vec4 stc, float bias_scale, vec2 vec2 off = 1.0/proj_shadow_res; off.y *= 1.5; - + shadow += texture(shadowMap, stc.xyz+vec3(off.x*2.0, off.y, 0.0)); shadow += texture(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)); shadow += texture(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)); @@ -112,7 +112,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen) vec4 spos = vec4(shadow_pos.xyz, 1.0); if (spos.z > -shadow_clip.w) - { + { vec4 lpos; vec4 near_split = shadow_clip*-0.75; vec4 far_split = shadow_clip*-1.25; @@ -122,7 +122,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen) if (spos.z < near_split.z) { lpos = shadow_matrix[3]*spos; - + float w = 1.0; w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; //w = clamp(w, 0.0, 1.0); @@ -138,7 +138,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen) if (spos.z < near_split.y && spos.z > far_split.z) { lpos = shadow_matrix[2]*spos; - + float w = 1.0; w -= max(spos.z-far_split.y, 0.0)/transition_domain.y; w -= max(near_split.z-spos.z, 0.0)/transition_domain.z; @@ -154,7 +154,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen) if (spos.z < near_split.x && spos.z > far_split.y) { lpos = shadow_matrix[1]*spos; - + float w = 1.0; w -= max(spos.z-far_split.x, 0.0)/transition_domain.x; w -= max(near_split.y-spos.z, 0.0)/transition_domain.y; @@ -170,7 +170,7 @@ float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen) if (spos.z > far_split.x) { lpos = shadow_matrix[0]*spos; - + float w = 1.0; w -= max(near_split.x-spos.z, 0.0)/transition_domain.x; //w = clamp(w, 0.0, 1.0); @@ -203,9 +203,9 @@ float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen) vec4 spos = vec4(pos,1.0); if (spos.z > -shadow_clip.w) - { + { vec4 lpos; - + vec4 near_split = shadow_clip*-0.75; vec4 far_split = shadow_clip*-1.25; vec4 transition_domain = near_split-far_split; @@ -216,7 +216,7 @@ float sampleSpotShadow(vec3 pos, vec3 norm, int index, vec2 pos_screen) w -= max(spos.z-far_split.z, 0.0)/transition_domain.z; if (index == 0) - { + { lpos = shadow_matrix[4]*spos; shadow += pcfSpotShadow(shadowMap4, lpos, 0.8, spos.xy)*w; } |