CubeEngine is a rendering engine written in C++, developed as a personal hobby project and for portfolio purposes. This engine utilizes an integrated renderer based on both OpenGL, Vulkan and DirectX 12. The primary objective of this project is to implement features learned from college courses, particularly those focused on OpenGL graphics. Furthermore, the project aims to adapt and apply these OpenGL-based techniques to Vulkan, DirectX 12, thereby gaining proficiency in three graphics APIs.
- Latest Graphics Driver
- GPU with Vulkan version 1.4.304.0 or above supported
- Discrete GPU recommended
- Download Vulkan SDK Minimum Version 1.4.304.0
Currently it only supports MSVC compiler(Visual Studio 2022 Recommended).
- Open CMD at a root directory.
- Input "mkdir build" -> "cd build" -> "cmake .."
- Set "Project" project as a startup project
All required APIs and Libraries are integrated in Project.
To compile Slang Shading Language, slangc is required. slangc is able to download from the following link or included in the Vulkan SDK since version 1.3.296.0.
Shaders are located in Engine/shaders.
- From .slang to .glsl
GLSL
slangc Skybox.slang -profile glsl_460 -entry vertexMain -stage vertex -target glsl -o Skybox.vert
slangc Skybox.slang -profile glsl_460 -entry fragmentMain -stage fragment -target glsl -o Skybox.frag
- From .slang to .spv
SPIR-V
slangc Skybox.slang -profile glsl_460 -entry vertexMain -stage vertex -target spirv -o Skybox.vert.spv
slangc Skybox.slang -profile glsl_460 -entry fragmentMain -stage fragment -target spirv -o Skybox.frag.spv
- From .slang to .hlsl
HLSL (Add -D__hlsl__ when converting to HLSL)
slangc Skybox.slang -profile sm_5_1 -entry vertexMain -stage vertex -target hlsl -o Skybox.vert.hlsl -D__hlsl__
slangc Skybox.slang -profile sm_5_1 -entry fragmentMain -stage fragment -target hlsl -o Skybox.frag.hlsl -D__hlsl__
- Legend: ✅: Implemented / ❌: Not Supported / ➖: Not Applicable
Feature | Engine Core (CPU) | OpenGL | Vulkan | DirectX 12 |
---|---|---|---|---|
Core Engine | ||||
CPU Dump Writer | ✅ | ➖ | ➖ | ➖ |
CRT Memory Leak Detector | ✅ | ➖ | ➖ | ➖ |
Sound Manager | ✅ | ➖ | ➖ | ➖ |
Rendering Features | ||||
2D (Sprite Based Animation) Rendering | ➖ | ✅ | ✅ | ✅ |
3D Mesh Rendering | ➖ | ✅ | ✅ | ✅ |
PBR (Physically Based Rendering) | ➖ | ✅ | ✅ | ✅ |
IBL (Image Based Lighting) | ➖ | ✅ | ✅ | ✅ |
Skybox | ➖ | ✅ | ✅ | ✅ |
Normal Vector Visualization | ➖ | ✅ | ✅ | ✅ |
Assimp Model Loading | ✅ | ➖ | ➖ | ➖ |
Graphics Backend Features | ||||
Slang Shading Language | ➖ | ❌ | ✅ | ✅ |
ImGui | ➖ | ✅ | ✅ | ✅ |
NVIDIA Nsight Aftermath | ➖ | ❌ | ❌ | ✅ |
Compute Shader | ➖ | ❌ | ❌ | ✅ |
Optimization Techniques | ||||
MSAA | ➖ | ✅ | ✅ | ✅ |
Vertex Position Quantization (2D: vec2 -> uint (16 bit, 16 bit), 3D: vec3 -> uint (11 bit, 11 bit, 10 bit)) | ✅ | ➖ | ➖ | ➖ |
AMD FidelityFX™ Contrast Adaptive Sharpening | ➖ | ❌ | ❌ | ✅ |
AMD FidelityFX™ Super Resolution 1 | ➖ | ❌ | ❌ | ✅ |
- CPU Profiler, Memory Debugger
- Deferred Shading
- SSAO
- Normal / Parallax Mapping
- C++ Code Optimization
Licensed under the MIT License.
Music by DavidKBD under the CC BY 4.0 License.
Music by Abstraction under the CC0 1.0 Universal License.
Asset by Pupkin
Sound Effect by 効果音ラボ