gpu: use noperspective for hsl interpolation
Prior to8c00f6da88the 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 in47e0ac8032. 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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user