diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
16 files changed, 46 insertions, 39 deletions
diff --git a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl index c10635c898..9a14d496e9 100644 --- a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl +++ b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl @@ -25,10 +25,13 @@ uniform mat4 projection_matrix; -attribute vec3 position; -attribute vec3 normal; -attribute vec2 texcoord0; -attribute vec4 clothing; +ATTRIBUTE vec3 position; +ATTRIBUTE vec3 normal; +ATTRIBUTE vec2 texcoord0; +ATTRIBUTE vec4 clothing; + +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol); mat4 getSkinnedTransform(); @@ -43,7 +46,7 @@ const vec4 gPiConstants = vec4(0.159154943, 6.28318530, 3.141592653, 1.5707963); void main() { - gl_TexCoord[0] = vec4(texcoord0,0,1); + vary_texcoord0 = texcoord0; vec4 pos; mat4 trans = getSkinnedTransform(); @@ -123,11 +126,11 @@ void main() calcAtmospherics(pos.xyz); vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.0)); - gl_FrontColor = color; + vertex_color = color; gl_Position = projection_matrix * pos; - gl_TexCoord[2] = vec4(pos.xyz, 1.0); + vary_texcoord2 = vec4(pos.xyz, 1.0); } diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl index 616ea5fe9e..eb9256b41b 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl @@ -35,7 +35,7 @@ uniform int kern_length; uniform float kern_scale; uniform vec3 blur_quad; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; uniform mat4 inv_proj; uniform vec2 screen_res; diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl index 5e75aec171..380d5207c3 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl @@ -25,9 +25,9 @@ uniform mat4 modelview_projection_matrix; -attribute vec3 position; +ATTRIBUTE vec3 position; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; uniform vec2 screen_res; void main() diff --git a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giF.glsl index 95913a502c..ba1d29b044 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giF.glsl @@ -42,7 +42,7 @@ uniform sampler2D depthGIMap; uniform sampler2D lightFunc; // Inputs -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; uniform vec2 screen_res; diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl index 7c55fcc286..e3d5fdcf10 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl @@ -32,7 +32,7 @@ uniform sampler2D bloomMap; uniform sampler2DRect edgeMap; uniform vec2 screen_res; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; void main() diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl index 969b6e2f1c..60eca06d35 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl @@ -25,10 +25,10 @@ uniform mat4 modelview_projection_matrix; -attribute vec3 position; +ATTRIBUTE vec3 position; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; uniform vec2 screen_res; void main() diff --git a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl index 2766691bd0..8272dbf31b 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl @@ -25,12 +25,13 @@ uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec4 diffuse_color; -attribute vec2 texcoord0; +ATTRIBUTE vec3 position; +ATTRIBUTE vec4 diffuse_color; +ATTRIBUTE vec2 texcoord0; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; +VARYING vec4 vertex_color; uniform vec2 screen_res; @@ -44,5 +45,5 @@ void main() vec4 tex = vec4(texcoord0,0,1); tex.w = 1.0; - gl_FrontColor = diffuse_color; + vertex_color = diffuse_color; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl index 13517a26ba..7c290fc993 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl @@ -30,7 +30,7 @@ uniform sampler2DRect lightMap; uniform sampler2DRect diffuseRect; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; void main() { float i = texture2DRect(lightMap, vary_fragcoord.xy).r; diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl index d0205fa824..062875e72f 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl @@ -25,12 +25,13 @@ uniform mat4 modelview_projection_matrix; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; +VARYING vec4 vertex_color; uniform vec2 screen_res; -attribute vec3 position; -attribute vec4 diffuse_color; +ATTRIBUTE vec3 position; +ATTRIBUTE vec4 diffuse_color; void main() { @@ -40,5 +41,5 @@ void main() vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res; - gl_FrontColor = diffuse_color; + vertex_color = diffuse_color; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl index 0364da6258..662f5fb6be 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl @@ -53,7 +53,7 @@ uniform float gi_luminance; uniform vec4 sunlight_color; uniform vec2 screen_res; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; void main() { diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl index 2d7fa22edc..0049d8ea78 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl @@ -25,9 +25,9 @@ uniform mat4 modelview_projection_matrix; -attribute vec3 position; +ATTRIBUTE vec3 position; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; uniform vec2 screen_res; void main() diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl index 009b5cc743..ecab3baeee 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl @@ -40,7 +40,7 @@ uniform float kern_scale; uniform float gi_edge_weight; uniform float gi_blur_brightness; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; void main() { diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl index e9c6f3e27b..6d590c8051 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl @@ -25,9 +25,9 @@ uniform mat4 modelview_projection_matrix; -attribute vec3 position; +ATTRIBUTE vec3 position; -varying vec2 vary_fragcoord; +VARYING vec2 vary_fragcoord; uniform vec2 screen_res; void main() diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index 1c02adea89..664cec64c3 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -65,8 +65,8 @@ uniform sampler2DRect depthMap; uniform mat4 inv_proj; uniform vec2 screen_res; -varying vec4 vary_light; -varying vec2 vary_fragcoord; +VARYING vec4 vary_light; +VARYING vec2 vary_fragcoord; vec3 vary_PositionEye; diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl index 8e405de9a3..682508aaf3 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl @@ -25,13 +25,13 @@ uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec2 texcoord0; +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; uniform vec2 screen_res; -varying vec4 vary_light; -varying vec2 vary_fragcoord; +VARYING vec4 vary_light; +VARYING vec2 vary_fragcoord; void main() { //transform vertex diff --git a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl index 56a149523e..80e08e8270 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl @@ -24,15 +24,17 @@ */ +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; uniform sampler2D diffuseMap; -varying vec3 vary_normal; +VARYING vec3 vary_normal; void main() { - vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy); - gl_FragData[0] = vec4(gl_Color.rgb*col.rgb, col.a <= 0.5 ? 0.0 : 0.005); + vec4 col = texture2D(diffuseMap, vary_texcoord0.xy); + gl_FragData[0] = vec4(vertex_color.rgb*col.rgb, col.a <= 0.5 ? 0.0 : 0.005); gl_FragData[1] = vec4(0,0,0,0); vec3 nvn = normalize(vary_normal); gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0); |