diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-05-06 09:47:03 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-05-06 09:47:03 -0700 |
commit | 415380b140adf52611639def126112e7c2b7d35d (patch) | |
tree | 28df034408a95a7cce63c3af6a36f609eafe2536 | |
parent | 849e85dfd28cf561d17d6737db1e8463acffd7fa (diff) |
SL-17274: Add vary_position, cleanup whitespace
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl | 1 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl | 20 |
2 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl index 4da64ed5ee..ac3c9dd054 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl @@ -31,6 +31,7 @@ out vec4 frag_data[3]; #define frag_data gl_FragData #endif +VARYING vec3 vary_position; VARYING vec3 vary_normal; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl index 7c52b77711..72bae808e0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl @@ -25,6 +25,7 @@ uniform mat3 normal_matrix; uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; ATTRIBUTE vec3 position; @@ -32,8 +33,8 @@ ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec3 normal; ATTRIBUTE vec2 texcoord0; +VARYING vec3 vary_position; VARYING vec3 vary_normal; - VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; @@ -41,12 +42,13 @@ void passTextureIndex(); void main() { - //transform vertex - gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - - passTextureIndex(); - vary_normal = normalize(normal_matrix * normal); - - vertex_color = diffuse_color; + //transform vertex + gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); + vary_position = (modelview_matrix * vec4(position.xyz,1.0)).xyz; + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; + + passTextureIndex(); + vary_normal = normalize(normal_matrix * normal); + + vertex_color = diffuse_color; } |