Fixed bug in old PBR shader

This commit is contained in:
Emmanuel BENOîT 2017-10-03 09:12:09 +02:00
parent c248e66fc2
commit 32a8eb68a7

View file

@ -23,7 +23,7 @@ float PBR_GetSpecularOld( in float cosine , in float alpha )
{
float cs = cosine * cosine;
float as = alpha * alpha;
return 1. / ( cosine + sqrt( cs + as - cs * as ) );
return clamp( 1. / ( cosine + sqrt( cs + as - cs * as ) ) , 0 , 1 );
}
// Precompute some of the material's properties. This is independant of the