Browse Source

渲染测式 开发

master
yuanjiajia 1 year ago
parent
commit
dfc2330bb9
  1. 12
      src/utils/MatHelper.php

12
src/utils/MatHelper.php

@ -308,14 +308,14 @@ class MatHelper{
*/ */
static function createMatOfTranslucent($matOriginal, $textureScaleU, $textureScaleV, $cacheFileDir, $scene){ static function createMatOfTranslucent($matOriginal, $textureScaleU, $textureScaleV, $cacheFileDir, $scene){
$material = new GlossyTranslucent(); $material = new GlossyTranslucent();
$material->setTransmission(
self::hex2floatColor($matOriginal->matParams->translucencyColor),
$material->setTransmission( self::hex2floatColor(
$matOriginal->matParams->translucencyColor,
$matOriginal->matParams->translucencyIntensity $matOriginal->matParams->translucencyIntensity
);
$material->setBaseColor(
self::hex2floatColor($matOriginal->matParams->translucencyColor),
));
$material->setBaseColor( self::hex2floatColor(
$matOriginal->matParams->translucencyColor,
1 - $matOriginal->matParams->translucencyIntensity 1 - $matOriginal->matParams->translucencyIntensity
);
));
$material->setUroughness($matOriginal->matParams->roughness); $material->setUroughness($matOriginal->matParams->roughness);
$material->setVroughness($matOriginal->matParams->roughness); $material->setVroughness($matOriginal->matParams->roughness);

Loading…
Cancel
Save