Animated model's shadows are deformed on PC with AMD CPU.

I got my animated shadows working on my laptop, during school. But, when I copy the same code on my PC, it gives me strange deformed shadows for my animated models.

I have the same bone transformation matrices for all of my animated shaders. While my models are working properly in both systems. Its just their shadows that are all strange on my main PC.

The IDE on my laptop is Visual Studio 2017 whereas on my PC it is Visual Studio 2019. All of my dependencies are the same.

I have been, searching for bugs in my shaders for several days now, and still cant find the problem. What could be causing this problem??

**Update:**The project works fine on other computers with intel processors. Even tried it with different IDEs and it worked. The only problem is on my desktop with an AMD cpu.

Interesting. You might run the OpenGL Hardware Capability Viewer on both 1) a system that works and 2) a system that exhibits the artifact. That will confirm which specific GPU, GL driver, and GL driver version you are making use of on each system.

It’s also not a foregone conclusion that the artifact is due to a driver bug. It could due to a bug in your code.

Are you checking for GL errors? That won’t conclusively prove that it’s one or the other. But if you’re getting an error, that suggests it might be a bug on your side.

1 Like

I am validating the shader program on every render pass. And doing error checks on my models as well. I get no errors. I have checked everywhere where other people had model loading problems. I’ve played with the transpose in shadow vertex shaders and it gets worse.

Edit: Ok. After using the tool that you suggested. I found out that my laptop was not using nvidia as default as the graphics processor so, I changed it to nvidia. Now even my laptop seems to have the same problem. But when I use my intel’s onboard graphics I get my shadows working. So, now I can rule out AMD processor as a problem.

Should I just make a seperate animation class and do my bone transformations there and call those seperately on every render pass??

UPDATE: Fixed the problem, for some reason intel’s graphic processor is ok with using the vertex shader for animated models, and nvidia isn’t.

To be clear, I was being dumb and in my function that renders scene, I was only using the vertex shader for the models and not for the shadow. So, I created a bool, so that if it is true it renders with the shadow vertex shader. And, it’s fixed and I can finally move on to some new problems.

Thank you for helping me.

Good deal. Glad to hear you got it solved.

1 Like

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.