mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Fix Specular Blinn in vulkan
This commit is contained in:
parent
6310354cde
commit
e530f49be2
@ -552,9 +552,9 @@ LIGHT_SHADER_CODE
|
||||
|
||||
//normalized blinn
|
||||
float shininess = exp2(15.0 * (1.0 - roughness) + 1.0) * 0.25;
|
||||
float blinn = pow(cNdotH, shininess);
|
||||
float blinn = pow(cNdotH, shininess) * cNdotL;
|
||||
blinn *= (shininess + 8.0) * (1.0 / (8.0 * M_PI));
|
||||
float intensity = (blinn) / max(4.0 * cNdotV * cNdotL, 0.75);
|
||||
float intensity = blinn;
|
||||
|
||||
specular_light += light_color * intensity * specular_blob_intensity * attenuation;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user