mirror of
https://github.com/vonhyou/ray-tracer-comp371.git
synced 2025-06-08 07:22:01 +00:00
fix orientation
This commit is contained in:
parent
6488a9dd9f
commit
85d8025cd6
1 changed files with 2 additions and 2 deletions
|
@ -32,8 +32,8 @@ void RayTracer::render(Scene *scene) {
|
|||
Vector3f up = scene->getUpVector();
|
||||
float vpHeight = 2 * tan(fov / 180 * 3.14159265 / 2) * lookAt.norm();
|
||||
float vpWidth = vpHeight * width / height;
|
||||
Vector3f vpU = Vector3f(vpWidth, 0, 0);
|
||||
Vector3f vpV = Vector3f(0, -vpHeight, 0);
|
||||
Vector3f vpU = Vector3f(-vpWidth, 0, 0);
|
||||
Vector3f vpV = Vector3f(0, vpHeight, 0);
|
||||
Vector3f du = vpU / width;
|
||||
Vector3f dv = vpV / height;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue