Kimkulling/fix double precision tests (#5660)

* Make color single precision

* Fix the unittests for double precision

* Fix merge issues

* Fix issues with Vertex + Color4

* Fix vertex operator, some tests are still red.
This commit is contained in:
Kim Kulling
2024-07-12 14:37:49 +02:00
committed by GitHub
parent 0cb1693689
commit 35e4f1bf64
22 changed files with 291 additions and 145 deletions

View File

@@ -181,7 +181,7 @@ void STLImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
mBuffer = &buffer2[0];
// the default vertex color is light gray.
mClrColorDefault.r = mClrColorDefault.g = mClrColorDefault.b = mClrColorDefault.a = (ai_real)0.6;
mClrColorDefault.r = mClrColorDefault.g = mClrColorDefault.b = mClrColorDefault.a = 0.6f;
// allocate a single node
mScene->mRootNode = new aiNode();
@@ -209,7 +209,7 @@ void STLImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
}
pcMat->AddProperty(&clrDiffuse, 1, AI_MATKEY_COLOR_DIFFUSE);
pcMat->AddProperty(&clrDiffuse, 1, AI_MATKEY_COLOR_SPECULAR);
clrDiffuse = aiColor4D(ai_real(0.05), ai_real(0.05), ai_real(0.05), ai_real(1.0));
clrDiffuse = aiColor4D(0.05f, 0.05f, 0.05f, 1.0f);
pcMat->AddProperty(&clrDiffuse, 1, AI_MATKEY_COLOR_AMBIENT);
mScene->mNumMaterials = 1;