Skip to content

Commit

Permalink
[misc] some minor tweaks here and there
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Dec 10, 2024
1 parent 2ff1c47 commit 74945da
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
13 changes: 12 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@
- <img align="left" width="32" height="32" src="https://i0.wp.com/opensource.org/wp-content/uploads/2023/01/cropped-cropped-OSI_Horizontal_Logo_0-e1674081292667.png">Please adhere to the <a href="https://en.wikipedia.org/wiki/MIT_License">MIT license</a>. You're free to copy the code, provided you include the original license.

#### Status

![build_status](https://github.com/PanosK92/SpartanEngine/actions/workflows/workflow.yml/badge.svg)
[![Discord](https://img.shields.io/discord/677302405263785986?logo=discord&label=Discord&color=5865F2&logoColor=white)](https://discord.gg/TG5r2BS)

# Media

| Video: Livestream of FSR 2 integration | Video: The engine and the community |
|:-:|:-:|
|[![Image1](https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/readme_1.4.jpg)](https://www.youtube.com/watch?v=QhyMal6RY7M) | [![Image2](https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/video_promo.png)](https://www.youtube.com/watch?v=TMZ0epSVwCk)

# Worlds

<img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_forest.png"/>
<img align="left" width="450" src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_selection_4.png"/>

Expand All @@ -36,7 +39,9 @@ Upon launching the engine, you'll be greeted with a selection of default worlds
| <img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_bistro.jpg"/><br>Amazon Lumberyard Bistro | <img src="https://raw.githubusercontent.com/PanosK92/SpartanEngine/master/.github/images/world_minecraft.jpg"/><br>A good old minecraft world |

# Features

#### Rendering

- Cutting edge Vulkan renderer.
- 128-byte push constant buffer for lightning fast CPU to GPU data transfer.
- On the fly single dispatch GPU-based mip generation for render targets (FidelityFX SPD).
Expand Down Expand Up @@ -64,6 +69,7 @@ Upon launching the engine, you'll be greeted with a selection of default worlds
- Post-process effects like fxaa, bloom, motion-blur, depth of field, chromatic aberration etc.

#### General

- One-click project generation for easy setup.
- Universal input support, keyboard & mouse, controllers (tested a PS5 controller) and steering wheels.
- Comprehensive physics features.
Expand All @@ -74,17 +80,22 @@ Upon launching the engine, you'll be greeted with a selection of default worlds
- Wide file format support: 10+ for fonts, 20+ for audio, 30+ for images, and 40+ for models.

# Wiki

The [wiki](https://github.com/PanosK92/SpartanEngine/wiki/Wiki) can answer most of your questions, here are some of it's contents:
- [Compiling](https://github.com/PanosK92/SpartanEngine/wiki/Compiling)

- [Compiling](https://github.com/PanosK92/SpartanEngine/wiki/Compiling)
- [Contributing](https://github.com/PanosK92/SpartanEngine/blob/master/contributing.md)
- [Perks of a contributor](https://github.com/PanosK92/SpartanEngine/wiki/Perks-of-a-contributor)

# Interesting facts

- This engine started as a way to learn and enrich my portfolio while I was a university student, circa 2014, represeting over a decade of non-stop development.
- It's one of the most rewarding projects in terms of the perks you receive should you become a contributor, more [here](https://github.com/PanosK92/SpartanEngine/wiki/Perks-of-a-contributor).

# Use cases

Are you utilizing any components from the Spartan Engine, or has it inspired aspects of your work? If yes, then reach out to me, I'd love to showcase your project.

- Godot uses Spartan's TAA, see [here](https://github.com/godotengine/godot/blob/37d51d2cb7f6e47bef8329887e9e1740a914dc4e/servers/rendering/renderer_rd/shaders/effects/taa_resolve.glsl#L2)
- Stalker Anomaly has an addon which enchances rendering based on Spartan's source [here](https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders)
- Jesse Guerrero, a contributor, wrote a [book](https://www.amazon.com/dp/B0CXG1CMNK?ref_=cm_sw_r_cp_ud_dp_A14WVAH86VH407JE95MG_1) on beginning programming, showcasing Spartan's code, Discord community and the leadership within it.
2 changes: 0 additions & 2 deletions runtime/Core/Debugging.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ namespace Spartan
public:
static void Initialize(const bool is_amd)
{
#ifdef DEBUG
m_breadcrumbs_enabled = m_breadcrumbs_enabled ? is_amd : false;
#endif
}

static bool IsValidationLayerEnabled() { return m_validation_layer_enabled; }
Expand Down
5 changes: 2 additions & 3 deletions runtime/Core/ProgressTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#pragma once

//= INCLUDES ===================
//= INCLUDES ====
#include <atomic>
#include "../Core/Definitions.h"
//==============================
//===============

namespace Spartan
{
Expand Down
8 changes: 4 additions & 4 deletions runtime/RHI/Vulkan/Vulkan_Queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,15 @@ namespace Spartan
submit_info.pCommandBufferInfos = &cmd_buffer_info;

VkResult result = vkQueueSubmit2(static_cast<VkQueue>(RHI_Device::GetQueueRhiResource(m_type)), 1, &submit_info, nullptr);

if (result == VK_ERROR_DEVICE_LOST)
{
if (Debugging::IsBreadcrumbsEnabled())
{
RHI_FidelityFX::Breadcrumbs_OnDeviceRemoved();
}

SP_ASSERT_MSG(false, "GPU crash");
SP_ERROR_WINDOW("GPU crash");
}

SP_ASSERT_VK(result);
Expand All @@ -210,7 +211,7 @@ namespace Spartan

void RHI_Queue::Present(void* swapchain, const uint32_t image_index, vector<RHI_SyncPrimitive*>& wait_semaphores)
{
array<VkSemaphore, 3> vk_wait_semaphores = { nullptr, nullptr, nullptr };
array<VkSemaphore, 3> vk_wait_semaphores = { nullptr };

// get semaphore vulkan resources
uint32_t semaphore_count = static_cast<uint32_t>(wait_semaphores.size());
Expand All @@ -227,7 +228,6 @@ namespace Spartan
present_info.pSwapchains = reinterpret_cast<VkSwapchainKHR*>(&swapchain);
present_info.pImageIndices = &image_index;

void* queue = RHI_Device::GetQueueRhiResource(m_type);
SP_ASSERT_VK(vkQueuePresentKHR(static_cast<VkQueue>(queue), &present_info));
SP_ASSERT_VK(vkQueuePresentKHR(static_cast<VkQueue>(RHI_Device::GetQueueRhiResource(m_type)), &present_info));
}
}

0 comments on commit 74945da

Please sign in to comment.