diff options
author | Graham Linden <graham@lindenlab.com> | 2018-07-11 18:03:07 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-07-11 18:03:07 +0100 |
commit | c7478f200cf5f57120148fdd79f76b9d3eff0258 (patch) | |
tree | abe481a91ed6f32f4288198d2d5e03af7a91ebc0 /indra/newview/app_settings/shaders/class1 | |
parent | 5fade93da8a1b832a1dbfd494a18e7b441b5feab (diff) |
Make sun/moon vert shaders use calcAtmospherics in hopes it will get OSX GL to link the shaders without complaining about unwritten varying vars.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
4 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl index 4fcc44ed01..0325ecead9 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl @@ -32,6 +32,8 @@ ATTRIBUTE vec2 texcoord0; VARYING vec2 vary_texcoord0; +void calcAtmospherics(vec3 eye_pos); + void main() { //transform vertex @@ -39,6 +41,8 @@ void main() vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); + + calcAtmospherics(pos.xyz); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl index 3bf50ddd0a..c75440cd05 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl @@ -32,6 +32,8 @@ ATTRIBUTE vec2 texcoord0; VARYING vec2 vary_texcoord0; +void calcAtmospherics(vec3 eye_pos); + void main() { //transform vertex @@ -40,5 +42,6 @@ void main() gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); + calcAtmospherics(pos.xyz); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; } diff --git a/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl b/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl index 7c4dfbd999..aaa6768ed7 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl @@ -30,7 +30,7 @@ uniform mat4 modelview_projection_matrix; ATTRIBUTE vec3 position; ATTRIBUTE vec2 texcoord0; -//void calcAtmospherics(vec3 inPositionEye); +void calcAtmospherics(vec3 inPositionEye); VARYING vec2 vary_texcoord0; @@ -44,5 +44,5 @@ void main() vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - //calcAtmospherics(pos.xyz); + 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 3bf50ddd0a..5a6e481b18 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl @@ -32,6 +32,8 @@ ATTRIBUTE vec2 texcoord0; VARYING vec2 vary_texcoord0; +void calcAtmospherics(vec3 eye_pos); + void main() { //transform vertex @@ -40,5 +42,7 @@ void main() gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); + calcAtmospherics(pos.xyz); + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; } |