Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. //...
  2. float cost =0.0;
  3. for (int cam_x = 0; cam_x < num_cams; cam_x++){
  4. for (int cam_y = 0; cam_y < num_cams; cam_y++){
  5. ivec2 cam = ivec2(cam_x,cam_y);
  6. vec2 cam_disp = disp * (camera-cam);
  7. vec3 d = color - lookup(cam, vec2(px + cam_disp)).rgb;
  8. cost += dot(d,d);
  9. }
  10. }
  11. //...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement