Data moments should not have GLSL flat qualifiers to be sampled more than once per triangle

This commit is contained in:
Dan Paulat 2024-12-02 00:10:22 -06:00
parent 80d5be956d
commit 1b07c6f5b5
2 changed files with 5 additions and 5 deletions

View file

@ -9,14 +9,14 @@ uniform float uDataMomentScale;
uniform bool uCFPEnabled; uniform bool uCFPEnabled;
flat in uint dataMoment; in float dataMoment;
flat in uint cfpMoment; in float cfpMoment;
layout (location = 0) out vec4 fragColor; layout (location = 0) out vec4 fragColor;
void main() void main()
{ {
float texCoord = (float(dataMoment) - float(uDataMomentOffset)) / uDataMomentScale; float texCoord = (dataMoment - float(uDataMomentOffset)) / uDataMomentScale;
if (uCFPEnabled && cfpMoment > 8u) if (uCFPEnabled && cfpMoment > 8u)
{ {

View file

@ -13,8 +13,8 @@ layout (location = 2) in uint aCfpMoment;
uniform mat4 uMVPMatrix; uniform mat4 uMVPMatrix;
uniform vec2 uMapScreenCoord; uniform vec2 uMapScreenCoord;
flat out uint dataMoment; out float dataMoment;
flat out uint cfpMoment; out float cfpMoment;
vec2 latLngToScreenCoordinate(in vec2 latLng) vec2 latLngToScreenCoordinate(in vec2 latLng)
{ {