Always write values to the projected texture even when normal-test fails (closing #103)

This commit is contained in:
Alexander Bock
2016-06-21 14:24:23 +02:00
parent 5c6f1c2815
commit 3775bbe6b1
@@ -55,8 +55,11 @@ void main() {
//invert gl coordinates
projected.x = 1 - projected.x;
if((inRange(projected.x, 0, 1) && inRange(projected.y, 0, 1)) && (dot(n, boresight) < 0)) {
if ((inRange(projected.x, 0, 1) && inRange(projected.y, 0, 1)) && (dot(n, boresight) < 0)) {
color = texture(projectionTexture, projected.xy);
color.a = 1.0;
}
else {
color = vec4(vec3(0.0), 1.0);
}
}