summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/SoftwareGLContext.cpp
diff options
context:
space:
mode:
authorStephan Unverwerth <s.unverwerth@gmx.de>2021-05-11 19:25:17 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-13 08:34:26 +0200
commitb63b15eeb5654ba3126dfd0bfc58f7663878da51 (patch)
tree77eb98c8d91f11565de434910fd6faaae15a6e53 /Userland/Libraries/LibGL/SoftwareGLContext.cpp
parent4b55aea3070a6018b40e0cd828470d741d5387be (diff)
downloadserenity-b63b15eeb5654ba3126dfd0bfc58f7663878da51.zip
LibGL: SoftwareRasterizer: Use perspective correct interpolation
Diffstat (limited to 'Userland/Libraries/LibGL/SoftwareGLContext.cpp')
-rw-r--r--Userland/Libraries/LibGL/SoftwareGLContext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp
index 7c739c473c..2e0b051eed 100644
--- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp
+++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp
@@ -238,6 +238,7 @@ void SoftwareGLContext::gl_end()
vec.set_x(vec.x() / vec.w());
vec.set_y(vec.y() / vec.w());
vec.set_z(vec.z() / vec.w());
+ vec.set_w(1 / vec.w());
}
vertex.x = vec.x();