Skip to content

Commit dd8bab9

Browse files
committed
Fix shader compilation errors in Compatibility when using depth_texture
Globals were defined too early, which means some uniforms were not available at the point they were defined in.
1 parent 6c9aa4c commit dd8bab9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/gles3/shaders/scene.glsl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,12 +1022,6 @@ uniform highp mat4 world_transform;
10221022
uniform highp uint instance_offset;
10231023
uniform highp uint model_flags;
10241024

1025-
/* clang-format off */
1026-
1027-
#GLOBALS
1028-
1029-
/* clang-format on */
1030-
10311025
#define LIGHT_BAKE_DISABLED 0u
10321026
#define LIGHT_BAKE_STATIC 1u
10331027
#define LIGHT_BAKE_DYNAMIC 2u
@@ -1268,6 +1262,12 @@ layout(location = 0) out vec4 frag_color;
12681262

12691263
#endif // !RENDER_MATERIAL
12701264

1265+
/* clang-format off */
1266+
1267+
#GLOBALS
1268+
1269+
/* clang-format on */
1270+
12711271
vec3 F0(float metallic, float specular, vec3 albedo) {
12721272
float dielectric = 0.16 * specular * specular;
12731273
// use albedo * metallic as colored specular reflectance at 0 angle for metallic materials;

0 commit comments

Comments
 (0)