I want to replace the pixels inside an image (or plain box) with those from an extern image passed to a shader:
Code: Select all
extern Image mask;
vec4 effect(vec4 color, Image tex, vec2 tc, vec2 sc) {
// tc = sc / love_ScreenSize.xy;
vec4 pixel = Texel(mask, tc);
return pixel * color;
}
If you uncomment the test line, the shader works fine -- here the extern image will be scaled to the current window. If you move the wasd about you can move the render box and see the test image in parts. This is not what I want.
I want the target box to contain the entire texture (even if you move it with wasd)... but my original example doesn't work.
What the bloody feck is going on lads?
Cheers.