Skip to content

Commit

Permalink
Merge pull request #23 from nepp95/vulkan2.0
Browse files Browse the repository at this point in the history
Switch back to Vulkan
  • Loading branch information
nepp95 authored Nov 11, 2024
2 parents f81b3c9 + fd16095 commit c3ce3c1
Show file tree
Hide file tree
Showing 218 changed files with 49,418 additions and 35,697 deletions.
16 changes: 4 additions & 12 deletions Dependencies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,35 @@ end

-- Include directories
IncludeDir = {}
IncludeDir["assimp"] = "%{wks.location}/EppoEngine/Vendor/assimp/include"
IncludeDir["bullet"] = "%{wks.location}/EppoEngine/Vendor/bullet/include"
IncludeDir["entt"] = "%{wks.location}/EppoEngine/Vendor/entt/single_include"
IncludeDir["filewatch"] = "%{wks.location}/EppoEngine/Vendor/filewatch"
IncludeDir["glad"] = "%{wks.location}/EppoEngine/Vendor/glad/include"
IncludeDir["glfw"] = "%{wks.location}/EppoEngine/Vendor/glfw/include"
IncludeDir["glm"] = "%{wks.location}/EppoEngine/Vendor/glm"
IncludeDir["googletest"] = "%{wks.location}/EppoEngine/Vendor/googletest/googletest/include"
IncludeDir["imgui"] = "%{wks.location}/EppoEngine/Vendor/imgui"
IncludeDir["mono"] = "%{wks.location}/EppoEngine/Vendor/mono/include"
IncludeDir["spdlog"] = "%{wks.location}/EppoEngine/Vendor/spdlog/include"
IncludeDir["stb"] = "%{wks.location}/EppoEngine/Vendor/stb"
IncludeDir["tinygltf"] = "%{wks.location}/EppoEngine/Vendor/tinygltf"
IncludeDir["tracy"] = "%{wks.location}/EppoEngine/Vendor/tracy/public"
IncludeDir["vma"] = "%{wks.location}/EppoEngine/Vendor/vulkan-memory-allocator"
IncludeDir["vulkan"] = "%{VulkanSdk}/Include"
IncludeDir["yaml_cpp"] = "%{wks.location}/EppoEngine/Vendor/yaml-cpp/include"

-- Static Library directories
StaticLibraryDir = {}
StaticLibraryDir["assimp"] = "%{wks.location}/EppoEngine/Vendor/assimp/lib"
StaticLibraryDir["bullet"] = "%{wks.location}/EppoEngine/Vendor/bullet/lib"
StaticLibraryDir["mono"] = "%{wks.location}/EppoEngine/Vendor/mono/lib"
StaticLibraryDir["vulkan"] = "%{VulkanSdk}/Lib"

-- Static Libraries
StaticLibrary = {}
StaticLibrary["glad"] = "glad"
StaticLibrary["imgui"] = "imgui"
StaticLibrary["yaml_cpp"] = "yaml-cpp"

if (os.target() == "windows") then
StaticLibrary["bcrypt"] = "Bcrypt.lib"
StaticLibrary["bcrypt"] = "Bcrypt.lib"
StaticLibrary["glfw"] = "glfw"
StaticLibrary["bullet_common_debug"] = "%{StaticLibraryDir.bullet}/Debug/Bullet3Common_Debug.lib"
StaticLibrary["bullet_collision_debug"] = "%{StaticLibraryDir.bullet}/Debug/BulletCollision_Debug.lib"
Expand All @@ -52,34 +50,28 @@ if (os.target() == "windows") then
StaticLibrary["bullet_linearmath_release"] = "%{StaticLibraryDir.bullet}/Release/LinearMath.lib"
StaticLibrary["mono_debug"] = "%{StaticLibraryDir.mono}/Debug/libmono-static-sgen.lib"
StaticLibrary["mono_release"] = "%{StaticLibraryDir.mono}/Release/libmono-static-sgen.lib"
StaticLibrary["assimp_debug"] = "%{StaticLibraryDir.assimp}/Debug/assimp-vc143-mtd.lib"
StaticLibrary["assimp_release"] = "%{StaticLibraryDir.assimp}/Release/assimp-vc143-mt.lib"
StaticLibrary["shaderc_debug"] = "%{StaticLibraryDir.vulkan}/shaderc_sharedd.lib"
StaticLibrary["shaderc_release"] = "%{StaticLibraryDir.vulkan}/shaderc_shared.lib"
StaticLibrary["spirv_cross_debug"] = "%{StaticLibraryDir.vulkan}/spirv-cross-cored.lib"
StaticLibrary["spirv_cross_release"] = "%{StaticLibraryDir.vulkan}/spirv-cross-core.lib"
StaticLibrary["spirv_cross_glsl_debug"] = "%{StaticLibraryDir.vulkan}/spirv-cross-glsld.lib"
StaticLibrary["spirv_cross_glsl_release"] = "%{StaticLibraryDir.vulkan}/spirv-cross-glsl.lib"
StaticLibrary["vulkan"] = "%{StaticLibraryDir.vulkan}/vulkan-1.lib"
StaticLibrary["winmm"] = "Winmm.lib"
StaticLibrary["winsock"] = "Ws2_32.lib"
StaticLibrary["winversion"] = "Version.lib"
else
StaticLibrary["glfw"] = "glfw3"
StaticLibrary["assimp"] = "assimp"
StaticLibrary["shaderc"] = "shaderc_shared"
StaticLibrary["spirv_cross"] = "spirv-cross-core"
StaticLibrary["spirv_cross_glsl"] = "spirv-cross-glsl"
StaticLibrary["spirv_tools"] = "SPIRV-Tools"
end

-- Dynamic Library directories
DynamicLibraryDir = {}
DynamicLibraryDir["assimp"] = "%{wks.location}/EppoEngine/Vendor/assimp/bin"
DynamicLibraryDir["mono"] = "%{wks.location}/EppoEngine/Vendor/mono/bin"

-- Dynamic Libraries
DynamicLibrary = {}
DynamicLibrary["assimp_debug"] = "%{DynamicLibraryDir.assimp}/Debug/assimp-vc143-mtd.dll"
DynamicLibrary["assimp_release"] = "%{DynamicLibraryDir.assimp}/Release/assimp-vc143-mt.dll"
DynamicLibrary["mono_debug"] = "%{DynamicLibraryDir.mono}/Debug/mono-2.0-sgen.dll"
DynamicLibrary["mono_release"] = "%{DynamicLibraryDir.mono}/Release/mono-2.0-sgen.dll"
8 changes: 4 additions & 4 deletions EppoEditor/Projects/Test/Assets/AssetRegistry.epporeg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- AssetHandle: 2444408785892150241
Type: Mesh
Filepath: Meshes\untitled.fbx
- AssetHandle: 2502917179482176098
Type: Scene
Filepath: Scenes\Test.epscene
Filepath: Scenes\Test.epscene
- AssetHandle: 17362452449132321929
Type: Mesh
Filepath: Meshes\Sponza.glb
Binary file added EppoEditor/Projects/Test/Assets/Meshes/Sponza.glb
Binary file not shown.
Binary file removed EppoEditor/Projects/Test/Assets/Meshes/hexagon.fbx
Binary file not shown.
Binary file removed EppoEditor/Projects/Test/Assets/Meshes/untitled.fbx
Binary file not shown.
2 changes: 1 addition & 1 deletion EppoEditor/Projects/Test/Assets/Scenes/Test.epscene
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Entities:
Rotation: [0, 0, 0]
Scale: [1, 1, 1]
MeshComponent:
MeshHandle: 2444408785892150241
MeshHandle: 17362452449132321929
Binary file removed EppoEditor/Resources/Meshes/hexagon.fbx
Binary file not shown.
Binary file removed EppoEditor/Resources/Meshes/src/hexagon.blend
Binary file not shown.
Binary file removed EppoEditor/Resources/Meshes/src/untitled.blend
Binary file not shown.
Binary file removed EppoEditor/Resources/Meshes/untitled.fbx
Binary file not shown.
44 changes: 0 additions & 44 deletions EppoEditor/Resources/Scenes/Hexagon.epscene

This file was deleted.

71 changes: 0 additions & 71 deletions EppoEditor/Resources/Scenes/Test.epscene

This file was deleted.

29 changes: 29 additions & 0 deletions EppoEditor/Resources/Shaders/base.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#define MAX_NUM_OF_LIGHTS 8

// Descriptor Set 0
layout(set = 0, binding = 0) uniform Camera
{
mat4 View;
mat4 Projection;
mat4 ViewProjection;
vec4 Position;
} uCamera;

struct Light
{
mat4 View[6];
vec4 Position;
vec4 Color;
};

layout(set = 0, binding = 1) uniform Lights
{
mat4 Projection;
Light Lights[MAX_NUM_OF_LIGHTS];
int NumLights;
} uLights;

layout(set = 0, binding = 2) uniform samplerCube uShadowMap;

// Descriptor Set 1
layout(set = 1, binding = 0) uniform sampler2D uMaterialTex[];
24 changes: 24 additions & 0 deletions EppoEditor/Resources/Shaders/composite.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#stage vert
#version 450

layout(location = 0) out vec2 oUV;

void main()
{
oUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
gl_Position = vec4(oUV * 2.0f - 1.0f, 0.0f, 1.0f);
}

#stage frag
#version 450

layout(location = 0) in vec2 iUV;

layout(binding = 0) uniform sampler2D texComposite;

layout(location = 0) out vec4 oFragColor;

void main()
{
oFragColor = texture(texComposite, iUV);
}
Loading

0 comments on commit c3ce3c1

Please sign in to comment.