diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/interface')
12 files changed, 113 insertions, 33 deletions
diff --git a/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl b/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl index 04bfff22c1..22095bc611 100644 --- a/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl @@ -5,12 +5,15 @@ * $/LicenseInfo$ */ +attribute vec3 position; +attribute vec4 diffuse_color; +attribute vec2 texcoord0; void main() { - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; - gl_TexCoord[0] = gl_MultiTexCoord0; - gl_FrontColor = gl_Color; + gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_TexCoord[0] = vec4(texcoord0,0,1); + gl_FrontColor = diffuse_color; } diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl new file mode 100644 index 0000000000..6639f88047 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl @@ -0,0 +1,23 @@ +/** + * @file glowcombineFXAAF.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * $/LicenseInfo$ + */ + +#extension GL_ARB_texture_rectangle : enable + +uniform sampler2D glowMap; +uniform sampler2DRect screenMap; + +uniform vec2 screen_res; +varying vec2 vary_tc; + +void main() +{ + vec3 col = texture2D(glowMap, vary_tc).rgb + + texture2DRect(screenMap, vary_tc*screen_res).rgb; + + + gl_FragColor = vec4(col.rgb, dot(col.rgb, vec3(0.299, 0.587, 0.144))); +} diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl new file mode 100644 index 0000000000..f54876135e --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl @@ -0,0 +1,19 @@ +/** + * @file glowcombineFXAAV.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * $/LicenseInfo$ + */ + +attribute vec3 position; + +varying vec2 vary_tc; + +void main() +{ + vec4 pos = gl_ModelViewProjectionMatrix*vec4(position.xyz, 1.0); + gl_Position = pos; + + vary_tc = pos.xy*0.5+0.5; +} + diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl index ce183ec154..46be1c45d3 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl @@ -5,11 +5,14 @@ * $/LicenseInfo$ */ +attribute vec3 position; +attribute vec2 texcoord0; +attribute vec2 texcoord1; void main() { - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; - gl_TexCoord[0] = gl_MultiTexCoord0; - gl_TexCoord[1] = gl_MultiTexCoord1; + gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_TexCoord[0] = vec4(texcoord0,0,1); + gl_TexCoord[1] = vec4(texcoord1,0,1); } diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl index f6c6d945de..a0cbdaafb8 100644 --- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl @@ -6,10 +6,10 @@ */ - +uniform vec4 highlight_color; uniform sampler2D diffuseMap; void main() { - gl_FragColor = gl_Color*texture2D(diffuseMap, gl_TexCoord[0].xy); + gl_FragColor = highlight_color*texture2D(diffuseMap, gl_TexCoord[0].xy); } diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl index f114f766bf..0547c44093 100644 --- a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl @@ -5,23 +5,13 @@ * $/LicenseInfo$ */ - +attribute vec3 position; +attribute vec2 texcoord0; void main() { //transform vertex - gl_Position = ftransform(); - vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz; - pos = normalize(pos); - float d = dot(pos, normalize(gl_NormalMatrix * gl_Normal)); - d *= d; - d = 1.0 - d; - d *= d; - - d = min(d, gl_Color.a*2.0); - - gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; - gl_FrontColor.rgb = gl_Color.rgb; - gl_FrontColor.a = max(d, gl_Color.a); + gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1); } diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl index 5a5d0ec506..9c528750eb 100644 --- a/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl @@ -5,8 +5,10 @@ * $/LicenseInfo$ */ +attribute vec3 position; + void main() { - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); } diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl new file mode 100644 index 0000000000..a5442c9bf4 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl @@ -0,0 +1,13 @@ +/** + * @file onetexturenocolorF.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * $/LicenseInfo$ + */ + +uniform sampler2D tex0; + +void main() +{ + gl_FragColor = texture2D(tex0, gl_TexCoord[0].xy); +} diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl new file mode 100644 index 0000000000..7df45e90e6 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl @@ -0,0 +1,18 @@ +/** + * @file onetexturenocolorV.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * $/LicenseInfo$ + */ + + +attribute vec3 position; +attribute vec2 texcoord0; + + +void main() +{ + gl_Position = gl_ModelViewProjectionMatrix * vec4(position, 1); + gl_TexCoord[0] = vec4(texcoord0,0,1); +} + diff --git a/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl b/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl index 8401208e28..18c8e394c6 100644 --- a/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl @@ -5,12 +5,14 @@ * $/LicenseInfo$ */ - +attribute vec3 position; +attribute vec4 diffuse_color; +attribute vec2 texcoord0; void main() { - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; - gl_FrontColor = gl_Color; - gl_TexCoord[0] = gl_MultiTexCoord0; + gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_FrontColor = diffuse_color; + gl_TexCoord[0] = vec4(texcoord0,0,1); } diff --git a/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl b/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl index f685b112b4..dde4e87c63 100644 --- a/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl @@ -6,11 +6,14 @@ */ +attribute vec3 position; +attribute vec2 texcoord0; +attribute vec2 texcoord1; void main() { - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; - gl_TexCoord[0] = gl_MultiTexCoord0; - gl_TexCoord[1] = gl_MultiTexCoord1; + gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_TexCoord[0] = vec4(texcoord0,0,1); + gl_TexCoord[1] = vec4(texcoord1,0,1); } diff --git a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl index 9ca6cae5c5..9d129caf21 100644 --- a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl @@ -6,11 +6,15 @@ */ +attribute vec3 position; +attribute vec4 diffuse_color; +attribute vec2 texcoord0; + void main() { - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; - gl_TexCoord[0] = gl_MultiTexCoord0; - gl_FrontColor = gl_Color; + gl_Position = gl_ModelViewProjectionMatrix * vec4(position, 1); + gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1); + gl_FrontColor = diffuse_color; } |