Skip to content

Commit 7811207

Browse files
fix decal shader compile error (#6829)
On macOS the new decal shaders (#6813) fail to compile with the following message: "interpolation qualifier 'flat' must precede storage qualifiers".
1 parent dd72784 commit 7811207

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

code/def_files/data/effects/decal-f.sdr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ out vec4 fragOut0; // Diffuse buffer
1010
out vec4 fragOut1; // Normal buffer
1111
out vec4 fragOut2; // Emissive buffer
1212

13-
in flat mat4 invModelMatrix;
14-
in flat vec3 decalDirection;
15-
in flat float normal_angle_cutoff;
16-
in flat float angle_fade_start;
17-
in flat float alpha_scale;
13+
flat in mat4 invModelMatrix;
14+
flat in vec3 decalDirection;
15+
flat in float normal_angle_cutoff;
16+
flat in float angle_fade_start;
17+
flat in float alpha_scale;
1818

1919
uniform sampler2D gDepthBuffer;
2020
uniform sampler2D gNormalBuffer;

code/def_files/data/effects/decal-v.sdr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
in vec4 vertPosition;
33
in mat4 vertModelMatrix;
44

5-
out flat mat4 invModelMatrix;
6-
out flat vec3 decalDirection;
7-
out flat float normal_angle_cutoff;
8-
out flat float angle_fade_start;
9-
out flat float alpha_scale;
5+
flat out mat4 invModelMatrix;
6+
flat out vec3 decalDirection;
7+
flat out float normal_angle_cutoff;
8+
flat out float angle_fade_start;
9+
flat out float alpha_scale;
1010

1111
layout (std140) uniform decalGlobalData {
1212
mat4 viewMatrix;

0 commit comments

Comments
 (0)