Skip to content
Snippets Groups Projects
Commit ec9557e4 authored by Cosmic Linden's avatar Cosmic Linden
Browse files

SL-18740: Fix texture animations not working for GLTF materials

parent e3b34fec
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
......@@ -36,6 +36,7 @@ mat4 getObjectSkinnedTransform();
uniform mat3 normal_matrix;
uniform mat4 modelview_projection_matrix;
#endif
uniform mat4 texture_matrix0;
#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
#if !defined(HAS_SKIN)
......@@ -92,10 +93,10 @@ void main()
vary_fragcoord.xyz = vert.xyz + vec3(0,0,near_clip);
#endif
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;
basecolor_texcoord = (texture_matrix0 * vec4(texture_basecolor_matrix * vec3(texcoord0,1), 1)).xy;
normal_texcoord = (texture_matrix0 * vec4(texture_normal_matrix * vec3(texcoord0,1), 1)).xy;
metallic_roughness_texcoord = (texture_matrix0 * vec4(texture_metallic_roughness_matrix * vec3(texcoord0,1), 1)).xy;
emissive_texcoord = (texture_matrix0 * vec4(texture_emissive_matrix * vec3(texcoord0,1), 1)).xy;
#ifdef HAS_SKIN
vec3 n = (mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz;
......
......@@ -36,6 +36,7 @@ mat4 getObjectSkinnedTransform();
uniform mat3 normal_matrix;
uniform mat4 modelview_projection_matrix;
#endif
uniform mat4 texture_matrix0;
uniform mat3 texture_basecolor_matrix;
uniform mat3 texture_normal_matrix;
......@@ -75,10 +76,10 @@ void main()
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
#endif
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;
basecolor_texcoord = (texture_matrix0 * vec4(texture_basecolor_matrix * vec3(texcoord0,1), 1)).xy;
normal_texcoord = (texture_matrix0 * vec4(texture_normal_matrix * vec3(texcoord0,1), 1)).xy;
metallic_roughness_texcoord = (texture_matrix0 * vec4(texture_metallic_roughness_matrix * vec3(texcoord0,1), 1)).xy;
emissive_texcoord = (texture_matrix0 * vec4(texture_emissive_matrix * vec3(texcoord0,1), 1)).xy;
#ifdef HAS_SKIN
vec3 n = (mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment