|
|
@ -66,6 +66,7 @@ class MatHelper{ |
|
|
|
$albedoTexture->mapping = $mapping; |
|
|
|
$scene->registerTexture($albedoTexture); |
|
|
|
$material->setBaseColor($albedoTexture); |
|
|
|
fclose($textureHandle); |
|
|
|
} |
|
|
|
if($matOriginal->matParams->metallicTexture){ |
|
|
|
$textureUrl = $matOriginal->matParams->metallicTexture; |
|
|
@ -86,6 +87,7 @@ class MatHelper{ |
|
|
|
$roughnessTexture->mapping = $mapping; |
|
|
|
$scene->registerTexture($roughnessTexture); |
|
|
|
$material->setRoughness($roughnessTexture); |
|
|
|
fclose($textureHandle); |
|
|
|
} |
|
|
|
if($matOriginal->matParams->bumpTexture){ |
|
|
|
$textureUrl = $matOriginal->matParams->bumpTexture; |
|
|
@ -104,6 +106,7 @@ class MatHelper{ |
|
|
|
$normalTexture->scale = $matOriginal->matParams->bumpLevel; |
|
|
|
$scene->registerTexture($normalTexture); |
|
|
|
$material->setBumptex($normalTexture); |
|
|
|
fclose($textureHandle); |
|
|
|
} |
|
|
|
|
|
|
|
//TODO: 更多通道贴图处理,待后续完善
|
|
|
|