Some minor texture changes
This commit is contained in:
@@ -111,12 +111,13 @@ void TextureLoader::import(TextureImportArgs args, PTextureAsset textureAsset) {
|
|||||||
ktxBasisParams basisParams = {
|
ktxBasisParams basisParams = {
|
||||||
.structSize = sizeof(ktxBasisParams),
|
.structSize = sizeof(ktxBasisParams),
|
||||||
.uastc = true,
|
.uastc = true,
|
||||||
.threadCount = 1,
|
.threadCount = 14,
|
||||||
|
.compressionLevel = 3,
|
||||||
.uastcFlags = KTX_PACK_UASTC_LEVEL_FASTEST,
|
.uastcFlags = KTX_PACK_UASTC_LEVEL_FASTEST,
|
||||||
.uastcRDO = true,
|
.uastcRDO = true,
|
||||||
};
|
};
|
||||||
// KTX_ASSERT(ktxTexture2_CompressBasisEx(kTexture, &basisParams));
|
KTX_ASSERT(ktxTexture2_CompressBasisEx(kTexture, &basisParams));
|
||||||
// KTX_ASSERT(ktxTexture2_DeflateZstd(kTexture, 20));
|
KTX_ASSERT(ktxTexture2_DeflateZstd(kTexture, 20));
|
||||||
|
|
||||||
char writer[100];
|
char writer[100];
|
||||||
snprintf(writer, sizeof(writer), "%s version %s", "SeeleEngine", "0.0.1");
|
snprintf(writer, sizeof(writer), "%s version %s", "SeeleEngine", "0.0.1");
|
||||||
|
|||||||
+8
-4
@@ -112,10 +112,10 @@ int main() {
|
|||||||
// AssetImporter::importTexture(TextureImportArgs{
|
// AssetImporter::importTexture(TextureImportArgs{
|
||||||
// .filePath = sourcePath / "import/textures/wgen.png",
|
// .filePath = sourcePath / "import/textures/wgen.png",
|
||||||
//});
|
//});
|
||||||
AssetImporter::importMesh(MeshImportArgs{
|
// AssetImporter::importMesh(MeshImportArgs{
|
||||||
.filePath = sourcePath / "import/models/after-the-rain-vr-sound/source/Whitechapel.glb",
|
// .filePath = sourcePath / "import/models/after-the-rain-vr-sound/source/Whitechapel.glb",
|
||||||
.importPath = "Whitechapel",
|
// .importPath = "Whitechapel",
|
||||||
});
|
//});
|
||||||
// AssetImporter::importMesh(MeshImportArgs{
|
// AssetImporter::importMesh(MeshImportArgs{
|
||||||
// .filePath = sourcePath / "import/models/box.glb",
|
// .filePath = sourcePath / "import/models/box.glb",
|
||||||
// .importPath = "",
|
// .importPath = "",
|
||||||
@@ -125,6 +125,10 @@ int main() {
|
|||||||
.importPath = "",
|
.importPath = "",
|
||||||
});
|
});
|
||||||
//AssetImporter::importMesh(MeshImportArgs{
|
//AssetImporter::importMesh(MeshImportArgs{
|
||||||
|
// .filePath = sourcePath / "import/models/main1_sponza/sponza.gltf",
|
||||||
|
// .importPath = "sponza",
|
||||||
|
//});
|
||||||
|
// AssetImporter::importMesh(MeshImportArgs{
|
||||||
// .filePath = sourcePath / "import/models/town_hall.glb",
|
// .filePath = sourcePath / "import/models/town_hall.glb",
|
||||||
// .importPath = "",
|
// .importPath = "",
|
||||||
// });
|
// });
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ void TextureAsset::load(ArchiveBuffer& buffer) {
|
|||||||
KTX_ASSERT(
|
KTX_ASSERT(
|
||||||
ktxTexture_CreateFromMemory(ktxData.data(), ktxData.size(), KTX_TEXTURE_CREATE_LOAD_IMAGE_DATA_BIT, (ktxTexture**)&ktxHandle));
|
ktxTexture_CreateFromMemory(ktxData.data(), ktxData.size(), KTX_TEXTURE_CREATE_LOAD_IMAGE_DATA_BIT, (ktxTexture**)&ktxHandle));
|
||||||
|
|
||||||
ktxTexture2_TranscodeBasis(ktxHandle, KTX_TTF_RGBA32, 0);
|
ktxTexture2_TranscodeBasis(ktxHandle, KTX_TTF_BC7_RGBA, 0);
|
||||||
// ktxTexture2_DeflateZstd(ktxHandle, 0);
|
|
||||||
|
|
||||||
Gfx::PGraphics graphics = buffer.getGraphics();
|
Gfx::PGraphics graphics = buffer.getGraphics();
|
||||||
TextureCreateInfo createInfo = {
|
TextureCreateInfo createInfo = {
|
||||||
|
|||||||
@@ -131,7 +131,18 @@ void RayTracingPass::render() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pipeline = graphics->createRayTracingPipeline(Gfx::RayTracingPipelineCreateInfo{
|
pipeline = graphics->createRayTracingPipeline(Gfx::RayTracingPipelineCreateInfo{
|
||||||
.pipelineLayout = pipelineLayout, .rayGenGroup = {.shader = rayGen}, .hitGroups = callableGroups, .missGroups = {{.shader = miss}},
|
.pipelineLayout = pipelineLayout,
|
||||||
|
.rayGenGroup =
|
||||||
|
{
|
||||||
|
.shader = rayGen,
|
||||||
|
},
|
||||||
|
.hitGroups = callableGroups,
|
||||||
|
.missGroups =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
.shader = miss,
|
||||||
|
},
|
||||||
|
},
|
||||||
//.callableGroups = callableGroups,
|
//.callableGroups = callableGroups,
|
||||||
});
|
});
|
||||||
tlas = graphics->createTopLevelAccelerationStructure(Gfx::TopLevelASCreateInfo{
|
tlas = graphics->createTopLevelAccelerationStructure(Gfx::TopLevelASCreateInfo{
|
||||||
|
|||||||
Reference in New Issue
Block a user