mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
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.
This commit is contained in:
parent
6c9aa4c7d3
commit
dd8bab9f89
1 changed files with 6 additions and 6 deletions
|
@ -1022,12 +1022,6 @@ uniform highp mat4 world_transform;
|
|||
uniform highp uint instance_offset;
|
||||
uniform highp uint model_flags;
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
#GLOBALS
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#define LIGHT_BAKE_DISABLED 0u
|
||||
#define LIGHT_BAKE_STATIC 1u
|
||||
#define LIGHT_BAKE_DYNAMIC 2u
|
||||
|
@ -1268,6 +1262,12 @@ layout(location = 0) out vec4 frag_color;
|
|||
|
||||
#endif // !RENDER_MATERIAL
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
#GLOBALS
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
vec3 F0(float metallic, float specular, vec3 albedo) {
|
||||
float dielectric = 0.16 * specular * specular;
|
||||
// use albedo * metallic as colored specular reflectance at 0 angle for metallic materials;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue