indus / kubi

a fast and flexible cubemap generator
MIT License
53 stars 15 forks source link

Fix 1-pixel wide black line in generated +Y cube face image #4

Open emzo opened 2 years ago

emzo commented 2 years ago

Fixes https://github.com/indus/kubi/issues/3

There are multiple ways to acheive this in numpy, but this seems to be the most performant. Having said that, I'm no expert with numpy!

emzo commented 2 years ago

The view variable is just a another view of the ls NumPy array - changes made to view are reflected in ls since they share the same data. It's just easier to add a constant value to each element in the array when you have an array of shape (1,10) rather than (,10) like ls has.