diff options
author | Brad Kittenbrink <brad@lindenlab.com> | 2008-02-27 18:58:14 +0000 |
---|---|---|
committer | Brad Kittenbrink <brad@lindenlab.com> | 2008-02-27 18:58:14 +0000 |
commit | 6d52efe452aa8469e0343da1c7d108f3f52ab651 (patch) | |
tree | a87be48e9840d7fc1f7ee514d7c7f994e71fdb3c /indra/newview/app_settings/shaders/class1/objects/shinyV.glsl | |
parent | 6027ad2630b8650cabcf00628ee9b0d25bedd67f (diff) |
Merge of windlight into release (QAR-286). This includes all changes in
windlight14 which have passed QA (up through r79932).
svn merge -r 80831:80833 svn+ssh://svn.lindenlab.com/svn/linden/branches/merge_windlight14_r80620
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/objects/shinyV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/objects/shinyV.glsl | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl index 16fba0154b..c2e1ddf734 100644 --- a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl @@ -1,27 +1,30 @@ -void default_scatter(vec3 viewVec, vec3 lightDir); +/** + * @file shinyV.glsl + * + * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. + * $License$ + */ + +void calcAtmospherics(vec3 inPositionEye); uniform vec4 origin; void main() { //transform vertex - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + gl_Position = ftransform(); //gl_ModelViewProjectionMatrix * gl_Vertex; - vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz; + vec4 pos = (gl_ModelViewMatrix * gl_Vertex); vec3 norm = normalize(gl_NormalMatrix * gl_Normal); + + calcAtmospherics(pos.xyz); gl_FrontColor = gl_Color; - vec3 ref = reflect(pos, norm); - - vec3 d = pos - origin.xyz; - float dist = dot(normalize(d), ref); - vec3 e = d + (ref * max(origin.w-dist, 0.0)); - - ref = e - origin.xyz; + vec3 ref = reflect(pos.xyz, -norm); gl_TexCoord[0] = gl_TextureMatrix[0]*vec4(ref,1.0); - default_scatter(pos.xyz, gl_LightSource[0].position.xyz); + gl_FogFragCoord = pos.z; } |