KhronosGroup / DataFormat-Registry

Khronos Data Format Specification
6 stars 4 forks source link

Bit-level descriptions for section 2.3 "More complex 2-D texel addressing" #7

Open pwnall opened 1 year ago

pwnall commented 1 year ago

I think that section 2.3 would benefit from bit-level illustrations and descriptions for computing offsets from coordinates. I think this would be a good complement to the C implementations which are great.

In the first approach (linear tiles?), the bits are combined as follows (modulo lineStride), from lsb to msb.

The Morton order effectively merges (similarly to MergeSort) the bits from the x and y coordinates.

fluppeteer commented 1 year ago

That's reasonable - this is often implemented in hardware, after all. KDFS updates have stalled for a while for logistical reasons, but I'm really hoping to see a number of updates incorporated soon, and I'll try to get this in there.