From c7478f200cf5f57120148fdd79f76b9d3eff0258 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 11 Jul 2018 18:03:07 +0100 Subject: Make sun/moon vert shaders use calcAtmospherics in hopes it will get OSX GL to link the shaders without complaining about unwritten varying vars. --- indra/newview/app_settings/shaders/class1/deferred/moonV.glsl | 4 ++++ indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl | 3 +++ indra/newview/app_settings/shaders/class1/windlight/moonV.glsl | 4 ++-- indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl | 4 ++++ 4 files changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') 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; } -- cgit v1.2.3