Kaliam
Member
Hello, I'm just trying to use a shader uniform that is declared as such:
This compiles just fine in GLSL, however, there isn't a GMS2 function that is specifically for a vec4. I've tried using a float array of arrays that represent the vec4's in an array but can't seem to get it to work. This is the code that I tried.
Which function would I use for this? Is it even possible to do in GMS2?
Any information is appreciated, I could represent the vec4 data in just a regular float array, but it would be awesome if we could just use a vec4[ ] array and not have to pass through everything in one messy float array.
Thanks!
Code:
uniform vec4 lightMap[32];
Code:
//create event
u_lightMap = shader_get_uniform(shdr_depthShadow,"lightMap")
testVec4 = [1.0, 1.0, 1.0, 1.0];
vec4Array = array_create(32,testVec4);
//draw event
shader_set(shdr_lightingShader);
shader_set_uniform_f_array(u_lightMap,vec4Array);
/*Draw all the things*/
shader_reset();
Code:
shader_set_uniform_f_array()
shader_set_uniform_i_array()
shader_set_uniform_matrix_array()
Thanks!