diff --git a/compare.glsl b/compare.glsl index 0eb5fec..d30aeec 100644 --- a/compare.glsl +++ b/compare.glsl @@ -16,16 +16,16 @@ void main(void) if (horizontal) { float posy = gl_FragCoord.y/size.y; for (float x=0.0; x<=1.0; x+=(1.0/size.x)) { - vec4 color = texture2D(curr, vec2(x, posy)); - vec4 basecolor = texture2D(base, vec2(x, 1.0-posy)); + vec4 color = texture2D(curr, vec2(x, posy)); + vec4 basecolor = texture2D(base, vec2(x, posy)); color.rgb = abs(color.rgb - basecolor.rgb); total = total + color.r + color.g + color.b; } } else { float posx = gl_FragCoord.x/size.x; for (float y=0.0; y<=1.0; y+=(1.0/size.y)) { - vec4 color = texture2D(curr, vec2(posx, y)); - vec4 basecolor = texture2D(base, vec2(posx, 1.0-y)); + vec4 color = texture2D(curr, vec2(posx, y)); + vec4 basecolor = texture2D(base, vec2(posx, y)); color.rgb = abs(color.rgb - basecolor.rgb); total = total + color.r + color.g + color.b; } diff --git a/src/Fitness.cpp b/src/Fitness.cpp index 12617d4..3a3d9bd 100644 --- a/src/Fitness.cpp +++ b/src/Fitness.cpp @@ -55,7 +55,7 @@ bool Fitness::loadTarget(std::string filename) // load the image sf::Texture tex; - if (!tex.loadFromFile("tom-face.png")) { + if (!tex.loadFromFile(filename)) { return false; }