浏览代码

Moved uniform variables up so that they are available within the #GLOBAL scope

Alessandro 9 月之前
父节点
当前提交
c153c5b3cf
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      drivers/gles3/shaders/scene.glsl

+ 4 - 3
drivers/gles3/shaders/scene.glsl

@@ -974,6 +974,10 @@ layout(std140) uniform MultiviewData { // ubo:8
 multiview_data;
 #endif
 
+uniform highp mat4 world_transform;
+uniform highp uint instance_offset;
+uniform highp uint model_flags;
+
 /* clang-format off */
 
 #GLOBALS
@@ -1199,10 +1203,7 @@ ivec2 multiview_uv(ivec2 uv) {
 }
 #endif
 
-uniform highp mat4 world_transform;
 uniform mediump float opaque_prepass_threshold;
-uniform highp uint model_flags;
-uniform highp uint instance_offset;
 
 #if defined(RENDER_MATERIAL)
 layout(location = 0) out vec4 albedo_output_buffer;