diff options
author | Dave Parks <davep@lindenlab.com> | 2023-02-03 19:45:31 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-02-03 19:45:31 -0600 |
commit | 1c2410b8af62254e96d60b2ae2e411d4756215e4 (patch) | |
tree | c702253a1458a34dfa4149717948a3413dc017f7 /indra/newview/app_settings/shaders/class1 | |
parent | eb341f856cb55155cce5e6749cef44707badb137 (diff) |
SL-19148 Decruft followthrough -- decruft shader tree and some remaining forward rendering code.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
64 files changed, 0 insertions, 3550 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl deleted file mode 100644 index f4ec1ec532..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @file alphaF.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$ - */ - -//class1/deferred/alphaF.glsl - - -out vec4 frag_color; - -void main() -{ - frag_color = vec4(1,0,1,0.5); -} - diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl deleted file mode 100644 index 850f7ebb38..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @file fullbrightShinyF.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$ - */ - -//debug stub - -out vec4 frag_color; - -void main() -{ - frag_color = vec4(0.25, 0.5, 0, 1.0); -} - diff --git a/indra/newview/app_settings/shaders/class1/deferred/indirect.glsl b/indra/newview/app_settings/shaders/class1/deferred/indirect.glsl deleted file mode 100644 index 49bfa660f8..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/indirect.glsl +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @file class1/deferred/indirect.glsl - * - * $LicenseInfo:firstyear=2018&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$ - */ - -vec3 getIndirect(vec3 ambient, vec3 norm, vec3 pos, vec2 pos_screen) -{ - return ambient; -} - diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl deleted file mode 100644 index 185c1150ef..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @file luminanceF.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$ - */ - -/*[EXTRA_CODE_HERE]*/ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -uniform sampler2D diffuseMap; -VARYING vec2 vary_fragcoord; - -void main() -{ - frag_color = texture2D(diffuseMap, vary_fragcoord.xy); -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl deleted file mode 100644 index 5488a63c6a..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/luminanceV.glsl +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @file giV.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$ - */ - -uniform mat4 modelview_projection_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec4 diffuse_color; - -VARYING vec2 vary_fragcoord; -VARYING vec4 vertex_color; - -uniform vec2 screen_res; - -void main() -{ - //transform vertex - vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0); - gl_Position = pos; - - vary_fragcoord = (pos.xy * 0.5 + 0.5); - - vertex_color = diffuse_color; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl deleted file mode 100644 index 51a36935f2..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ /dev/null @@ -1,52 +0,0 @@ -/** -* @file materialF.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$ -*/ - - -/*[EXTRA_CODE_HERE]*/ - -//class1/deferred/materialF.glsl - -// Debug stub for non-pbr material - -#define DIFFUSE_ALPHA_MODE_BLEND 1 - -#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND) -out vec4 frag_color; -#else -out vec4 frag_data[4]; -#endif - -void main() -{ -#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND) - frag_color = vec4(1, 0, 0, 0.5); -#else - // emissive red PBR material - frag_data[0] = vec4(0, 0, 0, 0); - frag_data[1] = vec4(0, 0, 0, 0); - frag_data[2] = vec4(1, 0, 0, GBUFFER_FLAG_HAS_PBR); - frag_data[3] = vec4(1, 0, 0, 0); -#endif -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl deleted file mode 100644 index 8fdb5e7154..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file class1/deferred/multiPointLightF.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$ - */ - - // debug stub - -out vec4 frag_color; - -void main() -{ - frag_color = vec4(0.5, 0.5, 0.0, 0.0); -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl deleted file mode 100644 index d71dc76423..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file multiPointLightV.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$ - */ - -ATTRIBUTE vec3 position; - -VARYING vec4 vary_fragcoord; - -void main() -{ - //transform vertex - vec4 pos = vec4(position.xyz, 1.0); - vary_fragcoord = pos; - - gl_Position = pos; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl deleted file mode 100644 index e9dac711c3..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl +++ /dev/null @@ -1,283 +0,0 @@ -/** - * @file multiSpotLightF.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$ - */ - - - -//class 1 -- no shadows - -#extension GL_ARB_texture_rectangle : enable -#extension GL_ARB_shader_texture_lod : enable - -/*[EXTRA_CODE_HERE]*/ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -uniform sampler2D diffuseRect; -uniform sampler2D specularRect; -uniform sampler2D depthMap; -uniform sampler2D normalMap; -uniform sampler2D noiseMap; -uniform sampler2D projectionMap; -uniform sampler2D lightFunc; - -uniform mat4 proj_mat; //screen space to light space -uniform float proj_near; //near clip for projection -uniform vec3 proj_p; //plane projection is emitting from (in screen space) -uniform vec3 proj_n; -uniform float proj_focus; //distance from plane to begin blurring -uniform float proj_lod; //(number of mips in proj map) -uniform float proj_range; //range between near clip and far clip plane of projection -uniform float proj_ambient_lod; -uniform float proj_ambiance; -uniform float near_clip; -uniform float far_clip; - -uniform vec3 proj_origin; //origin of projection to be used for angular attenuation -uniform float sun_wash; - -uniform vec3 center; -uniform vec3 color; -uniform float falloff; -uniform float size; - -VARYING vec4 vary_fragcoord; -uniform vec2 screen_res; - -uniform mat4 inv_proj; -vec3 getNorm(vec2 pos_screen); -vec3 srgb_to_linear(vec3 c); -float getDepth(vec2 tc); - -vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod) -{ - vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = srgb_to_linear(ret.rgb); - - vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); - - float det = min(lod/(proj_lod*0.5), 1.0); - - float d = min(dist.x, dist.y); - - d *= min(1, d * (proj_lod - lod)); - - float edge = 0.25*det; - - ret *= clamp(d/edge, 0.0, 1.0); - - return ret; -} - -vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod) -{ - vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = srgb_to_linear(ret.rgb); - - vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); - - float det = min(lod/(proj_lod*0.5), 1.0); - - float d = min(dist.x, dist.y); - - float edge = 0.25*det; - - ret *= clamp(d/edge, 0.0, 1.0); - - return ret; -} - -vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod) -{ - vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = srgb_to_linear(ret.rgb); - - vec2 dist = tc-vec2(0.5); - - float d = dot(dist,dist); - - ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0); - - return ret; -} - -vec4 getPosition(vec2 pos_screen); - -void main() -{ - vec3 col = vec3(0,0,0); - -#if defined(LOCAL_LIGHT_KILL) - discard; -#else - vec4 frag = vary_fragcoord; - frag.xyz /= frag.w; - frag.xyz = frag.xyz*0.5+0.5; - - vec3 pos = getPosition(frag.xy).xyz; - vec3 lv = center.xyz-pos.xyz; - float dist = length(lv); - dist /= size; - if (dist > 1.0) - { - discard; - } - - float envIntensity = texture2D(normalMap, frag.xy).z; - vec3 norm = getNorm(frag.xy); - - float l_dist = -dot(lv, proj_n); - - vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0)); - if (proj_tc.z < 0.0) - { - discard; - } - - proj_tc.xyz /= proj_tc.w; - - float fa = falloff+1.0; - float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0); - dist_atten *= dist_atten; - dist_atten *= 2.0; - - - if (dist_atten <= 0.0) - { - discard; - } - - float noise = texture2D(noiseMap, frag.xy).b; - dist_atten *= noise; - - lv = proj_origin-pos.xyz; - lv = normalize(lv); - float da = dot(norm, lv); - - - vec3 diff_tex = texture2D(diffuseRect, frag.xy).rgb; - - vec3 dlit = vec3(0, 0, 0); - - - if (proj_tc.z > 0.0 && - proj_tc.x < 1.0 && - proj_tc.y < 1.0 && - proj_tc.x > 0.0 && - proj_tc.y > 0.0) - { - float lit = 0.0; - float amb_da = proj_ambiance; - - if (da > 0.0) - { - float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0); - float lod = diff * proj_lod; - - vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod); - - dlit = color.rgb * plcol.rgb * plcol.a; - - lit = da * dist_atten; - - col = dlit*lit*diff_tex; - amb_da += (da*0.5)*proj_ambiance; - } - //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0); - vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod); - - amb_da += (da*da*0.5+0.5)*proj_ambiance; - - amb_da *= dist_atten * noise; - - amb_da = min(amb_da, 1.0-lit); - col += amb_da*color.rgb*diff_tex*amb_plcol.rgb*amb_plcol.a; - } - - - vec4 spec = texture2D(specularRect, frag.xy); - - if (spec.a > 0.0) - { - dlit *= min(da*6.0, 1.0) * dist_atten; - - vec3 npos = -normalize(pos); - - //vec3 ref = dot(pos+lv, norm); - vec3 h = normalize(lv+npos); - float nh = dot(norm, h); - float nv = dot(norm, npos); - float vh = dot(npos, h); - float sa = nh; - float fres = pow(1 - dot(h, npos), 5)*0.4+0.5; - - float gtdenom = 2 * nh; - float gt = max(0, min(gtdenom * nv / vh, gtdenom * da / vh)); - - if (nh > 0.0) - { - float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da); - col += dlit*scol*spec.rgb; - //col += spec.rgb; - } - } - - if (envIntensity > 0.0) - { - vec3 ref = reflect(normalize(pos), norm); - - //project from point pos in direction ref to plane proj_p, proj_n - vec3 pdelta = proj_p-pos; - float ds = dot(ref, proj_n); - - if (ds < 0.0) - { - vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds; - - vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0)); - - if (stc.z > 0.0) - { - stc /= stc.w; - - if (stc.x < 1.0 && - stc.y < 1.0 && - stc.x > 0.0 && - stc.y > 0.0) - { - col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, (1 - spec.a) * (proj_lod * 0.6)).rgb * envIntensity; - } - } - } - } -#endif - - //output linear, sum of lights will be gamma corrected later - frag_color.rgb = col; - frag_color.a = 0.0; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl deleted file mode 100644 index fc1024f4f1..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/pbralphaF.glsl +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @file class1\deferred\pbralphaF.glsl - * - * $LicenseInfo:firstyear=2022&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2022, 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$ - */ - -/*[EXTRA_CODE_HERE]*/ - -out vec4 frag_color; - -void main() -{ - frag_color = vec4(0,1,0,0.5); -} - diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl deleted file mode 100644 index a025c4a1b4..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file class1\deferred\pointLightF.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$ - */ - -// debug stub -out vec4 frag_color; - -void main() -{ - frag_color = vec4(0.0, 0.5, 0.5, 0.0); -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl deleted file mode 100644 index 3da8531442..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/pointLightV.glsl +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @file pointLightV.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$ - */ - -uniform mat4 modelview_projection_matrix; -uniform mat4 modelview_matrix; - -ATTRIBUTE vec3 position; - -uniform vec3 center; -uniform float size; - -VARYING vec4 vary_fragcoord; -VARYING vec3 trans_center; - -void main() -{ - //transform vertex - vec3 p = position*size+center; - vec4 pos = modelview_projection_matrix * vec4(p.xyz, 1.0); - vary_fragcoord = pos; - trans_center = (modelview_matrix*vec4(center.xyz, 1.0)).xyz; - gl_Position = pos; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl deleted file mode 100644 index 8111f43c28..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @file postgiF.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$ - */ - -/*[EXTRA_CODE_HERE]*/ - - #ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -uniform sampler2D depthMap; -uniform sampler2D normalMap; -uniform sampler2D giLightMap; -uniform sampler2D noiseMap; - -uniform vec2 kern[32]; -uniform float dist_factor; -uniform float blur_size; -uniform vec2 delta; -uniform int kern_length; -uniform float kern_scale; -uniform vec3 blur_quad; - -VARYING vec2 vary_fragcoord; - -uniform mat4 inv_proj; -uniform vec2 screen_res; - -vec4 getPosition(vec2 pos_screen); - -void main() -{ - vec3 norm = texture2D(normalMap, vary_fragcoord.xy).xyz; - norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm - vec3 pos = getPosition(vary_fragcoord.xy).xyz; - - vec3 ccol = texture2D(giLightMap, vary_fragcoord.xy).rgb; - vec2 dlt = kern_scale * delta/(1.0+norm.xy*norm.xy); - dlt /= max(-pos.z*dist_factor, 1.0); - float defined_weight = kern[0].x; - vec3 col = vec3(0.0); - - for (int i = 0; i < kern_length; i++) - { - vec2 tc = vary_fragcoord.xy + kern[i].y*dlt; - vec3 sampNorm = texture2D(normalMap, tc.xy).xyz; - sampNorm = vec3((sampNorm.xy-0.5)*2.0,sampNorm.z); // unpack norm - - float d = dot(norm.xyz, sampNorm); - - if (d > 0.8) - { - vec3 samppos = getPosition(tc.xy).xyz; - samppos -= pos; - if (dot(samppos,samppos) < -0.05*pos.z) - { - col += texture2D(giLightMap, tc).rgb*kern[i].x; - defined_weight += kern[i].x; - } - } - } - - col /= defined_weight; - - //col = ccol; - - col = col*col*blur_quad.x + col*blur_quad.y + blur_quad.z; - - frag_color.rgb = col; - -#ifdef IS_AMD_CARD - // If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts. - vec2 dummy1 = kern[0]; - vec2 dummy2 = kern[31]; -#endif -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/reflectionProbeF.glsl deleted file mode 100644 index 2ffe688524..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/reflectionProbeF.glsl +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @file class1/deferred/reflectionProbeF.glsl - * - * $LicenseInfo:firstyear=2022&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2022, 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$ - */ - -// fallback stub -- will be used if actual reflection probe shader failed to load (output pink so it's obvious) -void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, - vec2 tc, vec3 pos, vec3 norm, float glossiness, bool errorCorrect) -{ - ambenv = vec3(1,0,1); - glossenv = vec3(1,0,1); -} - -void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, - vec2 tc, vec3 pos, vec3 norm, float glossiness) -{ - sampleReflectionProbes(ambenv, glossenv, - pos, norm, glossiness, false); -} - -vec4 sampleReflectionProbesDebug(vec3 pos) -{ - //output green to debug display - return vec4(0, 1, 0, 0.5); -} - -void sampleReflectionProbesLegacy(inout vec3 ambenv, inout vec3 glossenv, inout vec3 legacyenv, - vec3 pos, vec3 norm, float glossiness, float envIntensity) -{ - ambenv = vec3(1,0,1); - glossenv = vec3(1,0,1); - legacyenv = vec3(1,0,1); -} - -void applyGlossEnv(inout vec3 color, vec3 glossenv, vec4 spec, vec3 pos, vec3 norm) -{ - -} - -void applyLegacyEnv(inout vec3 color, vec3 legacyenv, vec4 spec, vec3 pos, vec3 norm, float envIntensity) -{ - -} - diff --git a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflPostF.glsl b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflPostF.glsl deleted file mode 100644 index df16e7f0e7..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflPostF.glsl +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file class3/deferred/screenSpaceReflPostF.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$ - */ - - // debug stub - -out vec4 frag_color; - -void main() -{ - frag_color = vec4(0.5, 0.4, 0.1, 0); -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflPostV.glsl b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflPostV.glsl deleted file mode 100644 index 966e7e1cbb..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflPostV.glsl +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @file class3/deferred/screenSpaceReflPostV.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$ - */ - -ATTRIBUTE vec3 position; - -uniform vec2 screen_res; - -VARYING vec2 vary_fragcoord; - -void main() -{ - //transform vertex - vec4 pos = vec4(position.xyz, 1.0); - gl_Position = pos; - - vary_fragcoord = pos.xy * 0.5 + 0.5; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl deleted file mode 100644 index 152402907b..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ /dev/null @@ -1,165 +0,0 @@ -/** - * @file class1/deferred/softenLightF.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$ - */ - -#extension GL_ARB_texture_rectangle : enable -#extension GL_ARB_shader_texture_lod : enable - -/*[EXTRA_CODE_HERE]*/ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -uniform sampler2D diffuseRect; -uniform sampler2D specularRect; -uniform sampler2D normalMap; -uniform sampler2D lightMap; -uniform sampler2D depthMap; -uniform samplerCube environmentMap; -uniform sampler2D lightFunc; - -uniform float blur_size; -uniform float blur_fidelity; - -// Inputs -uniform mat3 env_mat; - -uniform vec3 sun_dir; -uniform vec3 moon_dir; -uniform int sun_up_factor; -VARYING vec2 vary_fragcoord; - -uniform mat4 inv_proj; -uniform vec2 screen_res; - -vec3 getNorm(vec2 pos_screen); -vec4 getPositionWithDepth(vec2 pos_screen, float depth); -float getDepth(vec2 pos_screen); - -void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao); -float getAmbientClamp(); -vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten); -vec3 scaleSoftClipFrag(vec3 l); -vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten); -vec3 fullbrightScaleSoftClip(vec3 light); - -vec3 linear_to_srgb(vec3 c); -vec3 srgb_to_linear(vec3 c); - -#ifdef WATER_FOG -vec4 applyWaterFogView(vec3 pos, vec4 color); -#endif - -void main() -{ - vec2 tc = vary_fragcoord.xy; - float depth = getDepth(tc); - vec4 pos = getPositionWithDepth(tc, depth); - vec4 norm = texture2D(normalMap, tc); - float envIntensity = norm.z; - norm.xyz = getNorm(tc); - - vec3 light_dir = (sun_up_factor == 1) ? sun_dir : moon_dir; - float da = clamp(dot(norm.xyz, light_dir.xyz), 0.0, 1.0); - float light_gamma = 1.0/1.3; - da = pow(da, light_gamma); - - vec4 diffuse = texture2D(diffuseRect, tc); - - //convert to gamma space - diffuse.rgb = linear_to_srgb(diffuse.rgb); // SL-14035 - - vec4 spec = texture2D(specularRect, vary_fragcoord.xy); - vec3 color = vec3(0); - float bloom = 0.0; - { - float ambocc = 1.0; // no AO... - - vec3 sunlit; - vec3 amblit; - vec3 additive; - vec3 atten; - - calcAtmosphericVars(pos.xyz, light_dir, ambocc, sunlit, amblit, additive, atten, false); - - color.rgb = amblit; - - float ambient = min(abs(dot(norm.xyz, sun_dir.xyz)), 1.0); - ambient *= 0.5; - ambient *= ambient; - ambient = (1.0 - ambient); - - color.rgb *= ambient; - - vec3 sun_contrib = da * sunlit; - - color.rgb += sun_contrib; - - color.rgb *= diffuse.rgb; - - vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz)); - - if (spec.a > 0.0) // specular reflection - { - float sa = dot(refnormpersp, light_dir.xyz); - vec3 dumbshiny = sunlit * (texture2D(lightFunc, vec2(sa, spec.a)).r); - - // add the two types of shiny together - vec3 spec_contrib = dumbshiny * spec.rgb; - bloom = dot(spec_contrib, spec_contrib) / 6; - color.rgb += spec_contrib; - } - - color.rgb = mix(color.rgb, diffuse.rgb, diffuse.a); - - if (envIntensity > 0.0) - { //add environmentmap - vec3 env_vec = env_mat * refnormpersp; - vec3 reflected_color = textureCube(environmentMap, env_vec).rgb; - color = mix(color.rgb, reflected_color, envIntensity); - } - - if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_ATMOS)) - { - color = mix(atmosFragLighting(color, additive, atten), fullbrightAtmosTransportFrag(color, additive, atten), diffuse.a); - color = mix(scaleSoftClipFrag(color), fullbrightScaleSoftClip(color), diffuse.a); - } - - #ifdef WATER_FOG - vec4 fogged = applyWaterFogView(pos.xyz,vec4(color, bloom)); - color = fogged.rgb; - bloom = fogged.a; - #endif - - } - - // convert to linear as fullscreen lights need to sum in linear colorspace - // and will be gamma (re)corrected downstream... - - frag_color.rgb = srgb_to_linear(color.rgb); - frag_color.a = bloom; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl deleted file mode 100644 index 23ad332db4..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightV.glsl +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @file softenLightV.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$ - */ - -ATTRIBUTE vec3 position; - -uniform vec2 screen_res; - -void setAtmosAttenuation(vec3 c); -void setAdditiveColor(vec3 c); - -VARYING vec2 vary_fragcoord; -void main() -{ - //transform vertex - vec4 pos = vec4(position.xyz, 1.0); - gl_Position = pos; - // appease OSX GLSL compiler/linker by touching all the varyings we said we would - setAtmosAttenuation(vec3(1)); - setAdditiveColor(vec3(0)); - vary_fragcoord = (pos.xy*0.5+0.5); -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl deleted file mode 100644 index 0376f42319..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl +++ /dev/null @@ -1,278 +0,0 @@ -/** - * @file spotLightF.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$ - */ - -#extension GL_ARB_texture_rectangle : enable -#extension GL_ARB_shader_texture_lod : enable - -/*[EXTRA_CODE_HERE]*/ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -//class 1 -- no shadows - -uniform sampler2D diffuseRect; -uniform sampler2D specularRect; -uniform sampler2D depthMap; -uniform sampler2D normalMap; -uniform samplerCube environmentMap; -uniform sampler2D noiseMap; -uniform sampler2D projectionMap; -uniform sampler2D lightFunc; - -uniform mat4 proj_mat; //screen space to light space -uniform float proj_near; //near clip for projection -uniform vec3 proj_p; //plane projection is emitting from (in screen space) -uniform vec3 proj_n; -uniform float proj_focus; //distance from plane to begin blurring -uniform float proj_lod; //(number of mips in proj map) -uniform float proj_range; //range between near clip and far clip plane of projection -uniform float proj_ambient_lod; -uniform float proj_ambiance; -uniform float near_clip; -uniform float far_clip; - -uniform vec3 proj_origin; //origin of projection to be used for angular attenuation -uniform float sun_wash; - -uniform float size; -uniform vec3 color; -uniform float falloff; - -VARYING vec3 trans_center; -VARYING vec4 vary_fragcoord; -uniform vec2 screen_res; - -uniform mat4 inv_proj; - -vec3 getNorm(vec2 pos_screen); -vec3 srgb_to_linear(vec3 c); - -vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod) -{ - vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = srgb_to_linear(ret.rgb); - - vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); - - float det = min(lod/(proj_lod*0.5), 1.0); - - float d = min(dist.x, dist.y); - - d *= min(1, d * (proj_lod - lod)); - - float edge = 0.25*det; - - ret *= clamp(d/edge, 0.0, 1.0); - - return ret; -} - -vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod) -{ - vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = srgb_to_linear(ret.rgb); - - vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); - - float det = min(lod/(proj_lod*0.5), 1.0); - - float d = min(dist.x, dist.y); - - float edge = 0.25*det; - - ret *= clamp(d/edge, 0.0, 1.0); - - return ret; -} - -vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod) -{ - vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = srgb_to_linear(ret.rgb); - - vec2 dist = tc-vec2(0.5); - - float d = dot(dist,dist); - - ret *= min(clamp((0.25-d)/0.25, 0.0, 1.0), 1.0); - - return ret; -} - -vec4 getPosition(vec2 pos_screen); - -void main() -{ - vec3 col = vec3(0,0,0); - -#if defined(LOCAL_LIGHT_KILL) - discard; -#else - vec4 frag = vary_fragcoord; - frag.xyz /= frag.w; - frag.xyz = frag.xyz*0.5+0.5; - - vec3 pos = getPosition(frag.xy).xyz; - vec3 lv = trans_center.xyz-pos.xyz; - float dist = length(lv); - dist /= size; - if (dist > 1.0) - { - discard; - } - - vec3 norm = texture2D(normalMap, frag.xy).xyz; - float envIntensity = norm.z; - norm = getNorm(frag.xy); - norm = normalize(norm); - float l_dist = -dot(lv, proj_n); - - vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0)); - if (proj_tc.z < 0.0) - { - discard; - } - - proj_tc.xyz /= proj_tc.w; - - float fa = falloff+1.0; - float dist_atten = min(1.0-(dist-1.0*(1.0-fa))/fa, 1.0); - dist_atten *= dist_atten; - dist_atten *= 2.0; - - if (dist_atten <= 0.0) - { - discard; - } - - lv = proj_origin-pos.xyz; - lv = normalize(lv); - float da = dot(norm, lv); - - vec3 diff_tex = texture2D(diffuseRect, frag.xy).rgb; - //light shaders output linear and are gamma corrected later in postDeferredGammaCorrectF.glsl - diff_tex.rgb = srgb_to_linear(diff_tex.rgb); - - vec4 spec = texture2D(specularRect, frag.xy); - - float noise = texture2D(noiseMap, frag.xy).b; - vec3 dlit = vec3(0, 0, 0); - - if (proj_tc.z > 0.0 && - proj_tc.x < 1.0 && - proj_tc.y < 1.0 && - proj_tc.x > 0.0 && - proj_tc.y > 0.0) - { - float amb_da = proj_ambiance; - float lit = 0.0; - - if (da > 0.0) - { - lit = da * dist_atten * noise; - - float diff = clamp((l_dist-proj_focus)/proj_range, 0.0, 1.0); - float lod = diff * proj_lod; - - vec4 plcol = texture2DLodDiffuse(projectionMap, proj_tc.xy, lod); - dlit = color.rgb * plcol.rgb * plcol.a; - - col = dlit*lit*diff_tex; - //amb_da += (da*0.5)*(1.0-shadow)*proj_ambiance; - } - //float diff = clamp((proj_range-proj_focus)/proj_range, 0.0, 1.0); - vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod); - - amb_da += (da*da*0.5+0.5)*proj_ambiance; - - amb_da *= dist_atten * noise; - - amb_da = min(amb_da, 1.0-lit); - col += amb_da*color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a*diff_tex.rgb; - } - - if (spec.a > 0.0) - { - dlit *= min(da*6.0, 1.0) * dist_atten; - vec3 npos = -normalize(pos); - - //vec3 ref = dot(pos+lv, norm); - vec3 h = normalize(lv+npos); - float nh = dot(norm, h); - float nv = dot(norm, npos); - float vh = dot(npos, h); - float sa = nh; - float fres = pow(1 - dot(h, npos), 5)*0.4+0.5; - - float gtdenom = 2 * nh; - float gt = max(0, min(gtdenom * nv / vh, gtdenom * da / vh)); - - if (nh > 0.0) - { - - float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da); - col += dlit*scol*spec.rgb; - //col += spec.rgb; - } - } - - if (envIntensity > 0.0) - { - vec3 ref = reflect(normalize(pos), norm); - - //project from point pos in direction ref to plane proj_p, proj_n - vec3 pdelta = proj_p-pos; - float ds = dot(ref, proj_n); - - if (ds < 0.0) - { - vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds; - - vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0)); - - if (stc.z > 0.0) - { - stc /= stc.w; - - if (stc.x < 1.0 && - stc.y < 1.0 && - stc.x > 0.0 && - stc.y > 0.0) - { - col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, (1 - spec.a) * (proj_lod * 0.6)).rgb * envIntensity; - } - } - } - } -#endif - - //col.r = 1.0; - frag_color.rgb = col; - frag_color.a = 0.0; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl deleted file mode 100644 index 7329efe3f7..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @file sunLightF.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$ - */ - -//class 1, no shadow, no SSAO, should never be called - -#extension GL_ARB_texture_rectangle : enable - -/*[EXTRA_CODE_HERE]*/ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -void main() -{ - frag_color = vec4(0,0,0,0); -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightNoFragCoordV.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightNoFragCoordV.glsl deleted file mode 100644 index 47e9d15fbc..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightNoFragCoordV.glsl +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file sunLightF.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$ - */ - -uniform mat4 modelview_projection_matrix; - -ATTRIBUTE vec3 position; - -uniform vec2 screen_res; - -void main() -{ - //transform vertex - vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0); - gl_Position = pos; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl deleted file mode 100644 index d9a0b6c702..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @file sunLightSSAOF.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$ - */ - - -#extension GL_ARB_texture_rectangle : enable - -/*[EXTRA_CODE_HERE]*/ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -//class 1 -- no shadow, SSAO only - -uniform sampler2D normalMap; - -// Inputs -VARYING vec2 vary_fragcoord; - -vec3 getNorm(vec2 pos_screen); -vec4 getPosition(vec2 pos_screen); - -//calculate decreases in ambient lighting when crowded out (SSAO) -float calcAmbientOcclusion(vec4 pos, vec3 norm, vec2 pos_screen); - -void main() -{ - vec2 pos_screen = vary_fragcoord.xy; - - //try doing an unproject here - - vec4 pos = getPosition(pos_screen); - vec3 norm = getNorm(pos_screen); - - frag_color[0] = 1.0; - frag_color[1] = calcAmbientOcclusion(pos, norm, pos_screen); - frag_color[2] = 1.0; - frag_color[3] = 1.0; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl deleted file mode 100644 index 9d70b9d98d..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightV.glsl +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @file sunLightF.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$ - */ - -ATTRIBUTE vec3 position; - -VARYING vec2 vary_fragcoord; - -uniform vec2 screen_res; - -void main() -{ - //transform vertex - vec4 pos = vec4(position.xyz, 1.0); - gl_Position = pos; - - vary_fragcoord = (pos.xy * 0.5 + 0.5); -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl deleted file mode 100644 index 876422f86b..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file class1/deferred/waterF.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$ - */ - -// debug stub -out vec4 frag_data[4]; - -void main() -{ - // emissive blue PBR material - frag_data[0] = vec4(0, 0, 0, 0); - frag_data[1] = vec4(0, 0, 0, 0); - frag_data[2] = vec4(1, 0, 0, GBUFFER_FLAG_HAS_PBR); - frag_data[3] = vec4(0, 0, 1, 0); -} diff --git a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl deleted file mode 100644 index ad105c616c..0000000000 --- a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file class1\environment\underWaterF.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$ - */ - -out vec4 frag_color; - -// debug stub -void main() -{ - frag_color = vec4(0, 1, 1, 0); -} diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl deleted file mode 100644 index 46a6c2021d..0000000000 --- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @file waterF.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$ - */ - -out vec4 frag_color; - -void main() -{ - frag_color = vec4(0, 0, 1, 0); -} diff --git a/indra/newview/app_settings/shaders/class1/interface/irradianceGenF.glsl b/indra/newview/app_settings/shaders/class1/interface/irradianceGenF.glsl deleted file mode 100644 index 2b1e794b52..0000000000 --- a/indra/newview/app_settings/shaders/class1/interface/irradianceGenF.glsl +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file irradianceGenF.glsl - * - * $LicenseInfo:firstyear=2022&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2022, 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$ - */ - -// debug stub - -out vec4 frag_color; - -void main() -{ - frag_color = vec4(0.5, 0, 0.5, 0); -} diff --git a/indra/newview/app_settings/shaders/class1/interface/reflectionprobeF.glsl b/indra/newview/app_settings/shaders/class1/interface/reflectionprobeF.glsl deleted file mode 100644 index e2e0a2002b..0000000000 --- a/indra/newview/app_settings/shaders/class1/interface/reflectionprobeF.glsl +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file reflectionprobeF.glsl - * - * $LicenseInfo:firstyear=2022&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2022, 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$ - */ - -// debug stub -out vec4 frag_color; - -void main() -{ - frag_color = vec4(0,1,0,0.5); -} diff --git a/indra/newview/app_settings/shaders/class1/interface/reflectionprobeV.glsl b/indra/newview/app_settings/shaders/class1/interface/reflectionprobeV.glsl deleted file mode 100644 index 0efbd63944..0000000000 --- a/indra/newview/app_settings/shaders/class1/interface/reflectionprobeV.glsl +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @file reflectionprobeV.glsl - * - * $LicenseInfo:firstyear=2022&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2011, 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$ - */ - - // Debug stub - -ATTRIBUTE vec3 position; - -void main() -{ - gl_Position = vec4(position, 1.0); -} - diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl deleted file mode 100644 index 092a7088da..0000000000 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file class1\lighting\lightFullbrightShinyF.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$ - */ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; - -uniform samplerCube environmentMap; - -vec3 fullbrightShinyAtmosTransport(vec3 light); -vec3 fullbrightScaleSoftClip(vec3 light); - -// See: -// class1\deferred\fullbrightShinyF.glsl -// class1\lighting\lightFullbrightShinyF.glsl -void fullbright_shiny_lighting() -{ - vec4 color = diffuseLookup(vary_texcoord0.xy); - color.rgb *= vertex_color.rgb; - - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a*0.75); // MAGIC NUMBER SL-12574; ALM: Off, Quality > Low - - color.rgb = fullbrightShinyAtmosTransport(color.rgb); - color.rgb = fullbrightScaleSoftClip(color.rgb); - - color.a = 1.0; - - frag_color = color; -} - diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl deleted file mode 100644 index 3118453342..0000000000 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @file class1\lighting\lightFullbrightShinyF.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$ - */ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; - -uniform samplerCube environmentMap; -uniform sampler2D diffuseMap; - -vec3 fullbrightShinyAtmosTransport(vec3 light); -vec3 fullbrightScaleSoftClip(vec3 light); - -void fullbright_shiny_lighting() -{ - vec4 color = texture2D(diffuseMap, vary_texcoord0.xy); - color.rgb *= vertex_color.rgb; - - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a); - - color.rgb = fullbrightShinyAtmosTransport(color.rgb); - - color.rgb = fullbrightScaleSoftClip(color.rgb); - - color.a = 1.0; - - frag_color = color; -} - diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl deleted file mode 100644 index f78e5e0e8a..0000000000 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @file class1\lighting\lightFullbrightShinyWaterF.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$ - */ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; - -uniform samplerCube environmentMap; - -vec3 fullbrightShinyAtmosTransport(vec3 light); -vec3 fullbrightScaleSoftClip(vec3 light); -vec4 applyWaterFog(vec4 color); - -void fullbright_shiny_lighting_water() -{ - vec4 color = diffuseLookup(vary_texcoord0.xy); - color.rgb *= vertex_color.rgb; - - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a); - - color.rgb = fullbrightShinyAtmosTransport(color.rgb); - color.rgb = fullbrightScaleSoftClip(color.rgb); - color.a = 1.0; - - frag_color = applyWaterFog(color); -} - diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl deleted file mode 100644 index 90668bd2b6..0000000000 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @file class1\lighting\lightFullbrightShinyWaterF.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$ - */ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; - -uniform samplerCube environmentMap; -uniform sampler2D diffuseMap; - -vec3 fullbrightShinyAtmosTransport(vec3 light); -vec3 fullbrightScaleSoftClip(vec3 light); -vec4 applyWaterFog(vec4 color); - -void fullbright_shiny_lighting_water() -{ - vec4 color = texture2D(diffuseMap,vary_texcoord0.xy); - color.rgb *= vertex_color.rgb; - - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a); - - color.rgb = fullbrightShinyAtmosTransport(color.rgb); - color.rgb = fullbrightScaleSoftClip(color.rgb); - color.a = 1.0; - - frag_color = applyWaterFog(color); -} - diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl deleted file mode 100644 index cbbb206bc1..0000000000 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @file class1\lighting\lightShinyF.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$ - */ - - -in vec4 vertex_color; -in vec2 vary_texcoord0; -in vec3 vary_texcoord1; - -uniform samplerCube environmentMap; - -vec3 scaleSoftClip(vec3 light); -vec3 atmosLighting(vec3 light); -vec4 applyWaterFog(vec4 color); - -vec4 shiny_lighting() -{ - vec4 color = diffuseLookup(vary_texcoord0.xy); - color.rgb *= vertex_color.rgb; - - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a*0.75); // MAGIC NUMBER SL-12574; ALM: Off, Quality > Low - - color.rgb = atmosLighting(color.rgb); - - color.rgb = scaleSoftClip(color.rgb); - color.a = 1.0; - return color; -} - diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl deleted file mode 100644 index f2a4665514..0000000000 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @file class1\lighting\lightShinyF.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$ - */ - - -in vec4 vertex_color; -in vec2 vary_texcoord0; -in vec3 vary_texcoord1; - -uniform samplerCube environmentMap; -uniform sampler2D diffuseMap; - -vec3 scaleSoftClip(vec3 light); -vec3 atmosLighting(vec3 light); -vec4 applyWaterFog(vec4 color); - -void shiny_lighting() -{ - vec4 color = texture2D(diffuseMap,vary_texcoord0.xy); - color.rgb *= vertex_color.rgb; - - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a); - - color.rgb = atmosLighting(color.rgb); - - color.rgb = scaleSoftClip(color.rgb); - color.a = 1.0; - return color; -} - diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl deleted file mode 100644 index 0f3371eba9..0000000000 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file class1\lighting\lightShinyWaterF.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$ - */ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; - -uniform samplerCube environmentMap; - -vec3 atmosLighting(vec3 light); -vec4 applyWaterFog(vec4 color); - -void shiny_lighting_water() -{ - vec4 color = diffuseLookup(vary_texcoord0.xy); - color.rgb *= vertex_color.rgb; - - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a); - - color.rgb = atmosLighting(color.rgb); - color.a = 1.0; - frag_color = applyWaterFog(color); -} - diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl deleted file mode 100644 index c607fa64cb..0000000000 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @file class1\lighting\lightShinyWaterNonIndexedF.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$ - */ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; -#else -#define frag_color gl_FragColor -#endif - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; - -uniform sampler2D diffuseMap; -uniform samplerCube environmentMap; - -vec3 atmosLighting(vec3 light); -vec4 applyWaterFog(vec4 color); - -void shiny_lighting_water() -{ - vec4 color = texture2D(diffuseMap,vary_texcoord0.xy); - color.rgb *= vertex_color.rgb; - - vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; - color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a); - - color.rgb = atmosLighting(color.rgb); - color.a = 1.0; - frag_color = applyWaterFog(color); -} - diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl deleted file mode 100644 index 5e39d1629d..0000000000 --- a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @file class1\lighting\lightV.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$ - */ - - - -// All lights, no specular highlights -vec3 atmosAmbient(); -vec4 sumLights(vec3 pos, vec3 norm, vec4 color); -float getAmbientClamp(); - -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color) -{ - vec4 c = sumLights(pos, norm, color); - -#if !defined(AMBIENT_KILL) - c.rgb += atmosAmbient() * color.rgb * 0.5 * getAmbientClamp(); -#endif - - return c; -} - diff --git a/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl deleted file mode 100644 index d762239e51..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/emissiveV.glsl +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file emissiveV.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$ - */ - -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; -uniform mat4 modelview_projection_matrix; - -ATTRIBUTE vec3 position; -void passTextureIndex(); -ATTRIBUTE vec4 emissive; -ATTRIBUTE vec2 texcoord0; - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - -void calcAtmospherics(vec3 inPositionEye); - -#ifdef HAS_SKIN -mat4 getObjectSkinnedTransform(); -uniform mat4 projection_matrix; -#endif - -void main() -{ - //transform vertex - passTextureIndex(); - -#ifdef HAS_SKIN - mat4 mat = getObjectSkinnedTransform(); - mat = modelview_matrix * mat; - - vec4 pos = mat * vec4(position.xyz, 1.0); - gl_Position = projection_matrix * pos; -#else - gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); - vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0)); -#endif - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - - calcAtmospherics(pos.xyz); - - vertex_color = emissive; -} diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightNoColorV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightNoColorV.glsl deleted file mode 100644 index 5d6f14230c..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightNoColorV.glsl +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file fullbrightNoColorV.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$ - */ - -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; -uniform mat4 modelview_projection_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec2 texcoord0; -ATTRIBUTE vec3 normal; - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - - -void calcAtmospherics(vec3 inPositionEye); - -void main() -{ - //transform vertex - vec4 vert = vec4(position.xyz,1.0); - vec4 pos = (modelview_matrix * vert); - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - calcAtmospherics(pos.xyz); - - vertex_color = vec4(1,1,1,1); - - -} diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl deleted file mode 100644 index b312665032..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file fullbrightShinyF.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$ - */ - - - -void fullbright_shiny_lighting(); - -void main() -{ - fullbright_shiny_lighting(); -} diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl deleted file mode 100644 index 891515ab1e..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @file fullbrightShinyV.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$ - */ - -uniform mat3 normal_matrix; -uniform mat4 texture_matrix0; -uniform mat4 texture_matrix1; -uniform mat4 modelview_matrix; -uniform mat4 modelview_projection_matrix; - - -void calcAtmospherics(vec3 inPositionEye); - -uniform vec4 origin; - - - -ATTRIBUTE vec3 position; -void passTextureIndex(); -ATTRIBUTE vec3 normal; -ATTRIBUTE vec4 diffuse_color; -ATTRIBUTE vec2 texcoord0; - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec3 vary_texcoord1; - -#ifdef HAS_SKIN -mat4 getObjectSkinnedTransform(); -uniform mat4 projection_matrix; -#endif - -void main() -{ - //transform vertex - vec4 vert = vec4(position.xyz,1.0); - passTextureIndex(); - -#ifdef HAS_SKIN - mat4 mat = getObjectSkinnedTransform(); - mat = modelview_matrix * mat; - vec4 pos = mat * vert; - gl_Position = projection_matrix * pos; - vec3 norm = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz); -#else - vec4 pos = (modelview_matrix * vert); - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); - vec3 norm = normalize(normal_matrix * normal); -#endif - vec3 ref = reflect(pos.xyz, -norm); - - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texcoord1 = (texture_matrix1 * vec4(ref,1.0)).xyz; - - calcAtmospherics(pos.xyz); - - vertex_color = diffuse_color; -} diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl deleted file mode 100644 index e1f3919907..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyWaterF.glsl +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file fullbrightShinyWaterF.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$ - */ - - - -void fullbright_shiny_lighting_water(); - -void main() -{ - fullbright_shiny_lighting_water(); -} diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl deleted file mode 100644 index 5d0ea0a8dd..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file fullbrightWaterF.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$ - */ - - - -void fullbright_lighting_water(); - -void main() -{ - fullbright_lighting_water(); -} diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleNonIndexedV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleNonIndexedV.glsl deleted file mode 100644 index e605676819..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/simpleNonIndexedV.glsl +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @file simpleNonIndexedV.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$ - */ - -uniform mat3 normal_matrix; -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; -uniform mat4 modelview_projection_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec2 texcoord0; -ATTRIBUTE vec3 normal; -ATTRIBUTE vec4 diffuse_color; - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - - -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color); -void calcAtmospherics(vec3 inPositionEye); - -void main() -{ - //transform vertex - vec4 vert = vec4(position.xyz,1.0); - - gl_Position = modelview_projection_matrix*vert; - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy; - - vec4 pos = (modelview_matrix * vert); - - vec3 norm = normalize(normal_matrix * normal); - - calcAtmospherics(pos.xyz); - - vec4 color = calcLighting(pos.xyz, norm, diffuse_color); - vertex_color = color; - - -} diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl deleted file mode 100644 index 945f80f31e..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @file simpleV.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$ - */ - -uniform mat3 normal_matrix; -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; -uniform mat4 modelview_projection_matrix; - -ATTRIBUTE vec3 position; -void passTextureIndex(); -ATTRIBUTE vec2 texcoord0; -ATTRIBUTE vec3 normal; - -uniform vec4 color; -uniform vec4 object_plane_t; -uniform vec4 object_plane_s; - -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color); -void calcAtmospherics(vec3 inPositionEye); - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - -vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1) -{ - vec4 tcoord; - - tcoord.x = dot(vpos, tp0); - tcoord.y = dot(vpos, tp1); - tcoord.z = tc.z; - tcoord.w = tc.w; - - tcoord = mat * tcoord; - - return tcoord; -} - -void main() -{ - //transform vertex - vec4 vert = vec4(position.xyz,1.0); - passTextureIndex(); - vec4 pos = (modelview_matrix * vert); - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); - vary_texcoord0.xy = texgen_object(vec4(position.xyz, 1.0), vec4(texcoord0,0,1), texture_matrix0, object_plane_s, object_plane_t).xy; - - vec3 norm = normalize(normal_matrix * normal); - - calcAtmospherics(pos.xyz); - - vec4 color = calcLighting(pos.xyz, norm, color); - vertex_color = color; - - -} diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl deleted file mode 100644 index ad8179af29..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file simpleV.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$ - */ - -uniform mat3 normal_matrix; -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; -uniform mat4 modelview_projection_matrix; - -ATTRIBUTE vec3 position; -void passTextureIndex(); -ATTRIBUTE vec2 texcoord0; -ATTRIBUTE vec3 normal; -ATTRIBUTE vec4 diffuse_color; - -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color); -void calcAtmospherics(vec3 inPositionEye); - - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - -#ifdef HAS_SKIN -mat4 getObjectSkinnedTransform(); -uniform mat4 projection_matrix; -#endif - - -void main() -{ - //transform vertex - vec4 vert = vec4(position.xyz,1.0); - - passTextureIndex(); - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy; - - -#ifdef HAS_SKIN - mat4 mat = getObjectSkinnedTransform(); - mat = modelview_matrix * mat; - - vec4 pos = mat * vert; - vec3 norm = normalize((mat*vec4(normal.xyz+vert.xyz,1.0)).xyz-pos.xyz); - - gl_Position = projection_matrix * pos; -#else - vec4 pos = (modelview_matrix * vert); - vec3 norm = normalize(normal_matrix * normal); - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); -#endif - - calcAtmospherics(pos.xyz); - vertex_color = calcLighting(pos.xyz, norm, diffuse_color); -} diff --git a/indra/newview/app_settings/shaders/class1/objects/treeV.glsl b/indra/newview/app_settings/shaders/class1/objects/treeV.glsl deleted file mode 100644 index 0227e6e3b8..0000000000 --- a/indra/newview/app_settings/shaders/class1/objects/treeV.glsl +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file treeV.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$ - */ - -uniform mat3 normal_matrix; -uniform mat4 texture_matrix0; -uniform mat4 modelview_matrix; -uniform mat4 modelview_projection_matrix; - -ATTRIBUTE vec3 position; -ATTRIBUTE vec2 texcoord0; -ATTRIBUTE vec3 normal; -ATTRIBUTE vec4 diffuse_color; - -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color); -void calcAtmospherics(vec3 inPositionEye); - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; - - -void main() -{ - //transform vertex - vec4 vert = vec4(position.xyz,1.0); - - gl_Position = modelview_projection_matrix*vert; - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy; - - vec4 pos = (modelview_matrix * vert); - - vec3 norm = normalize(normal_matrix * normal); - - calcAtmospherics(pos.xyz); - - vec4 color = calcLighting(pos.xyz, norm, diffuse_color); - vertex_color = color; -} diff --git a/indra/newview/app_settings/shaders/class1/transform/binormalV.glsl b/indra/newview/app_settings/shaders/class1/transform/binormalV.glsl deleted file mode 100644 index 449d8d8b4e..0000000000 --- a/indra/newview/app_settings/shaders/class1/transform/binormalV.glsl +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file binormalV.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$ - */ - -uniform mat3 normal_matrix; - -ATTRIBUTE vec4 tangent; - -VARYING vec4 tangent_out; - -void main() -{ - tangent_out = vec4(normal_matrix * tangent.xyz), tangent.w); -} - diff --git a/indra/newview/app_settings/shaders/class1/transform/colorV.glsl b/indra/newview/app_settings/shaders/class1/transform/colorV.glsl deleted file mode 100644 index 59c4a7d895..0000000000 --- a/indra/newview/app_settings/shaders/class1/transform/colorV.glsl +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file colorV.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$ - */ - -uniform int color_in; - -ATTRIBUTE vec3 position; - -VARYING int color_out; - -void main() -{ - color_out = color_in; -} - diff --git a/indra/newview/app_settings/shaders/class1/transform/normalV.glsl b/indra/newview/app_settings/shaders/class1/transform/normalV.glsl deleted file mode 100644 index a213aa0ae8..0000000000 --- a/indra/newview/app_settings/shaders/class1/transform/normalV.glsl +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file normalV.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$ - */ - -uniform mat3 normal_matrix; - -ATTRIBUTE vec3 normal; - -VARYING vec4 normal_out; - -void main() -{ - normal_out = vec4(normalize(normal_matrix * normal), 0.0); -} - diff --git a/indra/newview/app_settings/shaders/class1/transform/positionV.glsl b/indra/newview/app_settings/shaders/class1/transform/positionV.glsl deleted file mode 100644 index 01eed18de4..0000000000 --- a/indra/newview/app_settings/shaders/class1/transform/positionV.glsl +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @file positionV.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$ - */ - -uniform mat4 modelview_matrix; - -uniform int texture_index_in; - -ATTRIBUTE vec3 position; - -VARYING vec3 position_out; -VARYING int texture_index_out; - -void main() -{ - texture_index_out = texture_index_in; - position_out = (modelview_matrix*vec4(position, 1.0)).xyz; -} - diff --git a/indra/newview/app_settings/shaders/class1/transform/texcoordV.glsl b/indra/newview/app_settings/shaders/class1/transform/texcoordV.glsl deleted file mode 100644 index 0e074f3cec..0000000000 --- a/indra/newview/app_settings/shaders/class1/transform/texcoordV.glsl +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @file texcoordV.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$ - */ - - -ATTRIBUTE vec2 texcoord0; - -VARYING vec2 texcoord_out; - -void main() -{ - texcoord_out = texcoord0; -} - diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl deleted file mode 100644 index 4e0618e276..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @file class1\windlight\atmosphericsF.glsl - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2005, 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$ - */ - -vec3 atmosFragAmbient(vec3 light, vec3 sunlit) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - -vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - -vec3 atmosFragAffectDirectionalLight(float light, vec3 sunlit) -{ - return light * sunlit; -} - -vec3 atmosLighting(vec3 light) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl deleted file mode 100644 index 12f500e224..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @file class1\windlight\atmosphericsFuncs.glsl - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2019, 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$ - */ - -// debug stub - -float getAmbientClamp() { return 1.0f; } - -// Returns colors in sRGB -void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, - out vec3 atten, bool use_ao) -{ - amblit = vec3(0.2, 0, 0.2); - sunlit = vec3(1,0,1); - additive = vec3(0.5,0.5,0.5); - atten = vec3(1,0,1); -} - -void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 additive, - out vec3 atten) -{ - amblit = vec3(0.2, 0, 0.2); - sunlit = vec3(1,0,1); - additive = vec3(0.5,0.5,0.5); - atten = vec3(1,0,1); -} diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl deleted file mode 100644 index fd69165945..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @file class1\windlight\atmosphericsHelpersF.glsl - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2005, 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$ - */ - -uniform vec4 sunlight_color; -uniform vec4 light_ambient; - -vec3 atmosAmbient() -{ - return light_ambient.rgb; -} - -vec3 atmosAffectDirectionalLight(float lightIntensity) -{ - return sunlight_color.rgb * lightIntensity; -} - -vec3 atmosGetDiffuseSunlightColor() -{ - return sunlight_color.rgb; -} - -vec3 scaleDownLight(vec3 light) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl deleted file mode 100644 index 4179eaa9eb..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @file class1\windlight\atmosphericsHelpersV.glsl - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2005, 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$ - */ - -uniform vec4 sunlight_color; -uniform vec4 light_ambient; - -vec3 atmosAmbient() -{ - return light_ambient.rgb; -} - -vec3 atmosAffectDirectionalLight(float lightIntensity) -{ - return sunlight_color.rgb * lightIntensity; -} - -vec3 atmosGetDiffuseSunlightColor() -{ - return sunlight_color.rgb; -} - -vec3 scaleDownLight(vec3 light) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - -vec3 scaleUpLight(vec3 light) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl deleted file mode 100644 index 20457ad125..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @file class1\windlight\atmosphericsV.glsl - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2005, 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$ - */ - - - -void setPositionEye(vec3 v); - -void calcAtmospherics(vec3 inPositionEye) -{ - /* stub function for fallback compatibility on class1 hardware */ - setPositionEye(inPositionEye); -} - diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl deleted file mode 100644 index 3b4d358cfa..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file class1\windlight\atmosphericVarsF.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$ - */ - -VARYING vec3 vary_AdditiveColor; -VARYING vec3 vary_AtmosAttenuation; - -vec3 getAmblitColor() { return vec3(0, 0, 0); } - -vec3 getAdditiveColor() { return vary_AdditiveColor; } - -vec3 getAtmosAttenuation() { return vec3(vary_AtmosAttenuation); } - -vec3 getSunlitColor() { return vec3(0, 0, 0); } - -vec3 getPositionEye() { return vec3(0, 0, 0); } diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl deleted file mode 100644 index 1fea2c3628..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @file class1\windlight\atmosphericVarsV.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$ - */ - -VARYING vec3 vary_AdditiveColor; -VARYING vec3 vary_AtmosAttenuation; - -vec3 additive_color; -vec3 atmos_attenuation; -vec3 sunlit_color; -vec3 amblit_color; -vec3 position_eye; - -vec3 getSunlitColor() { return sunlit_color; } -void setSunlitColor(vec3 v) { sunlit_color = v; } - -vec3 getAdditiveColor() { return additive_color; } -void setAdditiveColor(vec3 v) -{ - additive_color = v; - vary_AdditiveColor = v; -} - -vec3 getAmblitColor() { return amblit_color; } -void setAmblitColor(vec3 v) { amblit_color = v; } - -vec3 getAtmosAttenuation() { return atmos_attenuation; } -void setAtmosAttenuation(vec3 v) -{ - atmos_attenuation = v; - vary_AtmosAttenuation = v; -} - -vec3 getPositionEye() { return position_eye; } -void setPositionEye(vec3 v) { position_eye = v; } diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl deleted file mode 100644 index f83434b7ec..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterF.glsl +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @file class1\windlight\atmosphericVarsWaterF.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$ - */ - -VARYING vec3 vary_PositionEye; -VARYING vec3 vary_AdditiveColor; -VARYING vec3 vary_AtmosAttenuation; - -vec3 getSunlitColor() { return vec3(0, 0, 0); } - -vec3 getAmblitColor() { return vec3(0, 0, 0); } - -vec3 getAdditiveColor() { return vary_AdditiveColor; } - -vec3 getAtmosAttenuation() { return vary_AtmosAttenuation; } - -vec3 getPositionEye() { return vary_PositionEye; } diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl deleted file mode 100644 index 65d1176777..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @file class1\windlight\atmosphericVarsWaterV.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$ - */ - -VARYING vec3 vary_PositionEye; -VARYING vec3 vary_AdditiveColor; -VARYING vec3 vary_AtmosAttenuation; - -vec3 atmos_attenuation; -vec3 sunlit_color; -vec3 amblit_color; - -vec3 getSunlitColor() { return sunlit_color; } -void setSunlitColor(vec3 v) { sunlit_color = v; } - -vec3 getAmblitColor() { return amblit_color; } -void setAmblitColor(vec3 v) { amblit_color = v; } - -vec3 getAdditiveColor() { return vary_AdditiveColor; } -void setAdditiveColor(vec3 v) { vary_AdditiveColor = v; } - -vec3 getAtmosAttenuation() { return atmos_attenuation; } -void setAtmosAttenuation(vec3 v) -{ - atmos_attenuation = v; - vary_AtmosAttenuation = v; -} - -vec3 getPositionEye() { return vary_PositionEye; } -void setPositionEye(vec3 v) { vary_PositionEye = v; } diff --git a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl deleted file mode 100644 index b1db147572..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @file class1\windlight\gammaF.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$ - */ - -vec3 scaleSoftClipFrag(vec3 light) -{ - // For compatibility with lower cards. Do nothing. - return light; -} - -/// Soft clips the light with a gamma correction -vec3 scaleSoftClip(vec3 light) -{ - // For compatibility with lower cards. Do nothing - return light; -} - -vec3 fullbrightScaleSoftClipFrag(vec3 light, vec3 additive, vec3 atten) -{ - // For compatibility with lower cards. Do nothing - return light; -} - -vec3 fullbrightScaleSoftClip(vec3 light) -{ - // For compatibility with lower cards. Do nothing - return light; -} - diff --git a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl deleted file mode 100644 index fb864d1951..0000000000 --- a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @file class1/windlight/transportF.glsl - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2005, 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$ - */ - -vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - -vec3 atmosTransport(vec3 light) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - -vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - -vec3 fullbrightAtmosTransport(vec3 light) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - -vec3 fullbrightShinyAtmosTransport(vec3 light) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} |