Adjusted roughness aspect on specular reflection of sky box to more closely match Unity's PBR look especially on high roughness values

This commit is contained in:
Olivier Prat 2017-12-26 15:43:23 +01:00
parent d6b70d459f
commit 93ba9ad3b1

View file

@ -41,7 +41,7 @@ vec3 evalAmbientSpecularIrradiance(LightAmbient ambient, SurfaceData surface) {
<@if supportAmbientMap@>
{
float levels = getLightAmbientMapNumMips(ambient);
float m = 12.0 / (1.0+5.0*surface.roughness);
float m = 12.0 / (1.0+11.0*surface.roughness);
float lod = levels - m;
lod = max(lod, 0);
specularLight = evalSkyboxLight(lightDir, lod).xyz;