• 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!

Shaders (SOLVED)(compile) Packing Error

S

sir_derp

Guest
I keep getting an error saying it can't pack a variable in a shader I've written, the shader worked fine until I updated it today to add more colors. Does anyone have experience debugging packing errors?

pack_error_compile.PNG
Vertex shader
pack_error_vertex_0.PNGpack_error_vertex_1.PNG
Fragment shader
pack_error_frag_0.PNG pack_error_frag_1.PNG
 
S

sir_derp

Guest
so I've managed to track the problem down to some combination of the following
hair_new2
hair_default2
hair_new3
hair_default3

Update:
I can confirm that trying to access any of those from the fragment shader causes the error, but hair_new1 and hair_default1 both work fine, despite all of them using the same code.
 
Last edited by a moderator:
S

sir_derp

Guest
Okay, so I figured out the problem, it turns out I was using too many "uniform" and "varying" variables outside the main() function. Apparently there is a limit on how many your allowed to use. I solved it by hardcoding the default colors.
 
Top