From 70855987c576b9bdf872cac8f9b9e5a11cdddfce Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 7 Nov 2023 13:52:37 +0000 Subject: [PATCH] Updated dli shader to match mesh definition Change-Id: Ib4ffb370241f4b472b4ec98cd09c83922960a4ce --- resources/shaders/dli_pbr.vsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/shaders/dli_pbr.vsh b/resources/shaders/dli_pbr.vsh index 92f6c29f..e54ae3ab 100644 --- a/resources/shaders/dli_pbr.vsh +++ b/resources/shaders/dli_pbr.vsh @@ -31,8 +31,8 @@ uniform mat4 uModelView; uniform mat4 uProjection; #ifdef SKINNING - in vec4 aJoints; - in vec4 aWeights; + in vec4 aJoints0; + in vec4 aWeights0; #define MAX_BONES 64 uniform mat4 uBone[MAX_BONES]; #endif @@ -123,10 +123,10 @@ void main() #endif #ifdef SKINNING - mat4 bone = uBone[int(aJoints.x)] * aWeights.x + - uBone[int(aJoints.y)] * aWeights.y + - uBone[int(aJoints.z)] * aWeights.z + - uBone[int(aJoints.w)] * aWeights.w; + mat4 bone = uBone[int(aJoints0.x)] * aWeights0.x + + uBone[int(aJoints0.y)] * aWeights0.y + + uBone[int(aJoints0.z)] * aWeights0.z + + uBone[int(aJoints0.w)] * aWeights0.w; position = bone * position; normal = (bone * vec4(normal, 0.0)).xyz; tangent = (bone * vec4(tangent, 0.0)).xyz; -- 2.34.1