On Mon Sep 16 15:24:10 2024 +0000, Connor McAdams wrote:
So, this one has taken me awhile to work through, because I used to have a similar system to this (although I called it `struct d3dx_pixel`). The thing I realized after getting further into implementation is that for formats with mixed ranges (i.e `D3DFMT_X8L8V8U8`, `D3DFMT_A8P8`) the ranges are only split between the alpha channels and the color channels. It's easier to categorize this way IMO. I've added a structure for this in the most recent revision, but kept it as a single range value. Once we add support for formats with split ranges, I'll add a separate range value to the structure for the alpha channel.
Yeah, that should be fine.
Storing and passing around the range together with the value seems nicer to me overall. I assume you didn't find any fundamental problem with this approach in your earlier version of the code :sweat_smile: