C
comatsu
Guest
I've made a shader which tints a sprite with a selected color. So far I am passing the tint color to the shader with this code:
and
However now I am trying to set the tint to a color of my choosing, and have changed the first line above (var col = c_yellow) to the following:
I am leaving the rest exactly the same. For some reason, this code does not work, resulting in the sprite being drawn as white, whatever color I set. I've tried using other preset colors (c_red, c_blue etc) and they all work fine, however any color I try to create does not work.
Any thoughts on what I am missing?
Code:
var col = c_yellow;
col_r = colour_get_red(col);
col_g = colour_get_green(col);
col_b = colour_get_blue(col);
Code:
shader_set_uniform_f(tint_color,col_r,col_g,col_b,1.0);
Code:
var col = color_make_rgb(115,51,212);
Any thoughts on what I am missing?