Hi. I'm tring to do a palette swap using shaders. Its for expecific colors, so my script looks something like this:
effect
{
vec4 pixel = framebuffer(_in);
vec4 c1 = vec4(32/255.0, 160/255.0, 128/255.0, 1.0);
vec4 c2 = vec4(1.0, 1.0, 1.0, 1.0);//white
if (pixel == c1) pixel = c2;
_out = pixel;
}
The thing is is works for some colors and others not. I think is has to do with the conversion from rgb 255 to floats. Any ideas? Is there a way to output/cout from the script to console window?
Thank you.