Skip to content

Fix issues with image aspect in ray tracing code

Kenneth Moreland requested to merge kmorel/vtk-m:fix-aspect-projections into master

The ray tracer canvas defaults to a square 1024x1024 image, and in this case the projection was correct. But if the image was rectangular, there were some issues. First, the ray tracer camera was treating the field of view angle of the regular camera in the x direction when it should have been in the y direction. Second, the field of views in the x and y directions had their angles scaled by the aspect ratio. This is wrong. The distances need to be scaled.

Merge request reports

Loading