@@ -27,24 +27,24 @@ struct LineVertexIn {
2727 float2 lineA [[attribute(0 )]];
2828 float2 lineB [[attribute(1 )]];
2929 /*
30- lineStyleInfo is packed as a single float but contains multiple pieces of information:
30+ lineMetadata is packed as a single float but contains multiple pieces of information:
3131 - Bits 0-1 : Vertex Index (0-3) (used for rendering different parts of the quad)
3232 - Bits 2-9 : Line Style Index (0-255) (defines the appearance of the line)
3333 - Bits 10-11 : Segment Type (0 = inner, 1 = start, 2 = end, 3 = single-segment)
3434 */
35- float lineStyleInfo [[attribute(2 )]];
35+ float lineMetadata [[attribute(2 )]];
3636};
3737
3838struct LineVertexUnitSphereIn {
3939 float3 lineA [[attribute(0 )]];
4040 float3 lineB [[attribute(1 )]];
4141 /*
42- lineStyleInfo is packed as a single float but contains multiple pieces of information:
42+ lineMetadata is packed as a single float but contains multiple pieces of information:
4343 - Bits 0-1 : Vertex Index (0-3) (used for rendering different parts of the quad)
4444 - Bits 2-9 : Line Style Index (0-255) (defines the appearance of the line)
4545 - Bits 10-11 : Segment Type (0 = inner, 1 = start, 2 = end, 3 = single-segment)
4646 */
47- float lineStyleInfo [[attribute(2 )]];
47+ float lineMetadata [[attribute(2 )]];
4848};
4949
5050struct LineVertexOut {
@@ -115,7 +115,7 @@ unitSphereSimpleLineGroupVertexShader(const LineVertexUnitSphereIn vertexIn [[st
115115 constant float4 &originOffset [[buffer(5 )]],
116116 constant float4 &tileOrigin [[buffer(6 )]])
117117{
118- const uint packed = as_type<uint>(vertexIn.lineStyleInfo ); // Reinterpret float as uint
118+ const uint packed = as_type<uint>(vertexIn.lineMetadata ); // Reinterpret float as uint
119119 const uint vertexIndex = packed & 0x3 ; // Bits 0-1
120120 const uint styleIndex = (packed >> 2 ) & 0xFF ; // Bits 2-9
121121 const uint segmentType = (packed >> 10 ) & 0x3 ; // Bits 10-11
@@ -184,7 +184,7 @@ simpleLineGroupVertexShader(const LineVertexIn vertexIn [[stage_in]],
184184 constant float4 &originOffset [[buffer(5 )]],
185185 constant float4 &tileOrigin [[buffer(6 )]])
186186{
187- const uint packed = as_type<uint>(vertexIn.lineStyleInfo ); // Reinterpret float as uint
187+ const uint packed = as_type<uint>(vertexIn.lineMetadata ); // Reinterpret float as uint
188188 const uint vertexIndex = packed & 0x3 ; // Bits 0-1
189189 const uint styleIndex = (packed >> 2 ) & 0xFF ; // Bits 2-9
190190 const uint segmentType = (packed >> 10 ) & 0x3 ; // Bits 10-11
@@ -304,7 +304,7 @@ unitSphereLineGroupVertexShader(const LineVertexUnitSphereIn vertexIn [[stage_in
304304 constant float4 &tileOrigin [[buffer(6 )]])
305305{
306306
307- const uint packed = as_type<uint>(vertexIn.lineStyleInfo ); // Reinterpret float as uint
307+ const uint packed = as_type<uint>(vertexIn.lineMetadata ); // Reinterpret float as uint
308308 const uint vertexIndex = packed & 0x3 ; // Bits 0-1
309309 const uint styleIndex = (packed >> 2 ) & 0xFF ; // Bits 2-9
310310 const uint segmentType = (packed >> 10 ) & 0x3 ; // Bits 10-11
@@ -384,7 +384,7 @@ lineGroupVertexShader(const LineVertexIn vertexIn [[stage_in]],
384384 constant float4 &originOffset [[buffer(5 )]],
385385 constant float4 &tileOrigin [[buffer(6 )]])
386386{
387- const uint packed = as_type<uint>(vertexIn.lineStyleInfo ); // Reinterpret float as uint
387+ const uint packed = as_type<uint>(vertexIn.lineMetadata ); // Reinterpret float as uint
388388 const uint vertexIndex = packed & 0x3 ; // Bits 0-1
389389 const uint styleIndex = (packed >> 2 ) & 0xFF ; // Bits 2-9
390390 const uint segmentType = (packed >> 10 ) & 0x3 ; // Bits 10-11
0 commit comments