Adding more libraries

This commit is contained in:
Dynamitos
2025-05-13 12:52:14 +02:00
parent 16c56a9734
commit c3475ec41d
25 changed files with 19 additions and 10 deletions
+2
View File
@@ -34,6 +34,8 @@ find_package(Ktx CONFIG REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED) find_package(nlohmann_json CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED) find_package(fmt CONFIG REQUIRED)
find_package(lunasvg CONFIG REQUIRED) find_package(lunasvg CONFIG REQUIRED)
find_package(metis CONFIG REQUIRED)
find_package(meshoptimizer CONFIG REQUIRED)
find_package(VulkanMemoryAllocator CONFIG REQUIRED) find_package(VulkanMemoryAllocator CONFIG REQUIRED)
add_library(MeshShadingDemo SHARED "") add_library(MeshShadingDemo SHARED "")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 MiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 MiB

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 MiB

+9 -6
View File
@@ -20,7 +20,7 @@ MeshShadingDemoGame::~MeshShadingDemoGame()
void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph) void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph)
{ {
flyCam = new FlyCam(scene); flyCam = new FlyCam(scene);
flyCam->attachComponent<Component::PointLight>(Vector4(0, 0, 0, 0), Vector4(1, 1, 1, 2)); flyCam->attachComponent<Component::PointLight>(Vector(1, 1, 1), 1.0f, 2.0f);
flyCam->getCamera().mainCamera = true; flyCam->getCamera().mainCamera = true;
followCam = new PathFollowCam(scene); followCam = new PathFollowCam(scene);
@@ -184,10 +184,10 @@ void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph)
} }
test = new StaticMeshActor(scene, AssetRegistry::findMesh("sponza", "sponza")); test = new StaticMeshActor(scene, AssetRegistry::findMesh("rttest", "rttest"));
//test->getTransform().setScale(Vector(0.01, 0.01, 0.01)); //test->getTransform().setScale(Vector(0.01, 0.01, 0.01));
for (int32 y = -40; y < 40; ++y) /*for (int32 y = -40; y < 40; ++y)
{ {
for (int32 x = -40; x < 40; ++x) for (int32 x = -40; x < 40; ++x)
{ {
@@ -196,10 +196,13 @@ void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph)
.height = 0, .height = 0,
}); });
} }
} }*/
pointLight = new PointLightActor(scene, Vector(5, 0, 0), 4, Vector(1, 1, 1), 1); center = new PointLightActor(scene, Vector(0, 0, 0), 10, Vector(1, 1, 1), 10);
light = new DirectionalLightActor(scene, Vector(1, 1, 1), 1, Vector(1, -0.4, 0.2)); xAxis = new PointLightActor(scene, Vector(10, 0, 0), 10, Vector(1, 0, 0), 10);
yAxis = new PointLightActor(scene, Vector(0, 10, 0), 10, Vector(0, 1, 0), 10);
zAxis = new PointLightActor(scene, Vector(0, 0, 10), 10, Vector(0, 0, 1), 10);
light = new DirectionalLightActor(scene, Vector(1, 1, 1), 1, Vector(0.4, -0.4, 0));
graph->addSystem(new FlyCamSystem(scene)); graph->addSystem(new FlyCamSystem(scene));
graph->addSystem(new SplineCamSystem(scene)); graph->addSystem(new SplineCamSystem(scene));
} }
+4 -1
View File
@@ -24,7 +24,10 @@ private:
OFlyCam flyCam; OFlyCam flyCam;
OPathFollowCam followCam; OPathFollowCam followCam;
ODirectionalLightActor light; ODirectionalLightActor light;
OPointLightActor pointLight; OPointLightActor center;
OPointLightActor xAxis;
OPointLightActor yAxis;
OPointLightActor zAxis;
}; };
extern "C" MESHSHADINGDEMO_API Game* createInstance(); extern "C" MESHSHADINGDEMO_API Game* createInstance();
+1 -2
View File
@@ -50,6 +50,5 @@ void FlyCamSystem::update(Component::KeyboardInput& input, Component::Camera& ca
transform.setRotation(glm::rotate(transform.getRotation(), input.deltaX / 500, Vector(0, 1, 0))); transform.setRotation(glm::rotate(transform.getRotation(), input.deltaX / 500, Vector(0, 1, 0)));
transform.setRotation(glm::rotate(transform.getRotation(), input.deltaY / 500, transform.getRight())); transform.setRotation(glm::rotate(transform.getRotation(), input.deltaY / 500, transform.getRight()));
} }
light.colorRange.w += input.scrollY * 0.1; light.attenuation += input.scrollY * 0.1;
light.positionWS = Vector4(transform.getPosition(), 1);
} }
+3 -1
View File
@@ -14,6 +14,8 @@
"vulkan-memory-allocator", "vulkan-memory-allocator",
"lunasvg", "lunasvg",
"harfbuzz", "harfbuzz",
"shader-slang" "shader-slang",
"metis",
"meshoptimizer"
] ]
} }