Some minor texture changes

This commit is contained in:
Dynamitos
2025-03-30 22:17:29 +02:00
parent 9cce5977c5
commit 7a3aa482c7
4 changed files with 38 additions and 23 deletions
+4 -3
View File
@@ -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");
+21 -17
View File
@@ -112,11 +112,11 @@ 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,9 +125,13 @@ int main() {
.importPath = "", .importPath = "",
}); });
//AssetImporter::importMesh(MeshImportArgs{ //AssetImporter::importMesh(MeshImportArgs{
// .filePath = sourcePath / "import/models/town_hall.glb", // .filePath = sourcePath / "import/models/main1_sponza/sponza.gltf",
// .importPath = "", // .importPath = "sponza",
//}); //});
// AssetImporter::importMesh(MeshImportArgs{
// .filePath = sourcePath / "import/models/town_hall.glb",
// .importPath = "",
// });
getThreadPool().waitIdle(); getThreadPool().waitIdle();
vd->commitMeshes(); vd->commitMeshes();
WindowCreateInfo mainWindowInfo = { WindowCreateInfo mainWindowInfo = {
@@ -146,16 +150,16 @@ int main() {
}; };
OGameView sceneView = new Editor::PlayView(graphics, window, sceneViewInfo, binaryPath.generic_string()); OGameView sceneView = new Editor::PlayView(graphics, window, sceneViewInfo, binaryPath.generic_string());
sceneView->setFocused(); sceneView->setFocused();
//OInspectorView inspectorView = new Editor::InspectorView(graphics, window, // OInspectorView inspectorView = new Editor::InspectorView(graphics, window,
// ViewportCreateInfo{ // ViewportCreateInfo{
// .dimensions = // .dimensions =
// { // {
// .size = {1920, 1080}, // .size = {1920, 1080},
// .offset = {0, 0}, // .offset = {0, 0},
// }, // },
// .fieldOfView = 0, // .fieldOfView = 0,
// .numSamples = Gfx::SE_SAMPLE_COUNT_1_BIT, // .numSamples = Gfx::SE_SAMPLE_COUNT_1_BIT,
// }); // });
// //
window->show(); window->show();
while (windowManager->isActive() && getGlobals().running) { while (windowManager->isActive() && getGlobals().running) {
+1 -2
View File
@@ -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{