karansher / computer-graphics-ray-casting

Computer Graphics Assignment about Ray Casting
1 stars 0 forks source link

Warped planes in bunny render. #12

Closed AustinBlackman closed 1 year ago

AustinBlackman commented 1 year ago

Hi, I seem to be having trouble with my planes in the Bunny render. bunny

In an attempt to fix this, I have tried different ways of implementing the plane intersection, however, none of them have fixed the issue. As a result, I feel that the intersection code is not to blame, is there anything else that would cause an issue like this?

AustinBlackman commented 1 year ago

Fixed the issue. For anyone with a similar problem, it was due to accidentally type casting the t value to an integer rather than double in my first_hit function, this bug was also causing my depth images to have harsh colour drops rather than a smooth gradient. Hope this helps someone in a similar spot!