diff options
author | Sabrina Shanman <cosmic@lindenlab.com> | 2022-11-02 20:10:04 +0000 |
---|---|---|
committer | Sabrina Shanman <cosmic@lindenlab.com> | 2022-11-02 20:10:04 +0000 |
commit | 81011a318e7cd1e4ef5bfb1f2cc52274c7d78b8a (patch) | |
tree | 22f022676dd453143d3758c52572228f71782f42 /indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl | |
parent | 106b1a6e6add67f7770d508d8be1d0eff77ebd32 (diff) | |
parent | 9e7b725c15ea0bfea5246eb81dd7a100b7ac5b6b (diff) |
Merged in SL-18485 (pull request #1183)
SL-18485: Render GLTF materials with extension KHR_texture_transform with approprate texture transforms
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl index d0d76fd0cb..19bca098e8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl @@ -44,29 +44,32 @@ uniform mat4 modelview_projection_matrix; VARYING vec3 vary_position; #endif -uniform mat4 texture_matrix0; +uniform mat3 texture_basecolor_matrix; +uniform mat3 texture_normal_matrix; +uniform mat3 texture_metallic_roughness_matrix; +uniform mat3 texture_emissive_matrix; #ifdef HAS_SUN_SHADOW -VARYING vec3 vary_fragcoord; +out vec3 vary_fragcoord; uniform float near_clip; #endif -ATTRIBUTE vec3 position; -ATTRIBUTE vec4 diffuse_color; -ATTRIBUTE vec3 normal; -ATTRIBUTE vec4 tangent; -ATTRIBUTE vec2 texcoord0; -ATTRIBUTE vec2 texcoord1; -ATTRIBUTE vec2 texcoord2; - - -VARYING vec4 vertex_color; -VARYING vec2 vary_texcoord0; -VARYING vec2 vary_texcoord1; -VARYING vec2 vary_texcoord2; -VARYING vec3 vary_normal; -VARYING vec3 vary_tangent; +in vec3 position; +in vec4 diffuse_color; +in vec3 normal; +in vec4 tangent; +in vec2 texcoord0; + +out vec2 basecolor_texcoord; +out vec2 normal_texcoord; +out vec2 metallic_roughness_texcoord; +out vec2 emissive_texcoord; + +out vec4 vertex_color; + +out vec3 vary_tangent; flat out float vary_sign; +out vec3 vary_normal; void main() @@ -89,9 +92,10 @@ void main() vary_fragcoord.xyz = vert.xyz + vec3(0,0,near_clip); #endif - vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy; - vary_texcoord2 = (texture_matrix0 * vec4(texcoord2,0,1)).xy; + basecolor_texcoord = (texture_basecolor_matrix * vec3(texcoord0,1)).xy; + normal_texcoord = (texture_normal_matrix * vec3(texcoord0,1)).xy; + metallic_roughness_texcoord = (texture_metallic_roughness_matrix * vec3(texcoord0,1)).xy; + emissive_texcoord = (texture_emissive_matrix * vec3(texcoord0,1)).xy; #ifdef HAS_SKIN vec3 n = (mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz; |