diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-09-16 17:08:39 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-09-16 17:08:39 -0500 | 
| commit | 8a1baaea6c0462b645499e8e7b88345e46b92621 (patch) | |
| tree | 565537e0a9c3bf0c9d982e8da90dc420a5844b04 /indra/newview/app_settings/shaders/class1 | |
| parent | da84f5552731e1ece3a463c4c385bb327f1048a1 (diff) | |
SH-2243 work in progress -- don't use gl_FragColor or gl_FragData for outputs -- no more deprecation warnings on nvidia
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
69 files changed, 272 insertions, 85 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl index a64f6ea55c..a009d0dd86 100644 --- a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 23142a3516..c40a62e49c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect depthMap;  vec4 diffuseLookup(vec2 texcoord); @@ -81,8 +83,5 @@ void main()  	color.rgb += diff.rgb * vary_pointlight_col.rgb;  	gl_FragColor = color; -	//gl_FragColor = vec4(1,0,1,1); -	//gl_FragColor = vec4(1,0,1,1)*shadow; -	  } diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl index 332bc9c262..3f6d6a8fd6 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect depthMap;  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl index e8a2318f39..e24734c2db 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedNoColorF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect depthMap;  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl index e5899872db..15781bc92d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl @@ -101,7 +101,7 @@ void main()  	pos = trans * vec4(position.xyz, 1.0);  	norm = position.xyz + normal.xyz; -	norm = normalize(( trans*vec4(norojrm, 1.0) ).xyz-pos.xyz); +	norm = normalize(( trans*vec4(norm, 1.0) ).xyz-pos.xyz);  	vec4 frag_pos = projection_matrix * pos;  	gl_Position = frag_pos; diff --git a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl index 40fa59b637..f899ecabe0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowF.glsl @@ -22,7 +22,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl index b1fc9da855..945a1e71a5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl @@ -22,8 +22,10 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl index c9386062c6..4591bb9397 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl index e0a25b505a..1b04be7d9c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl @@ -22,11 +22,13 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect depthMap;  uniform sampler2DRect normalMap;  uniform sampler2DRect lightMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl index 379420a8a0..463c61090f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif  uniform sampler2D diffuseMap;  uniform sampler2D bumpMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl index 127136a12c..73e726fe15 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl @@ -24,6 +24,9 @@   */ +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif  /////////////////////////////////////////////////////////////////////////  // The fragment shader for the sky diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl index 51d67d2790..f3351c08bf 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl @@ -22,7 +22,10 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif  uniform float minimum_alpha;  uniform float maximum_alpha; diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl index 8868d33705..7d83b9a72c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif +  VARYING vec3 vary_normal;  uniform float minimum_alpha; diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl index 2f46d43b9d..a24623d7b5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl @@ -24,6 +24,10 @@   */ +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif +  uniform float minimum_alpha;  uniform float maximum_alpha; diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl index aaf89a22ef..a8e5ae4a62 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl index e08e52c7cf..9a0e511bef 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif +  VARYING vec3 vary_normal;  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl index 6cf563189a..fdcce78940 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  vec3 fullbrightAtmosTransport(vec3 light);  vec3 fullbrightScaleSoftClip(vec3 light); diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index f54827f720..25d5906b77 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl b/indra/newview/app_settings/shaders/class1/deferred/giF.glsl index 72c5a93087..55b816041b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/giF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/giF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect depthMap;  uniform sampler2DRect normalMap;  uniform sampler2D noiseMap; @@ -182,5 +184,5 @@ void main()  	vec3 norm = texture2DRect(normalMap, pos_screen).xyz;  	norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm -	gl_FragData[0].xyz = giAmbient(pos, norm); +	gl_FragColor.xyz = giAmbient(pos, norm);  } diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl index e98f9aef87..a929c0e4f5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif +  uniform float minimum_alpha;  uniform float maximum_alpha; diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl index 4f13167c1c..f17c64e751 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl @@ -22,11 +22,13 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ - - - +   uniform sampler2DRect diffuseMap; +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  VARYING vec2 vary_fragcoord;  void main()  diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl index 279a2fa78d..585faf6cd5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect depthMap;  uniform sampler2DRect diffuseRect;  uniform sampler2DRect specularRect; @@ -141,6 +143,4 @@ void main()  	gl_FragColor.rgb = out_col;  	gl_FragColor.a = 0.0; -	 -	//gl_FragColor = vec4(0.1, 0.025, 0.025/4.0, 0.0);  } diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl index dff6360726..6351a5ac0d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  //class 1 -- no shadows diff --git a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl index 0fc23fecb4..60f99fac15 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pointLightF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ -  -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect diffuseRect;  uniform sampler2DRect specularRect;  uniform sampler2DRect normalMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl index 64044590c9..c8ee1dac00 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl @@ -25,6 +25,10 @@  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  #define FXAA_PC 1  //#define FXAA_GLSL_130 1  #define FXAA_QUALITY__PRESET 12 diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl index 16b61897d5..7f16c32331 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl @@ -25,6 +25,10 @@  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  #define FXAA_PC 1  //#define FXAA_GLSL_130 1  #define FXAA_QUALITY__PRESET 12 diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFNoFXAAF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFNoFXAAF.glsl index a1986fca9a..e3a5462589 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFNoFXAAF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFNoFXAAF.glsl @@ -25,6 +25,10 @@  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect diffuseRect;  uniform sampler2D bloomMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoFXAAF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoFXAAF.glsl index 84c23c97a0..55e07db879 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoFXAAF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoFXAAF.glsl @@ -25,6 +25,10 @@  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect diffuseRect;  uniform sampler2DRect edgeMap;  uniform sampler2DRect depthMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl index a172f49d87..0f85a299a5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl @@ -22,9 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  - + #ifndef gl_FragColor + out vec4 gl_FragColor; + #endif +   uniform sampler2DRect depthMap;  uniform sampler2DRect normalMap;  uniform sampler2DRect giLightMap; @@ -94,7 +96,5 @@ void main()  	col = col*col*blur_quad.x + col*blur_quad.y + blur_quad.z; -	gl_FragData[0].xyz = col; -	 -	//gl_FragColor = ccol; +	gl_FragColor.rgb = col;  } diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl index c63a627971..a35826ce7d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform float minimum_alpha;  uniform float maximum_alpha; diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl index ee0ea84e6f..608ac4d3de 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  VARYING vec4 post_pos; diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl index 26c7165e06..dac1ee1294 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif  /////////////////////////////////////////////////////////////////////////  // The fragment shader for the sky diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index fa1d2cc7a7..e86b0445ed 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect diffuseRect;  uniform sampler2DRect specularRect;  uniform sampler2DRect positionMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl index 20970fc4ba..8eac16d3f0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl @@ -23,10 +23,13 @@   * $/LicenseInfo$   */ - - +   #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect diffuseRect;  uniform sampler2DRect specularRect;  uniform sampler2DRect depthMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl index 8eb4be7177..7986320c38 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif +  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl index 78ea15e87a..1114a0f0c4 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightF.glsl @@ -23,12 +23,14 @@   * $/LicenseInfo$   */ - -  //class 1, no shadow, no SSAO, should never be called  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  void main()   {  	gl_FragColor = vec4(0,0,0,0); diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl index 797648202d..96f3248e55 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl @@ -23,9 +23,12 @@   */ -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  //class 1 -- no shadow, SSAO only  uniform sampler2DRect depthMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl index effa994a48..3112a1ea7f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif  uniform sampler2D detail_0;  uniform sampler2D detail_1; diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl index b0ef348cd1..06071056ac 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl @@ -22,8 +22,10 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl index 22ebaa9be6..910b8f6c8c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform float minimum_alpha;  uniform float maximum_alpha; diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index d10548cbef..43cd4c2eed 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragData +out vec4 gl_FragData[3]; +#endif +  vec3 scaleSoftClip(vec3 inColor);  vec3 atmosTransport(vec3 inColor); diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl index a34e76d25a..b2d3a135ba 100644 --- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl @@ -23,10 +23,12 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect diffuseMap;  uniform float minLuminance;  uniform float maxExtractAlpha; diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl index cbf4dc4bea..18b6e503e1 100644 --- a/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractMSF.glsl @@ -23,11 +23,13 @@   * $/LicenseInfo$   */ - -  #extension GL_ARB_texture_rectangle : enable  #extension GL_ARB_texture_multisample : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DMS diffuseMap;  uniform float minLuminance;  uniform float maxExtractAlpha; diff --git a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl index 3d17a20fbb..8e83e53b78 100644 --- a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  uniform sampler2D diffuseMap;  uniform float glowStrength; diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl index 5d72390d2d..5f12b18398 100644 --- a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  uniform sampler2D detail0;  uniform sampler2D detail1; diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl index 307b87e086..0d1d7d6b89 100644 --- a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl @@ -22,8 +22,10 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  // this class1 shader is just a copy of terrainF diff --git a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl index 48eea0bdda..4ad1b82e0a 100644 --- a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  uniform sampler2D diffuseMap;  uniform sampler2D bumpMap;    diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl index 1bb04ceb34..8aa4cb5434 100644 --- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  vec3 scaleSoftClip(vec3 inColor);  vec3 atmosTransport(vec3 inColor); diff --git a/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl b/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl index 66f3e1ae11..765040a27f 100644 --- a/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2D diffuseMap;  uniform float custom_alpha; diff --git a/indra/newview/app_settings/shaders/class1/interface/debugF.glsl b/indra/newview/app_settings/shaders/class1/interface/debugF.glsl index d43bf3fb50..d89c7b0072 100644 --- a/indra/newview/app_settings/shaders/class1/interface/debugF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/debugF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform vec4 color;  void main()  diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl index caff5fc324..8023545c4e 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  #extension GL_ARB_texture_rectangle : enable  uniform sampler2D glowMap; diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl index 3e972f0cb4..57e9f93768 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl @@ -25,6 +25,10 @@  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2D glowMap;  uniform sampler2DRect screenMap; diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl index 1d37b97bf1..ce5409c816 100644 --- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl @@ -23,6 +23,9 @@   * $/LicenseInfo$   */ +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  uniform vec4 color;  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl index 57248699cb..5f91ce5e80 100644 --- a/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/occlusionF.glsl @@ -23,6 +23,10 @@   * $/LicenseInfo$   */ +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  void main()   {  	gl_FragColor = vec4(1,1,1,1); diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl index d860106305..95b7632521 100644 --- a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2D tex0;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl b/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl index a25c9a08fb..7ba2d07ca4 100644 --- a/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2D tex0;  VARYING vec4 vertex_color; diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl index 9a295ce9f2..b085eb1760 100644 --- a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl @@ -25,6 +25,10 @@  #extension GL_ARB_texture_rectangle : enable +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2DRect screenMap;  VARYING vec4 vertex_color; diff --git a/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl b/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl index 3ded949943..9cbdfea2df 100644 --- a/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2D tex0;  uniform sampler2D tex1; diff --git a/indra/newview/app_settings/shaders/class1/interface/uiF.glsl b/indra/newview/app_settings/shaders/class1/interface/uiF.glsl index 2602e489c8..0c5479af36 100644 --- a/indra/newview/app_settings/shaders/class1/interface/uiF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/uiF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2D diffuseMap;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl index 0a687d7a33..7f23c5e78c 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl @@ -23,6 +23,10 @@   * $/LicenseInfo$   */ +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl index 7ba6e9dec9..b67203065f 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl index 00c08d59ef..d9b7ba0db1 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl @@ -23,7 +23,9 @@   * $/LicenseInfo$   */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl index 2140b2f612..0ace495d5a 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl @@ -22,7 +22,9 @@   * $/LicenseInfo$   */ -  +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif   uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl index ab6b561f08..fac476e2ce 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl @@ -23,8 +23,9 @@   * $/LicenseInfo$   */ -  - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  uniform sampler2D diffuseMap; diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl index 183582e41f..b1ab065712 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl @@ -22,7 +22,10 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl index 9c9f7ca658..05c9310a37 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl @@ -22,7 +22,10 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl index 1a041c26ca..27d05baaa7 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl @@ -22,6 +22,10 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl b/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl index 53c0e77b48..664967d36f 100644 --- a/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/bumpF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform sampler2D texture0;  uniform sampler2D texture1; diff --git a/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl index e5bf5bf2d3..8a4932122f 100644 --- a/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif +  uniform float minimum_alpha;  uniform float maximum_alpha; | 
