Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //...
- float cost =0.0;
- for (int cam_x = 0; cam_x < num_cams; cam_x++){
- for (int cam_y = 0; cam_y < num_cams; cam_y++){
- ivec2 cam = ivec2(cam_x,cam_y);
- vec2 cam_disp = disp * (camera-cam);
- vec3 d = color - lookup(cam, vec2(px + cam_disp)).rgb;
- cost += dot(d,d);
- }
- }
- //...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement