Trying to add fluid simulation

This commit is contained in:
Dynamitos committed 2026-04-12 20:49:02 +02:00
1 parent 056589a6f9
commit ac317a3829
65 files changed
+2708 -371

No files matched your search

-1
View File
@@ -93,7 +93,6 @@ EnvironmentLoader::EnvironmentLoader(Gfx::PGraphics graphics) : graphics(graphic
{"precomputeBRDF", "EnvironmentMapping"},
},
.rootSignature = cubePipelineLayout,
.dumpIntermediate = true,
});
cubePipelineLayout->create();
+1 -1
View File
@@ -114,7 +114,7 @@ void TextureLoader::import(TextureImportArgs args, PTextureAsset textureAsset) {
.uastcFlags = KTX_PACK_UASTC_LEVEL_DEFAULT,
.uastcRDO = true,
};
KTX_ASSERT(ktxTexture2_CompressBasisEx(kTexture, &basisParams));
// KTX_ASSERT(ktxTexture2_CompressBasis(kTexture, 0));
//KTX_ASSERT(ktxTexture2_DeflateZstd(kTexture, 10));
char writer[100];
+2 -2
View File
@@ -38,11 +38,11 @@ void InspectorView::render() { renderGraph.render(Component::Camera(), Component
void InspectorView::applyArea(URect ) {}
void InspectorView::keyCallback(KeyCode, InputAction, KeyModifier) {}
void InspectorView::keyCallback(KeyCode, InputAction, KeyModifierFlags) {}
void InspectorView::mouseMoveCallback(double, double) {}
void InspectorView::mouseButtonCallback(MouseButton, InputAction, KeyModifier) {}
void InspectorView::mouseButtonCallback(MouseButton, InputAction, KeyModifierFlags) {}
void InspectorView::scrollCallback(double, double) {}
+2 -2
View File
@@ -26,9 +26,9 @@ class InspectorView : public View {
RenderGraph renderGraph;
Component::Camera cam;
virtual void keyCallback(KeyCode code, InputAction action, KeyModifier modifier) override;
virtual void keyCallback(KeyCode code, InputAction action, KeyModifierFlags modifier) override;
virtual void mouseMoveCallback(double xPos, double yPos) override;
virtual void mouseButtonCallback(MouseButton button, InputAction action, KeyModifier modifier) override;
virtual void mouseButtonCallback(MouseButton button, InputAction action, KeyModifierFlags modifier) override;
virtual void scrollCallback(double xOffset, double yOffset) override;
virtual void fileCallback(int count, const char** paths) override;
};
+2 -1
View File
@@ -2,6 +2,7 @@
#include "Graphics/Enums.h"
#include "MinimalEngine.h"
#include "Window/Window.h"
#include <iostream>
using namespace Seele;
using namespace Seele::Editor;
@@ -21,7 +22,7 @@ void PlayView::prepareRender() { GameView::prepareRender(); }
void PlayView::render() { GameView::render(); }
void PlayView::keyCallback(KeyCode code, InputAction action, KeyModifier modifier) {
void PlayView::keyCallback(KeyCode code, InputAction action, KeyModifierFlags modifier) {
GameView::keyCallback(code, action, modifier);
if (code == KeyCode::KEY_P && action == InputAction::RELEASE) {
getGlobals().usePositionOnly = !getGlobals().usePositionOnly;
+1 -1
View File
@@ -14,7 +14,7 @@ class PlayView : public GameView {
virtual void prepareRender() override;
virtual void render() override;
virtual void keyCallback(Seele::KeyCode code, Seele::InputAction action, Seele::KeyModifier modifier) override;
virtual void keyCallback(Seele::KeyCode code, Seele::InputAction action, Seele::KeyModifierFlags modifier) override;
private:
};
+2 -2
View File
@@ -42,11 +42,11 @@ void SceneView::prepareRender() {}
void SceneView::render() { renderGraph.render(viewportCamera, Component::Transform()); }
void SceneView::keyCallback(KeyCode code, InputAction action, KeyModifier) { cameraSystem.keyCallback(code, action); }
void SceneView::keyCallback(KeyCode code, InputAction action, KeyModifierFlags) { cameraSystem.keyCallback(code, action); }
void SceneView::mouseMoveCallback(double xPos, double yPos) { cameraSystem.mouseMoveCallback(xPos, yPos); }
void SceneView::mouseButtonCallback(MouseButton button, InputAction action, KeyModifier) {
void SceneView::mouseButtonCallback(MouseButton button, InputAction action, KeyModifierFlags) {
cameraSystem.mouseButtonCallback(button, action);
}
+2 -2
View File
@@ -29,9 +29,9 @@ class SceneView : public View {
ViewportControl cameraSystem;
virtual void keyCallback(KeyCode code, InputAction action, KeyModifier modifier) override;
virtual void keyCallback(KeyCode code, InputAction action, KeyModifierFlags modifier) override;
virtual void mouseMoveCallback(double xPos, double yPos) override;
virtual void mouseButtonCallback(MouseButton button, InputAction action, KeyModifier modifier) override;
virtual void mouseButtonCallback(MouseButton button, InputAction action, KeyModifierFlags modifier) override;
virtual void scrollCallback(double xOffset, double yOffset) override;
virtual void fileCallback(int count, const char** paths) override;
};
+12 -12
View File
@@ -21,9 +21,9 @@ using namespace Seele::Editor;
static Gfx::OGraphics graphics;
int main() {
std::string gameName = "MeshShadingDemo";
std::filesystem::path outputPath = fmt::format("/Users/dynamitos/{0}Game/", gameName);
std::filesystem::path sourcePath = fmt::format("/Users/dynamitos/{0}/", gameName);
std::string gameName = "FluidSimulation";
std::filesystem::path outputPath = fmt::format("/home/dynamitos/{0}Game/", gameName);
std::filesystem::path sourcePath = fmt::format("/home/dynamitos/{0}/", gameName);
#ifdef WIN32
std::string libraryEnding = "dll";
#elif __APPLE__
@@ -31,7 +31,7 @@ int main() {
#else
std::string libraryEnding = "so";
#endif
std::filesystem::path binaryPath = sourcePath / "build/Debug" / fmt::format("{}.{}", gameName, libraryEnding);
std::filesystem::path binaryPath = sourcePath / "build" / fmt::format("{}.{}", gameName, libraryEnding);
std::filesystem::path cmakePath = outputPath / "cmake";
if (true) {
graphics = new Vulkan::Graphics();
@@ -46,9 +46,9 @@ int main() {
AssetImporter::importFont(FontImportArgs{
.filePath = "./fonts/arial.ttf",
});
// AssetImporter::importEnvironmentMap(EnvironmentImportArgs{
// .filePath = sourcePath / "import" / "textures" / "newport_loft.hdr",
// });
AssetImporter::importEnvironmentMap(EnvironmentImportArgs{
.filePath = sourcePath / "import" / "newport_loft.hdr",
});
// AssetImporter::importTexture(TextureImportArgs{
// .filePath = sourcePath / "import" / "textures" / "grass_block_side.png",
// .importPath = "",
@@ -62,12 +62,12 @@ int main() {
// .importPath = "rttest",
// });
// AssetImporter::importMesh(MeshImportArgs{
// .filePath = sourcePath / "import" / "models" / "cube.fbx",
// .importPath = "",
// });
AssetImporter::importMesh(MeshImportArgs{
.filePath = sourcePath / "import" / "models" / "cube.fbx",
.importPath = "",
});
AssetImporter::importMesh(MeshImportArgs{
.filePath = sourcePath / "import" / "models" / "rttest.gltf",
.filePath = sourcePath / "import" / "rttest.gltf",
.importPath = "rttest",
});