Adding more libraries
@@ -34,6 +34,8 @@ find_package(Ktx CONFIG REQUIRED)
|
||||
find_package(nlohmann_json CONFIG REQUIRED)
|
||||
find_package(fmt CONFIG REQUIRED)
|
||||
find_package(lunasvg CONFIG REQUIRED)
|
||||
find_package(metis CONFIG REQUIRED)
|
||||
find_package(meshoptimizer CONFIG REQUIRED)
|
||||
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
|
||||
|
||||
add_library(MeshShadingDemo SHARED "")
|
||||
|
||||
|
Before Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 9.8 MiB |
|
Before Width: | Height: | Size: 9.9 MiB |
|
Before Width: | Height: | Size: 9.8 MiB |
|
Before Width: | Height: | Size: 10 MiB |
|
Before Width: | Height: | Size: 11 MiB |
|
Before Width: | Height: | Size: 10 MiB |
|
After Width: | Height: | Size: 34 MiB |
|
After Width: | Height: | Size: 40 MiB |
|
After Width: | Height: | Size: 33 MiB |
|
After Width: | Height: | Size: 27 MiB |
|
After Width: | Height: | Size: 27 MiB |
|
After Width: | Height: | Size: 25 MiB |
|
Before Width: | Height: | Size: 11 MiB After Width: | Height: | Size: 11 MiB |
|
After Width: | Height: | Size: 29 MiB |
|
After Width: | Height: | Size: 26 MiB |
|
After Width: | Height: | Size: 33 MiB |
|
After Width: | Height: | Size: 41 MiB |
|
After Width: | Height: | Size: 29 MiB |
@@ -20,7 +20,7 @@ MeshShadingDemoGame::~MeshShadingDemoGame()
|
||||
void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph)
|
||||
{
|
||||
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;
|
||||
|
||||
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));
|
||||
|
||||
for (int32 y = -40; y < 40; ++y)
|
||||
/*for (int32 y = -40; y < 40; ++y)
|
||||
{
|
||||
for (int32 x = -40; x < 40; ++x)
|
||||
{
|
||||
@@ -196,10 +196,13 @@ void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph)
|
||||
.height = 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
pointLight = new PointLightActor(scene, Vector(5, 0, 0), 4, Vector(1, 1, 1), 1);
|
||||
light = new DirectionalLightActor(scene, Vector(1, 1, 1), 1, Vector(1, -0.4, 0.2));
|
||||
center = new PointLightActor(scene, Vector(0, 0, 0), 10, Vector(1, 1, 1), 10);
|
||||
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 SplineCamSystem(scene));
|
||||
}
|
||||
|
||||
@@ -24,7 +24,10 @@ private:
|
||||
OFlyCam flyCam;
|
||||
OPathFollowCam followCam;
|
||||
ODirectionalLightActor light;
|
||||
OPointLightActor pointLight;
|
||||
OPointLightActor center;
|
||||
OPointLightActor xAxis;
|
||||
OPointLightActor yAxis;
|
||||
OPointLightActor zAxis;
|
||||
};
|
||||
|
||||
extern "C" MESHSHADINGDEMO_API Game* createInstance();
|
||||
|
||||
@@ -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.deltaY / 500, transform.getRight()));
|
||||
}
|
||||
light.colorRange.w += input.scrollY * 0.1;
|
||||
light.positionWS = Vector4(transform.getPosition(), 1);
|
||||
light.attenuation += input.scrollY * 0.1;
|
||||
}
|
||||
@@ -14,6 +14,8 @@
|
||||
"vulkan-memory-allocator",
|
||||
"lunasvg",
|
||||
"harfbuzz",
|
||||
"shader-slang"
|
||||
"shader-slang",
|
||||
"metis",
|
||||
"meshoptimizer"
|
||||
]
|
||||
}
|
||||