diff options
author | Cinder Roxley <cinder.roxley@phoenixviewer.com> | 2013-06-27 21:35:23 -0600 |
---|---|---|
committer | Cinder Roxley <cinder.roxley@phoenixviewer.com> | 2013-06-27 21:35:23 -0600 |
commit | 35b27d558caa8a719e6648e0bf3129629c1cc5fa (patch) | |
tree | 6a1d20ad270bd7df3141e91ec9ba0ff0a080a6fc /indra/newview/app_settings/shaders/class1/interface | |
parent | 38c1cd2d29fa48b1a28a6ba1d7ef49ae00c9a5e0 (diff) | |
parent | 6060e5e46acbeb20a301070a0fd0efea029d33d0 (diff) |
Merged lindenlab/viewer-release into default
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/interface')
35 files changed, 279 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl b/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl index f520f301d9..f520f301d9 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/alphamaskV.glsl b/indra/newview/app_settings/shaders/class1/interface/alphamaskV.glsl index 3580d1f27b..3580d1f27b 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/alphamaskV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/alphamaskV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/clipF.glsl b/indra/newview/app_settings/shaders/class1/interface/clipF.glsl index ac2bc8703b..ac2bc8703b 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/clipF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/clipF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/clipV.glsl b/indra/newview/app_settings/shaders/class1/interface/clipV.glsl index e376b25a71..e376b25a71 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/clipV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/clipV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl b/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl index a96d04cc39..a96d04cc39 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl b/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl index 890474d6d8..890474d6d8 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/debugF.glsl b/indra/newview/app_settings/shaders/class1/interface/debugF.glsl index 67c6baddbb..67c6baddbb 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/debugF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/debugF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/debugV.glsl b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl index f4d704577a..f4d704577a 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/debugV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/downsampleDepthF.glsl b/indra/newview/app_settings/shaders/class1/interface/downsampleDepthF.glsl new file mode 100644 index 0000000000..6523a06d22 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/downsampleDepthF.glsl @@ -0,0 +1,67 @@ +/** + * @file debugF.glsl + * + * $LicenseInfo:firstyear=2007&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$ + */ + +#ifdef DEFINE_GL_FRAGCOLOR +out vec4 frag_color; +#else +#define frag_color gl_FragColor +#endif + +uniform sampler2D depthMap; + +uniform float delta; + +VARYING vec2 tc0; +VARYING vec2 tc1; +VARYING vec2 tc2; +VARYING vec2 tc3; +VARYING vec2 tc4; +VARYING vec2 tc5; +VARYING vec2 tc6; +VARYING vec2 tc7; +VARYING vec2 tc8; + +void main() +{ + vec4 depth1 = + vec4(texture2D(depthMap, tc0).r, + texture2D(depthMap, tc1).r, + texture2D(depthMap, tc2).r, + texture2D(depthMap, tc3).r); + + vec4 depth2 = + vec4(texture2D(depthMap, tc4).r, + texture2D(depthMap, tc5).r, + texture2D(depthMap, tc6).r, + texture2D(depthMap, tc7).r); + + depth1 = min(depth1, depth2); + float depth = min(depth1.x, depth1.y); + depth = min(depth, depth1.z); + depth = min(depth, depth1.w); + depth = min(depth, texture2D(depthMap, tc8).r); + + gl_FragDepth = depth; +} diff --git a/indra/newview/app_settings/shaders/class1/interface/downsampleDepthRectF.glsl b/indra/newview/app_settings/shaders/class1/interface/downsampleDepthRectF.glsl new file mode 100644 index 0000000000..0e5dc08183 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/downsampleDepthRectF.glsl @@ -0,0 +1,69 @@ +/** + * @file debugF.glsl + * + * $LicenseInfo:firstyear=2007&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$ + */ + +#extension GL_ARB_texture_rectangle : enable + +#ifdef DEFINE_GL_FRAGCOLOR +out vec4 frag_color; +#else +#define frag_color gl_FragColor +#endif + +uniform sampler2DRect depthMap; + +uniform float delta; + +VARYING vec2 tc0; +VARYING vec2 tc1; +VARYING vec2 tc2; +VARYING vec2 tc3; +VARYING vec2 tc4; +VARYING vec2 tc5; +VARYING vec2 tc6; +VARYING vec2 tc7; +VARYING vec2 tc8; + +void main() +{ + vec4 depth1 = + vec4(texture2DRect(depthMap, tc0).r, + texture2DRect(depthMap, tc1).r, + texture2DRect(depthMap, tc2).r, + texture2DRect(depthMap, tc3).r); + + vec4 depth2 = + vec4(texture2DRect(depthMap, tc4).r, + texture2DRect(depthMap, tc5).r, + texture2DRect(depthMap, tc6).r, + texture2DRect(depthMap, tc7).r); + + depth1 = min(depth1, depth2); + float depth = min(depth1.x, depth1.y); + depth = min(depth, depth1.z); + depth = min(depth, depth1.w); + depth = min(depth, texture2DRect(depthMap, tc8).r); + + gl_FragDepth = depth; +} diff --git a/indra/newview/app_settings/shaders/class1/interface/downsampleDepthV.glsl b/indra/newview/app_settings/shaders/class1/interface/downsampleDepthV.glsl new file mode 100644 index 0000000000..71d80911d6 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/downsampleDepthV.glsl @@ -0,0 +1,59 @@ +/** + * @file debugV.glsl + * + * $LicenseInfo:firstyear=2007&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$ + */ + +uniform mat4 modelview_projection_matrix; + +ATTRIBUTE vec3 position; + +uniform vec2 screen_res; + +uniform vec2 delta; + +VARYING vec2 tc0; +VARYING vec2 tc1; +VARYING vec2 tc2; +VARYING vec2 tc3; +VARYING vec2 tc4; +VARYING vec2 tc5; +VARYING vec2 tc6; +VARYING vec2 tc7; +VARYING vec2 tc8; + +void main() +{ + gl_Position = vec4(position, 1.0); + + vec2 tc = (position.xy*0.5+0.5)*screen_res; + tc0 = tc+vec2(-delta.x,-delta.y); + tc1 = tc+vec2(0,-delta.y); + tc2 = tc+vec2(delta.x,-delta.y); + tc3 = tc+vec2(-delta.x,0); + tc4 = tc+vec2(0,0); + tc5 = tc+vec2(delta.x,0); + tc6 = tc+vec2(-delta.x,delta.y); + tc7 = tc+vec2(0,delta.y); + tc8 = tc+vec2(delta.x,delta.y); +} + diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl index ed803de277..ed803de277 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl index 59520bb99f..59520bb99f 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl index 058f3b1b82..058f3b1b82 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl index f7970b7f78..f7970b7f78 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl index 6cc9bbbea2..6cc9bbbea2 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightNormV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightNormV.glsl new file mode 100644 index 0000000000..947c2b0065 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/highlightNormV.glsl @@ -0,0 +1,42 @@ +/** + * @file highlightV.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_projection_matrix; + +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; +ATTRIBUTE vec2 texcoord1; +ATTRIBUTE vec2 texcoord2; + +VARYING vec2 vary_texcoord0; + +void main() +{ + //transform vertex + gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + vary_texcoord0 = (texture_matrix0 * vec4(texcoord1,0,1)).xy; +} + diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightSpecV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightSpecV.glsl new file mode 100644 index 0000000000..c5d102b739 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/highlightSpecV.glsl @@ -0,0 +1,42 @@ +/** + * @file highlightV.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_projection_matrix; + +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; +ATTRIBUTE vec2 texcoord1; +ATTRIBUTE vec2 texcoord2; + +VARYING vec2 vary_texcoord0; + +void main() +{ + //transform vertex + gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + vary_texcoord0 = (texture_matrix0 * vec4(texcoord2,0,1)).xy; +} + diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl index 9bf7b60eb7..9bf7b60eb7 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionCubeV.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionCubeV.glsl index 5c479d27a9..5c479d27a9 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/occlusionCubeV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/occlusionCubeV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl index db130e456c..db130e456c 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl index c26fa08ddc..c26fa08ddc 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl index 415181126b..415181126b 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl index 6b9986c8d7..6b9986c8d7 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl b/indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl index 7379360e17..7379360e17 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/pathfindingNoNormalV.glsl b/indra/newview/app_settings/shaders/class1/interface/pathfindingNoNormalV.glsl index 19fa607307..19fa607307 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/pathfindingNoNormalV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingNoNormalV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl b/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl index 91f252cf1e..91f252cf1e 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/pathfindingV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl b/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl index 67dc500493..67dc500493 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl b/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl index c58f9dfdaf..c58f9dfdaf 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl index 772bb374e8..772bb374e8 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl index 641d670c26..641d670c26 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl b/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl index 95679e93e7..95679e93e7 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl b/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl index 3c2f297f7f..3c2f297f7f 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/uiF.glsl b/indra/newview/app_settings/shaders/class1/interface/uiF.glsl index 299bfb72aa..299bfb72aa 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/uiF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/uiF.glsl diff --git a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl index 220dafef25..220dafef25 100644..100755 --- a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl |