Added 0-1 clamping to setgray
This commit is contained in:
parent
f4686b3e0f
commit
c5095c6e1b
|
@ -215,7 +215,10 @@ inline static Color4 GrayShade(float f)
|
|||
|
||||
inline void SetGrayShade(float f)
|
||||
{
|
||||
Import(Color4<float>(f,f,f,1));
|
||||
if(f<0) f=0.0f;
|
||||
else if(f>1) f=1.0f;
|
||||
|
||||
Import(Color4<float>(f,f,f,1));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue