More ray tracing changes

This commit is contained in:
Dynamitos
2024-07-12 13:33:52 +02:00
parent a9089bd997
commit 8387ad6ffe
33 changed files with 527 additions and 292 deletions
+2
View File
@@ -46,6 +46,7 @@ void MeshLoader::convertAssimpARGB(unsigned char* dst, aiTexel* src, uint32 numP
}
void MeshLoader::loadTextures(const aiScene* scene, const std::filesystem::path& meshDirectory, const std::string& importPath,
Array<PTextureAsset>& textures) {
std::cout << "Loading Textures" << std::endl;
for (uint32 i = 0; i < scene->mNumTextures; ++i) {
aiTexture* tex = scene->mTextures[i];
auto texPath = std::filesystem::path(tex->mFilename.C_Str());
@@ -75,6 +76,7 @@ void MeshLoader::loadTextures(const aiScene* scene, const std::filesystem::path&
.importPath = importPath,
});
textures.add(AssetRegistry::findTexture(importPath, texPath.stem().string()));
std::cout << "Loaded " << i << "/" << scene->mNumTextures << std::endl;
}
}
+2 -2
View File
@@ -125,12 +125,12 @@ void TextureLoader::import(TextureImportArgs args, PTextureAsset textureAsset) {
.structSize = sizeof(ktxBasisParams),
.uastc = true,
.threadCount = std::thread::hardware_concurrency() - 2,
.uastcFlags = KTX_PACK_UASTC_LEVEL_FASTER,
.uastcFlags = KTX_PACK_UASTC_LEVEL_DEFAULT,
.uastcRDO = true,
};
KTX_ASSERT(ktxTexture2_CompressBasisEx(kTexture, &basisParams));
KTX_ASSERT(ktxTexture2_DeflateZstd(kTexture, 10));
KTX_ASSERT(ktxTexture2_DeflateZstd(kTexture, 15));
char writer[100];
snprintf(writer, sizeof(writer), "%s version %s", "SeeleEngine", "0.0.1");