diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/windlight')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/moonV.glsl | 17 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl | 3 |
2 files changed, 11 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl b/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl index aaa6768ed7..1c43a7332e 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl @@ -36,13 +36,14 @@ VARYING vec2 vary_texcoord0; void main() { - //transform vertex - vec4 vert = vec4(position.xyz, 1.0); - vec4 pos = (modelview_matrix * vert); + //transform vertex + vec3 offset = vec3(0, 0, 50); + vec4 vert = vec4(position.xyz - offset, 1.0); + vec4 pos = (modelview_matrix * vert); - gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); - - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - calcAtmospherics(pos.xyz); + gl_Position = modelview_projection_matrix*vert; + + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; + + calcAtmospherics(pos.xyz); } diff --git a/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl b/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl index 1fa32c3f3b..ca116628f1 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl @@ -38,7 +38,8 @@ void calcAtmospherics(vec3 eye_pos); void main() { //transform vertex - vec4 vert = vec4(position.xyz, 1.0); + vec3 offset = vec3(0, 0, 50); + vec4 vert = vec4(position.xyz - offset, 1.0); vec4 pos = modelview_projection_matrix*vert; sun_fade = smoothstep(0.3, 1.0, (position.z + 50) / 512.0f); |