ultraviolet icon indicating copy to clipboard operation
ultraviolet copied to clipboard

Fix perspective matrices

Open swooster opened this issue 4 years ago • 2 comments

(this is a followup to pull-request 89)

Here are some fixes to rh_ydown perspective matrices...

In order to make troubleshooting the unit tests easier, I had to improve eq_eps() diagnostics for narrow vectors. I've made changes to all vecs, despite only needing Vec3::eq_eps() to have clearer diagnostics; please let me know if there's another way I should handle that.

Also, to avoid wasted effort, this is currently limited to vulkan rh_ydown until I know what testing method is ok.

swooster avatar Mar 19 '21 02:03 swooster

Hey! So, I think we should rework EqualsEps a bit more and put the debug printing into an assert_eq_eps! macro instead of within the implementation of eq_eps itself. For inspiration/what I mean, see how I did it in colstodian recently:

https://github.com/termhn/colstodian/blob/main/src/lib.rs#L385-L471

Can also do a similar macro for eq_vk_corners/etc. if necessary

Other than that, this looks good.

fu5ha avatar May 21 '21 06:05 fu5ha

Ok, I've tried to rework everything in terms of a colstodian-ish assert_eq_eps!() macro... For the perspective matrix stuff, I wasn't sure of the advantage of a macro so I just kept them as functions (though I slightly tweaked the names and implementation).

swooster avatar May 23 '21 23:05 swooster