diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-08-11 07:29:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 07:29:06 +0200 |
commit | ee9bc47c15629e07364a3ce3b6befc9a1fdc7a3e (patch) | |
tree | 2055e22afd6e8f58d05dc330280b9b88bf2d8f77 | |
parent | 18bd0fee5a8aa360177cbe14a16d6be69f088d8f (diff) | |
parent | a7c3e0dcd64c986e46c538a240a74386158ae7ee (diff) |
Merge pull request #51492 from clayjohn/VULKAN-blinn-phong-f0
Use f0 instead of albedo in blinn and phong
-rw-r--r-- | servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl index c4fbf3b19d..5920444f7a 100644 --- a/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl +++ b/servers/rendering/renderer_rd/shaders/scene_forward_lights_inc.glsl @@ -211,7 +211,7 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float atte float blinn = pow(cNdotH, shininess); blinn *= (shininess + 2.0) * (1.0 / (8.0 * M_PI)); - specular_light += light_color * attenuation * specular_amount * blinn * albedo * unpackUnorm4x8(orms).w; + specular_light += light_color * attenuation * specular_amount * blinn * f0 * unpackUnorm4x8(orms).w; #elif defined(SPECULAR_PHONG) @@ -221,7 +221,7 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, float atte float phong = pow(cRdotV, shininess); phong *= (shininess + 1.0) * (1.0 / (8.0 * M_PI)); - specular_light += light_color * attenuation * specular_amount * phong * albedo * unpackUnorm4x8(orms).w; + specular_light += light_color * attenuation * specular_amount * phong * f0 * unpackUnorm4x8(orms).w; #elif defined(SPECULAR_TOON) |