diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-03-25 22:50:26 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-03-25 22:50:26 +0000 |
commit | 6fcf38217e8772b2f90c7a8e7ce6b60071f6d20c (patch) | |
tree | a8e35fe195cc86c616daf9d8a21571e04bc2bc35 /indra/newview/app_settings/shaders | |
parent | 11a3589665aae1a2423e258e40eba45c117627d5 (diff) |
merge release@82858 maint-render-2-merge@83010 -> release
QAR-389
Diffstat (limited to 'indra/newview/app_settings/shaders')
8 files changed, 46 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl new file mode 100644 index 0000000000..14e6361f83 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl @@ -0,0 +1,16 @@ +/** + * @file diffuseF.glsl + * + * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. + * $License$ + */ + +uniform sampler2D diffuseMap; + +varying vec3 vary_normal; + +void main() +{ + gl_FragColor = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); + gl_FragColor.rgb = vary_normal*0.5+0.5; +} diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl new file mode 100644 index 0000000000..8e9069368a --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl @@ -0,0 +1,22 @@ +/** + * @file diffuseV.glsl + * + * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. + * $License$ + */ + +varying vec3 vary_normal; +varying vec3 vary_position; + +void main() +{ + //transform vertex + gl_Position = ftransform(); + gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; + + vary_position = (gl_ModelViewMatrix * gl_Vertex).xyz; + + vary_normal = normalize(gl_NormalMatrix * gl_Normal); + + gl_FrontColor = gl_Color; +} diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl index 1c14381df9..7b9e4ff828 100644 --- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl @@ -86,7 +86,7 @@ void main() color.rgb = mix(mix(fogCol.rgb, fb.rgb, fogCol.a), refcol.rgb, df); color.rgb += spec * specular; - color.rgb = atmosTransport(color.rgb); + color.rgb = applyWaterFog(color);//atmosTransport(color.rgb); color.rgb = scaleSoftClip(color.rgb); color.a = spec * sunAngle2; diff --git a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl index 59e44fa871..7ee41998e2 100644 --- a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl @@ -8,11 +8,11 @@ vec4 applyWaterFog(vec4 color) { // GL_EXP2 Fog - float fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord); + //float fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord); // GL_EXP Fog // float fog = exp(-gl_Fog.density * gl_FogFragCoord); // GL_LINEAR Fog - // float fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale; + float fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale; fog = clamp(fog, 0.0, 1.0); color.rgb = mix(gl_Fog.color.rgb, color.rgb, fog); return color; diff --git a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl index d332798103..48ac87ef07 100644 --- a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl @@ -63,9 +63,8 @@ void main() //pass wave parameters to pixel shader vec2 bigWave = (v.xy) * vec2(0.04,0.04) + d1 * time * 0.055; //get two normal map (detail map) texture coordinates - littleWave.xy = (v.xy) * vec2(0.6, 1.2) + d2 * time * 0.05; - // littleWave.zw = (v.xy) * vec2(0.07, 0.15) - d1 * time * 0.043; - littleWave.zw = (v.xy) * vec2(0.3, 0.6) + d1 * time * 0.1; + littleWave.xy = (v.xy) * vec2(0.45, 0.9) + d2 * time * 0.13; + littleWave.zw = (v.xy) * vec2(0.1, 0.2) + d1 * time * 0.1; view.w = bigWave.y; refCoord.w = bigWave.x; diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl index 9ab986be6d..071489bca8 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl @@ -9,7 +9,7 @@ uniform sampler2D diffuseMap; void default_lighting() { - color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); + vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); gl_FragColor = color; } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl index c6f7f8b81b..89785c45cb 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl @@ -11,7 +11,7 @@ uniform samplerCube environmentMap; void shiny_lighting() { - color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); + vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); gl_FragColor = color; } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl index 75f61ccdf1..7ac3c359bf 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl @@ -11,7 +11,7 @@ uniform samplerCube environmentMap; void shiny_lighting_water() { - color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); + vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy); gl_FragColor = color; } |