aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/app_settings/shaders
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/newview/app_settings/shaders')
-rw-r--r--linden/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl16
-rw-r--r--linden/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl22
-rw-r--r--linden/indra/newview/app_settings/shaders/class1/environment/waterF.glsl2
-rw-r--r--linden/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl4
-rw-r--r--linden/indra/newview/app_settings/shaders/class1/environment/waterV.glsl5
-rw-r--r--linden/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl2
-rw-r--r--linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl2
-rw-r--r--linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl2
8 files changed, 46 insertions, 9 deletions
diff --git a/linden/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/linden/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
new file mode 100644
index 0000000..14e6361
--- /dev/null
+++ b/linden/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
@@ -0,0 +1,16 @@
1/**
2 * @file diffuseF.glsl
3 *
4 * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
5 * $License$
6 */
7
8uniform sampler2D diffuseMap;
9
10varying vec3 vary_normal;
11
12void main()
13{
14 gl_FragColor = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
15 gl_FragColor.rgb = vary_normal*0.5+0.5;
16}
diff --git a/linden/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/linden/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
new file mode 100644
index 0000000..8e90693
--- /dev/null
+++ b/linden/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
@@ -0,0 +1,22 @@
1/**
2 * @file diffuseV.glsl
3 *
4 * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
5 * $License$
6 */
7
8varying vec3 vary_normal;
9varying vec3 vary_position;
10
11void main()
12{
13 //transform vertex
14 gl_Position = ftransform();
15 gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
16
17 vary_position = (gl_ModelViewMatrix * gl_Vertex).xyz;
18
19 vary_normal = normalize(gl_NormalMatrix * gl_Normal);
20
21 gl_FrontColor = gl_Color;
22}
diff --git a/linden/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/linden/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
index 1c14381..bd9b30a 100644
--- a/linden/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
+++ b/linden/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
@@ -86,7 +86,7 @@ void main()
86 color.rgb = mix(mix(fogCol.rgb, fb.rgb, fogCol.a), refcol.rgb, df); 86 color.rgb = mix(mix(fogCol.rgb, fb.rgb, fogCol.a), refcol.rgb, df);
87 color.rgb += spec * specular; 87 color.rgb += spec * specular;
88 88
89 color.rgb = atmosTransport(color.rgb); 89 //color.rgb = applyWaterFog(color);//atmosTransport(color.rgb);
90 color.rgb = scaleSoftClip(color.rgb); 90 color.rgb = scaleSoftClip(color.rgb);
91 color.a = spec * sunAngle2; 91 color.a = spec * sunAngle2;
92 92
diff --git a/linden/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/linden/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
index 59e44fa..7ee4199 100644
--- a/linden/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
+++ b/linden/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
@@ -8,11 +8,11 @@
8vec4 applyWaterFog(vec4 color) 8vec4 applyWaterFog(vec4 color)
9{ 9{
10 // GL_EXP2 Fog 10 // GL_EXP2 Fog
11 float fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord); 11 //float fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord);
12 // GL_EXP Fog 12 // GL_EXP Fog
13 // float fog = exp(-gl_Fog.density * gl_FogFragCoord); 13 // float fog = exp(-gl_Fog.density * gl_FogFragCoord);
14 // GL_LINEAR Fog 14 // GL_LINEAR Fog
15 // float fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale; 15 float fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale;
16 fog = clamp(fog, 0.0, 1.0); 16 fog = clamp(fog, 0.0, 1.0);
17 color.rgb = mix(gl_Fog.color.rgb, color.rgb, fog); 17 color.rgb = mix(gl_Fog.color.rgb, color.rgb, fog);
18 return color; 18 return color;
diff --git a/linden/indra/newview/app_settings/shaders/class1/environment/waterV.glsl b/linden/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
index d332798..48ac87e 100644
--- a/linden/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
+++ b/linden/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
@@ -63,9 +63,8 @@ void main()
63 //pass wave parameters to pixel shader 63 //pass wave parameters to pixel shader
64 vec2 bigWave = (v.xy) * vec2(0.04,0.04) + d1 * time * 0.055; 64 vec2 bigWave = (v.xy) * vec2(0.04,0.04) + d1 * time * 0.055;
65 //get two normal map (detail map) texture coordinates 65 //get two normal map (detail map) texture coordinates
66 littleWave.xy = (v.xy) * vec2(0.6, 1.2) + d2 * time * 0.05; 66 littleWave.xy = (v.xy) * vec2(0.45, 0.9) + d2 * time * 0.13;
67 // littleWave.zw = (v.xy) * vec2(0.07, 0.15) - d1 * time * 0.043; 67 littleWave.zw = (v.xy) * vec2(0.1, 0.2) + d1 * time * 0.1;
68 littleWave.zw = (v.xy) * vec2(0.3, 0.6) + d1 * time * 0.1;
69 view.w = bigWave.y; 68 view.w = bigWave.y;
70 refCoord.w = bigWave.x; 69 refCoord.w = bigWave.x;
71 70
diff --git a/linden/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl b/linden/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
index 9ab986b..071489b 100644
--- a/linden/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
+++ b/linden/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
@@ -9,7 +9,7 @@ uniform sampler2D diffuseMap;
9 9
10void default_lighting() 10void default_lighting()
11{ 11{
12 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); 12 vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
13 gl_FragColor = color; 13 gl_FragColor = color;
14} 14}
15 15
diff --git a/linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
index c6f7f8b..89785c4 100644
--- a/linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
+++ b/linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
@@ -11,7 +11,7 @@ uniform samplerCube environmentMap;
11 11
12void shiny_lighting() 12void shiny_lighting()
13{ 13{
14 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); 14 vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
15 gl_FragColor = color; 15 gl_FragColor = color;
16} 16}
17 17
diff --git a/linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
index 75f61cc..7ac3c35 100644
--- a/linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
+++ b/linden/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
@@ -11,7 +11,7 @@ uniform samplerCube environmentMap;
11 11
12void shiny_lighting_water() 12void shiny_lighting_water()
13{ 13{
14 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); 14 vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
15 gl_FragColor = color; 15 gl_FragColor = color;
16} 16}
17 17