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 = {
.structSize = sizeof(ktxBasisParams),
.uastc = true,
.threadCount = 1,
.threadCount = 14,
.compressionLevel = 3,
.uastcFlags = KTX_PACK_UASTC_LEVEL_FASTEST,
.uastcRDO = true,
};
// KTX_ASSERT(ktxTexture2_CompressBasisEx(kTexture, &basisParams));
// KTX_ASSERT(ktxTexture2_DeflateZstd(kTexture, 20));
KTX_ASSERT(ktxTexture2_CompressBasisEx(kTexture, &basisParams));
KTX_ASSERT(ktxTexture2_DeflateZstd(kTexture, 20));
char writer[100];
snprintf(writer, sizeof(writer), "%s version %s", "SeeleEngine", "0.0.1");
+21 -17
View File
@@ -112,11 +112,11 @@ int main() {
// AssetImporter::importTexture(TextureImportArgs{
// .filePath = sourcePath / "import/textures/wgen.png",
//});
AssetImporter::importMesh(MeshImportArgs{
.filePath = sourcePath / "import/models/after-the-rain-vr-sound/source/Whitechapel.glb",
.importPath = "Whitechapel",
});
//AssetImporter::importMesh(MeshImportArgs{
// AssetImporter::importMesh(MeshImportArgs{
// .filePath = sourcePath / "import/models/after-the-rain-vr-sound/source/Whitechapel.glb",
// .importPath = "Whitechapel",
//});
// AssetImporter::importMesh(MeshImportArgs{
// .filePath = sourcePath / "import/models/box.glb",
// .importPath = "",
//});
@@ -125,9 +125,13 @@ int main() {
.importPath = "",
});
//AssetImporter::importMesh(MeshImportArgs{
// .filePath = sourcePath / "import/models/town_hall.glb",
// .importPath = "",
// .filePath = sourcePath / "import/models/main1_sponza/sponza.gltf",
// .importPath = "sponza",
//});
// AssetImporter::importMesh(MeshImportArgs{
// .filePath = sourcePath / "import/models/town_hall.glb",
// .importPath = "",
// });
getThreadPool().waitIdle();
vd->commitMeshes();
WindowCreateInfo mainWindowInfo = {
@@ -146,16 +150,16 @@ int main() {
};
OGameView sceneView = new Editor::PlayView(graphics, window, sceneViewInfo, binaryPath.generic_string());
sceneView->setFocused();
//OInspectorView inspectorView = new Editor::InspectorView(graphics, window,
// ViewportCreateInfo{
// .dimensions =
// {
// .size = {1920, 1080},
// .offset = {0, 0},
// },
// .fieldOfView = 0,
// .numSamples = Gfx::SE_SAMPLE_COUNT_1_BIT,
// });
// OInspectorView inspectorView = new Editor::InspectorView(graphics, window,
// ViewportCreateInfo{
// .dimensions =
// {
// .size = {1920, 1080},
// .offset = {0, 0},
// },
// .fieldOfView = 0,
// .numSamples = Gfx::SE_SAMPLE_COUNT_1_BIT,
// });
//
window->show();
while (windowManager->isActive() && getGlobals().running) {
+1 -2
View File
@@ -32,8 +32,7 @@ void TextureAsset::load(ArchiveBuffer& buffer) {
KTX_ASSERT(
ktxTexture_CreateFromMemory(ktxData.data(), ktxData.size(), KTX_TEXTURE_CREATE_LOAD_IMAGE_DATA_BIT, (ktxTexture**)&ktxHandle));
ktxTexture2_TranscodeBasis(ktxHandle, KTX_TTF_RGBA32, 0);
// ktxTexture2_DeflateZstd(ktxHandle, 0);
ktxTexture2_TranscodeBasis(ktxHandle, KTX_TTF_BC7_RGBA, 0);
Gfx::PGraphics graphics = buffer.getGraphics();
TextureCreateInfo createInfo = {
@@ -131,7 +131,18 @@ void RayTracingPass::render() {
}
}
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,
});
tlas = graphics->createTopLevelAccelerationStructure(Gfx::TopLevelASCreateInfo{