You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #110241 from Calinou/compatibility-shader-fix-depth-buffer
Fix shader compilation errors in Compatibility when using `depth_texture`
This commit is contained in:
@@ -1022,12 +1022,6 @@ uniform highp mat4 world_transform;
|
|||||||
uniform highp uint instance_offset;
|
uniform highp uint instance_offset;
|
||||||
uniform highp uint model_flags;
|
uniform highp uint model_flags;
|
||||||
|
|
||||||
/* clang-format off */
|
|
||||||
|
|
||||||
#GLOBALS
|
|
||||||
|
|
||||||
/* clang-format on */
|
|
||||||
|
|
||||||
#define LIGHT_BAKE_DISABLED 0u
|
#define LIGHT_BAKE_DISABLED 0u
|
||||||
#define LIGHT_BAKE_STATIC 1u
|
#define LIGHT_BAKE_STATIC 1u
|
||||||
#define LIGHT_BAKE_DYNAMIC 2u
|
#define LIGHT_BAKE_DYNAMIC 2u
|
||||||
@@ -1268,6 +1262,12 @@ layout(location = 0) out vec4 frag_color;
|
|||||||
|
|
||||||
#endif // !RENDER_MATERIAL
|
#endif // !RENDER_MATERIAL
|
||||||
|
|
||||||
|
/* clang-format off */
|
||||||
|
|
||||||
|
#GLOBALS
|
||||||
|
|
||||||
|
/* clang-format on */
|
||||||
|
|
||||||
vec3 F0(float metallic, float specular, vec3 albedo) {
|
vec3 F0(float metallic, float specular, vec3 albedo) {
|
||||||
float dielectric = 0.16 * specular * specular;
|
float dielectric = 0.16 * specular * specular;
|
||||||
// use albedo * metallic as colored specular reflectance at 0 angle for metallic materials;
|
// use albedo * metallic as colored specular reflectance at 0 angle for metallic materials;
|
||||||
|
|||||||
Reference in New Issue
Block a user