Fixed bug in old PBR shader
This commit is contained in:
parent
c248e66fc2
commit
32a8eb68a7
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ float PBR_GetSpecularOld( in float cosine , in float alpha )
|
||||||
{
|
{
|
||||||
float cs = cosine * cosine;
|
float cs = cosine * cosine;
|
||||||
float as = alpha * alpha;
|
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
|
// Precompute some of the material's properties. This is independant of the
|
||||||
|
|
Loading…
Reference in a new issue