Skip to content

Commit

Permalink
Merge pull request #16478 from unknownbrackets/softgpu-line-z
Browse files Browse the repository at this point in the history
softgpu: Interpolate Z for 3D lines
  • Loading branch information
hrydgard authored Dec 1, 2022
2 parents 4866518 + a1f6a40 commit 7f65ba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GPU/Software/Rasterizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ void ClearRectangle(const VertexData &v0, const VertexData &v1, const BinCoords
void DrawLine(const VertexData &v0, const VertexData &v1, const BinCoords &range, const RasterizerState &state) {
// TODO: Use a proper line drawing algorithm that handles fractional endpoints correctly.
Vec3<int> a(v0.screenpos.x, v0.screenpos.y, v0.screenpos.z);
Vec3<int> b(v1.screenpos.x, v1.screenpos.y, v0.screenpos.z);
Vec3<int> b(v1.screenpos.x, v1.screenpos.y, v1.screenpos.z);

int dx = b.x - a.x;
int dy = b.y - a.y;
Expand Down

0 comments on commit 7f65ba1

Please sign in to comment.