some stuff

This commit is contained in:
Ben Kyd
2019-07-29 08:05:38 +01:00
parent 8491f095f1
commit f8dba5442b
7 changed files with 49 additions and 8 deletions

View File

@@ -3,6 +3,15 @@
#include "camera.hpp"
#include "scene.hpp"
Ray GeneratePrimaryRay(int x, int y, Scene& scene, float xSubPix = 0.5f, float ySubPix = 0.5f) {
Ray GeneratePrimaryRay(int x, int y, Scene& scene, float xSubPix, float ySubPix) {
// double dy = 1.0;
// double dx = 1.0;
// double py = (- c->height / 2.0) + dy * ((double)y + 0.5);
// double px = (- c->width / 2.0) + dx * ((double)x + 0.5);
// Vector3 p = vec3_add3(c->planeCenter,
// vec3_mult(c->planeDirectionX, px),
// vec3_mult(c->planeDirectionY, py));
// Vector3 u_r = vec3_unit(vec3_sub(p, c->position));
// return ray_make(c->position, u_r);
return {};
}