mirror of https://github.com/bjornbytes/lovr.git
Clamp roughness to .05;
This commit is contained in:
parent
13f40a05c3
commit
f894c87723
|
@ -239,6 +239,7 @@ void initSurface(out Surface surface) {
|
|||
|
||||
float roughness = Material.roughness;
|
||||
if (useRoughnessTexture) roughness *= getPixel(RoughnessTexture, UV).g;
|
||||
roughness = max(roughness, .05);
|
||||
surface.roughness2 = roughness * roughness;
|
||||
|
||||
surface.occlusion = 1.;
|
||||
|
|
Loading…
Reference in New Issue