MOARdV / AvionicsSystems

MOARdV's Avionics Systems for Kerbal Space Program - a new generation of IVA enhancement.
Other
52 stars 26 forks source link

Filled polygon for MFD #158

Closed MOARdV closed 6 years ago

MOARdV commented 6 years ago

Similar to LINE_STRING, but a filled polygon, instead. It will not have a border (place a LINE_STRING with the same vertices to do that).

I may be able to auto-generate UVs, but I would prefer not doing so, since that doubles the computations that need to be done when updating vertex positions. Although...

auto-generated UVs would select the left-most position for u=0, and the right-most position for u=1. The v would range between the top-most and bottom-most (or the other way around - I don't remember which way v+ points). As long as auto-scaling the texture as the width or height changed was okay, this may not be horrible to implement.

On the other hand, if I need the same level of flexibility as IMAGE (variable UV offset, UV scaling, the many color configurations), it becomes very messy to manage.

MOARdV commented 6 years ago

It looks like KSP already has a mesh triangulation algorithm, so I won't have to worry about writing that code. Now to find out if it actually works...

MOARdV commented 6 years ago

Version 1.0 of the polygon implementation is now available on DropBox.