Fix various issues

This commit is contained in:
Wojtek Figat
2025-08-02 08:31:24 +02:00
parent 5c5341e346
commit b26d6ea108
5 changed files with 14 additions and 8 deletions

View File

@@ -8,6 +8,7 @@
#include "Engine/Engine/Time.h"
#include "Engine/Level/Scene/Scene.h"
#include "Engine/Profiler/ProfilerCPU.h"
#include "Engine/Profiler/ProfilerMemory.h"
#include "AudioBackend.h"
#include "Audio.h"

View File

@@ -10,7 +10,9 @@
#include "Engine/Engine/EngineService.h"
#include "Engine/Profiler/ProfilerGPU.h"
#include "Engine/Profiler/ProfilerMemory.h"
#if !USE_EDITOR
#include "Engine/Render2D/Font.h"
#endif
bool Graphics::UseVSync = false;
Quality Graphics::AAQuality = Quality::Medium;
@@ -40,12 +42,6 @@ extern GPUDevice* CreateGPUDeviceDX11();
#if GRAPHICS_API_DIRECTX12
extern GPUDevice* CreateGPUDeviceDX12();
#endif
#if GRAPHICS_API_PS4
extern GPUDevice* CreateGPUDevicePS4();
#endif
#if GRAPHICS_API_PS5
extern GPUDevice* CreateGPUDevicePS5();
#endif
class GraphicsService : public EngineService
{
@@ -166,10 +162,12 @@ bool GraphicsService::Init()
device = CreateGPUDeviceVulkan();
#endif
#if GRAPHICS_API_PS4
extern GPUDevice* CreateGPUDevicePS4();
if (!device)
device = CreateGPUDevicePS4();
#endif
#if GRAPHICS_API_PS5
extern GPUDevice* CreateGPUDevicePS5();
if (!device)
device = CreateGPUDevicePS5();
#endif

View File

@@ -295,7 +295,11 @@ void ApplePlatform::Sleep(int32 milliseconds)
void ApplePlatform::Yield()
{
pthread_yield();
#if PLATFORM_ARCH_ARM64
__builtin_arm_yield();
#else
_mm_pause();
#endif
}
double ApplePlatform::GetTimeSeconds()

View File

@@ -380,6 +380,7 @@ void PostProcessingPass::Render(RenderContext& renderContext, GPUTexture* input,
if (useBloom)
{
PROFILE_GPU("Bloom");
context->SetRenderTarget(bloomBuffer1->View(0, 0));
context->SetViewportAndScissors((float)w2, (float)h2);
context->BindSR(0, input->View());
@@ -440,6 +441,8 @@ void PostProcessingPass::Render(RenderContext& renderContext, GPUTexture* input,
// Check if use lens flares
if (useLensFlares)
{
PROFILE_GPU("Lens Flares");
// Prepare lens flares helper textures
context->BindSR(5, GetCustomOrDefault(settings.LensFlares.LensStar, _defaultLensStar, TEXT("Engine/Textures/DefaultLensStarburst")));
context->BindSR(6, GetCustomOrDefault(settings.LensFlares.LensColor, _defaultLensColor, TEXT("Engine/Textures/DefaultLensColor")));

View File

@@ -152,7 +152,7 @@ bool VolumetricFogPass::Init(RenderContext& renderContext, GPUContext* context,
break;
case Quality::Ultra:
_cache.GridPixelSize = 8;
_cache.GridSizeZ = 256;
_cache.GridSizeZ = 128;
_cache.FogJitter = true;
_cache.MissedHistorySamplesCount = 8;
break;