   return normal * sqrt(1.0 - r) + dir * sqrt(r);
 }
 
+// tracer parameters
+#define N_BOUNCES 4
+#define IMAGE_BRIGHTNESS 1.0
+
 #if 1
 float weight1(float p1, float p2) {
     //return 0.5;

    return ((jittered_pos / resolution.xy) * 2.0 - 1.0) * vec2(1.0, aspect);
}

// tracer parameters
#define N_BOUNCES 4
#define IMAGE_BRIGHTNESS 1.0

// secene geometry
#define OBJ_NONE 0
#define OBJ_SPHERE_1 1

}

#define weight2 weight1
#elif 0
// uncomment to use pure path tracing
#define weight1(a,b) 1.0
#define weight2(a,b) 0.0
#else
// uncomment to use only direct lights (if bounces == 1)
#define weight1(a,b) 0.0
#define weight2(a,b) 1.0
#endif

void main() {
