mirror of
https://github.com/godotengine/godot.git
synced 2025-04-01 00:41:35 +08:00
Merge pull request #14796 from AlmightyScientist/issue-14552
Shader Language: Fix Vertex Lighting artifacts.
This commit is contained in:
commit
b411029e31
@ -174,7 +174,7 @@ void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color, float roughness, ino
|
||||
|
||||
vec3 H = normalize(V + L);
|
||||
float dotNH = max(dot(N,H), 0.0 );
|
||||
float intensity = pow( dotNH, (1.0-roughness) * 256.0);
|
||||
float intensity = (roughness >= 1.0 ? 1.0 : pow( dotNH, (1.0-roughness) * 256.0));
|
||||
specular += light_color * intensity;
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user