gpu: use noperspective for hsl interpolation

Prior to 8c00f6da88 the interpolation of fragment
shader inputs appears to not have been accounting for perspective. This broke
texturing due to the texture ids being interpolated for perspective which was
fixed in 47e0ac8032. The hsl values similarly
require not accounting for perspective, so the noperspective interpolation
qualifier has been added. It is unclear to me why the geometry shader removal
would affect the interpolation like this since it was emitting vertices with
the correct z values.
This commit is contained in:
Adam
2020-09-30 20:04:04 -04:00
parent 475e463692
commit 34c8bfb2f4
2 changed files with 2 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ uniform float smoothBanding;
uniform vec4 fogColor;
in vec4 Color;
centroid in float fHsl;
noperspective centroid in float fHsl;
flat in int textureId;
in vec2 fUv;
in float fogAmount;

View File

@@ -54,7 +54,7 @@ uniform int drawDistance;
uniform mat4 projectionMatrix;
out vec4 Color;
centroid out float fHsl;
noperspective centroid out float fHsl;
flat out int textureId;
out vec2 fUv;
out float fogAmount;