Adjust 3dgui as well

forgot this one while cherry-picking
use clamp instead of minmax