Browse Source

createMatOfDisney 修复解析材质参数错误

master
yuanjiajia 1 year ago
parent
commit
491083aab2
  1. 3
      src/utils/MatHelper.php

3
src/utils/MatHelper.php

@ -84,6 +84,7 @@ class MatHelper{
$metalnessTexture = new ImageMap(
['file' => $metalnessTextureSavaPath]
);
$metalnessTexture->gamma = 1;
$metalnessTexture->mapping = $mapping;
$scene->registerTexture($metalnessTexture);
$material->setMetallic($metalnessTexture);
@ -95,6 +96,7 @@ class MatHelper{
$roughnessTexture = new ImageMap(
['file' => $roughnessTextureSavaPath]
);
$roughnessTexture->gamma = 1;
$roughnessTexture->mapping = $mapping;
$scene->registerTexture($roughnessTexture);
$material->setRoughness($roughnessTexture);
@ -108,6 +110,7 @@ class MatHelper{
$bumpTexture = new ImageMap(
['file' => $textureSavaPath]
);
$bumpTexture->gamma = 1;
$bumpTexture->mapping = $mapping;
$scene->registerTexture($bumpTexture);

Loading…
Cancel
Save