• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 Shader separation suggestion

kburkhart84

Firehammer Games
I had a thought...why can't we create vertex and fragment shaders separately? For example, if I were to create shaders for animated 3d models, I might want several different types. I would possibly want both vertex skinning animation and skeletal animation, which means 2 different vertex shaders, plus another one that is meant for static meshes. Then I might want more than 1 fragment shader. Now, even if I only want 1 fragment shader but the three different vertex shaders, I have to have 3 different shader resources. If I want to create a different fragment shader, I then have to create them in triplets to go with the 3 vertex shaders.

So, the best thing would be to have separate resources for vertex and fragment shaders instead. This way, we could mix/match things directly without having to have duplicate code anywhere. What do you guys think?
 

Perseus

Not Medusa
Forum Staff
Moderator
Could be useful. In case they don't want to do it, there should be a shader_set_ext(shd_vertex, shd_fragment) function that allows combining vertex and fragment shaders of two different shader resources.

Code:
shader_set_ext(shd_Gem, shd_Ruby);
draw_self();
shader_reset();
But it might not be feasible depending on how shaders are handled internally, so let's first listen to what they've got to say.
 

Mike

nobody important
GMC Elder
We have no plans for this, it's an over complication that virtually no on would use, and so a waste of resources to implement.
 

kburkhart84

Firehammer Games
We have no plans for this, it's an over complication that virtually no on would use, and so a waste of resources to implement.
"Virtually" is a sucky word here....I'm sure a few people would use it. I've seen a few nice 3d things going around. I understand though that it's primary use would be in doing things in 3d, and 3d is not something GMS(2) is focused on. I don't agree with the decision, but I can respect it albeit begrudgingly.....
 
Top