     vec3 D = vec3(camera_world_matrix * vec4(p, 1)) - o;
 
     // Trace
-    return trace(Ray(o, normalize(D)), rsi);
+    return trace(Ray(o, normalize(D)));
 }
 
 
 void main(void) {
 
     uv = (vs_pixel + 1.0) * 0.5;
-    int rsi = 0;  // random seed index
+    rsi = 0;
 
     float degree = float(pixel_sampler_grid_degree);
 

/**
 * Bounces a ray off a lambertian surface.
 *
 * @param      rsi   Random seed offset.
 * @param[out] pdf   Probability of chosen direction.
 *
 * @details
 *      This implementation draws from a cosine-weighted distribution.
 */
vec3 bounce_lambert(inout int rsi, out float pdf) {

    float r1 = random(rsi++);
    float r2 = random(rsi++);

    float a = M_2_PI * r1;
    float b = sqrt(1.0 - r2);

}

vec2 uv;
int rsi = 0;

highp float random() {

    rsi += 1;

    return noise(

        0.5 * (uv.xy + sample_vec3(random_seeds, rsi, N_RANDOM_SEEDS).x)
    );
}

