Browse Source

渲染测式 开发

master
yuanjiajia 1 year ago
parent
commit
04b0446e63
  1. 8
      src/utils/MatHelper.php

8
src/utils/MatHelper.php

@ -37,7 +37,7 @@ class MatHelper{
$material->setFilmior($matOriginal->matParams->filmIor);
}
if($matOriginal->matParams->isSheenEnabled === self::OPEN){
$material->setSheen(($matOriginal->matParams->sheen)*(100/3));
$material->setSheen(($matOriginal->matParams->sheen) * 20);
$material->setSheentint($matOriginal->matParams->tintIntensity);
}
if($matOriginal->matParams->isAnisotropyEnabled === self::OPEN){
@ -258,9 +258,9 @@ class MatHelper{
static function hex2floatColor($hexColor){
$floatColor = '';
$hexColor = trim($hexColor);
$r = (hexdec(substr($hexColor, 1, 2))/256) ** 2.2;
$g = (hexdec(substr($hexColor, 3, 2))/256) ** 2.2;
$b = (hexdec(substr($hexColor, 5, 2))/256) ** 2.2;
$r = (hexdec(substr($hexColor, 1, 2))/255) ** 2.2;
$g = (hexdec(substr($hexColor, 3, 2))/255) ** 2.2;
$b = (hexdec(substr($hexColor, 5, 2))/255) ** 2.2;
$floatColor = "$r $g $b";
return $floatColor;
}

Loading…
Cancel
Save