diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-06-11 20:56:02 -0700 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-06-11 20:56:02 -0700 |
commit | ffac2df6caedf48f30b3913386ea6e4c82ae5a0b (patch) | |
tree | c5e5a0541b318551cc04b6b7108f8f9025c6b72d /indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl | |
parent | 47e311d6e8b9996de3e0a1ac75c13724ce7735aa (diff) | |
parent | 1ebfc1876ec3383067a2399218037a33601b04d5 (diff) |
Merge branch 'DRTVWR-559' into DRTVWR-583-glossy-ssr
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl index e2c23ac8f0..160ae7a215 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl @@ -61,6 +61,7 @@ flat out float vary_sign; out vec3 vary_normal; vec2 texture_transform(vec2 vertex_texcoord, vec4[2] khr_gltf_transform, mat4 sl_animation_transform); +vec3 tangent_space_transform(vec4 vertex_tangent, vec3 vertex_normal, vec4[2] khr_gltf_transform, mat4 sl_animation_transform); void main() { @@ -91,9 +92,11 @@ void main() vec3 t = normal_matrix * tangent.xyz; #endif - vary_tangent = normalize(t); + n = normalize(n); + + vary_tangent = normalize(tangent_space_transform(vec4(t, tangent.w), n, texture_normal_transform, texture_matrix0)); vary_sign = tangent.w; - vary_normal = normalize(n); + vary_normal = n; vertex_color = diffuse_color; } @@ -107,8 +110,6 @@ uniform mat4 modelview_projection_matrix; uniform mat4 texture_matrix0; uniform vec4[2] texture_base_color_transform; -uniform vec4[2] texture_normal_transform; -uniform vec4[2] texture_metallic_roughness_transform; uniform vec4[2] texture_emissive_transform; in vec3 position; |