Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Animated 3D model and shader question

Author
Message
5v3n
4
Years of Service
User Offline
Joined: 23rd Feb 2020
Location:
Posted: 21st Sep 2022 15:26
I was experimenting with shaders and visually i got a good result- but then i discovered that i cant set animations to my 3d models if i apply shader to them.

I am using shader files from this post on this forum https://forum.thegamecreators.com/thread/226425

Anyone can tell me what i need to do to make it work with animations also.

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 21st Sep 2022 19:00
This post has been marked by the post author as the answer.
You need to change the the vertex shader to commodate for the bones.
This is the part from AGK's default Bone vertex shader you will need:

5v3n
4
Years of Service
User Offline
Joined: 23rd Feb 2020
Location:
Posted: 21st Sep 2022 19:25 Edited at: 22nd Sep 2022 12:42
Thank you.
It works now.

Just for info to the others who are faceing to the same problem:
I had to edit those lines so my model was not scattered
uniform highp vec4 agk_bonequats1[30]; <---instead of value 30 i needed to change that value to 60
uniform highp vec4 agk_bonequats2[30];

I am still learning this stuff so i have no idea what is going on here actually -so i just tried to edit values and happens to work.

Login to post a reply

Server time is: 2024-11-23 08:16:48
Your offset time is: 2024-11-23 08:16:48