Bit Field Layout (lower 18 bits of the sort key from LSB):
--- 0
3 bits: Primitive Type (0: POINTS, 1: LINES, 2: LINE_LOOP, 3: LINE_STRIP, 4: TRIANGLES, 5: TRIANGLE_STRIP, 6: TRIANGLE_FAN)
10 bits: Material UID
3 bits: Render queue (larger value draws later inside the same translucency bucket)
2 bits: Translucency type (0: Opaque, 1: Translucent, 2: Blend with ZWrite, 3: Blend without ZWrite)
--- 17
Primitive sort key used for depth sorting and rendering order optimization.
See: http://realtimecollisiondetection.net/blog/?p=86
Bit Field Layout (lower 18 bits of the sort key from LSB): --- 0 3 bits: Primitive Type (0: POINTS, 1: LINES, 2: LINE_LOOP, 3: LINE_STRIP, 4: TRIANGLES, 5: TRIANGLE_STRIP, 6: TRIANGLE_FAN) 10 bits: Material UID 3 bits: Render queue (larger value draws later inside the same translucency bucket) 2 bits: Translucency type (0: Opaque, 1: Translucent, 2: Blend with ZWrite, 3: Blend without ZWrite) --- 17
Depth Field: 32 bits: Depth