I search a little bit on the forum but I don't find a solution so I ask here! My English is very bad! Sorry!
First of all is a lot of time that I don't use love and I never write shader..
I'm trying to learn it for make a bloom + blur effect for my futures game, so I start with some random effect to understand how it work.
I start making a random colour effect (https://bitbucket.org/vrld/love-glsl) and all was good, after I tried to apply a different colour to all the pixel starting with the previous colour (I'm not sure to explain me good),
Code: Select all
extern number time;
vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 pixel_coords)
{
vec4 pixel=texture2D(texture,texture_coords);
pixel.r+=sin(time);
pixel.g+=cos(time);
pixel.b+=-sin(time);
return pixel;
}
So I put a canvas, selected it during the draw function and after redraw on the display, but all the draw is in black and white! why? And the effect doesn't work at all! also the previous with the global colour, why?
Thanks a lot to all!