mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #14796 from AlmightyScientist/issue-14552
Shader Language: Fix Vertex Lighting artifacts.
This commit is contained in:
commit
b411029e31
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue