@@ -69,6 +69,7 @@ public void render(ItemStack stack, TransformType mode, PoseStack matrices, Mult
6969 case FIRST_PERSON_LEFT_HAND :
7070 case FIRST_PERSON_RIGHT_HAND :
7171 Matrix4f modelViewMatrix = matrices .last ().pose ().copy ();
72+ Matrix3f normalMatrix = matrices .last ().normal ().copy ();
7273 if (MCglTF .getInstance ().isShaderModActive ()) {
7374 IrisRenderingHook .submitCommandForIrisRenderingByPhaseName ("HAND_SOLID" , renderType , () -> {
7475 for (List <InterpolatedChannel > animation : animations ) {
@@ -79,6 +80,7 @@ public void render(ItemStack stack, TransformType mode, PoseStack matrices, Mult
7980 }
8081
8182 RenderedGltfModel .CURRENT_POSE = modelViewMatrix ;
83+ RenderedGltfModel .CURRENT_NORMAL = normalMatrix ;
8284
8385 boolean currentBlend = GL11 .glGetBoolean (GL11 .GL_BLEND );
8486 GL11 .glEnable (GL11 .GL_BLEND );
@@ -96,7 +98,6 @@ public void render(ItemStack stack, TransformType mode, PoseStack matrices, Mult
9698 });
9799 }
98100 else {
99- Matrix3f normalMatrix = matrices .last ().normal ().copy ();
100101 IrisRenderingHook .submitCommandForIrisRenderingByPhaseName ("NONE" , renderType , () -> {
101102 for (List <InterpolatedChannel > animation : animations ) {
102103 animation .parallelStream ().forEach ((channel ) -> {
@@ -126,6 +127,7 @@ public void render(ItemStack stack, TransformType mode, PoseStack matrices, Mult
126127 break ;
127128 default :
128129 modelViewMatrix = matrices .last ().pose ().copy ();
130+ normalMatrix = matrices .last ().normal ().copy ();
129131 if (MCglTF .getInstance ().isShaderModActive ()) {
130132 IrisRenderingHook .submitCommandForIrisRenderingByPhaseName ("ENTITIES" , renderType , () -> {
131133 for (List <InterpolatedChannel > animation : animations ) {
@@ -136,6 +138,7 @@ public void render(ItemStack stack, TransformType mode, PoseStack matrices, Mult
136138 }
137139
138140 RenderedGltfModel .CURRENT_POSE = modelViewMatrix ;
141+ RenderedGltfModel .CURRENT_NORMAL = normalMatrix ;
139142
140143 boolean currentBlend = GL11 .glGetBoolean (GL11 .GL_BLEND );
141144 GL11 .glEnable (GL11 .GL_BLEND );
@@ -153,7 +156,6 @@ public void render(ItemStack stack, TransformType mode, PoseStack matrices, Mult
153156 });
154157 }
155158 else {
156- Matrix3f normalMatrix = matrices .last ().normal ().copy ();
157159 IrisRenderingHook .submitCommandForIrisRenderingByPhaseName ("NONE" , renderType , () -> {
158160 for (List <InterpolatedChannel > animation : animations ) {
159161 animation .parallelStream ().forEach ((channel ) -> {
0 commit comments