Skip to content

Commit 72efcde

Browse files
authored
fix(skeleton): read/expose the correct custom attribute associated with each vertex (#822)
Previously, the shader read the attribute for the opposing vertex of each line segment.
1 parent cf8d25b commit 72efcde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/skeleton/frontend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ highp vec3 vertexA = readAttribute0(aVertexIndex.x);
172172
highp vec3 vertexB = readAttribute0(aVertexIndex.y);
173173
emitLine(uProjection, vertexA, vertexB, uLineWidth);
174174
highp uint lineEndpointIndex = getLineEndpointIndex();
175-
highp uint vertexIndex = aVertexIndex.x * lineEndpointIndex + aVertexIndex.y * (1u - lineEndpointIndex);
175+
highp uint vertexIndex = aVertexIndex.x * (1u - lineEndpointIndex) + aVertexIndex.y * lineEndpointIndex;
176176
`;
177177

178178
builder.addFragmentCode(`

0 commit comments

Comments
 (0)