Fix various issues
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include "Engine/Engine/Time.h"
|
#include "Engine/Engine/Time.h"
|
||||||
#include "Engine/Level/Scene/Scene.h"
|
#include "Engine/Level/Scene/Scene.h"
|
||||||
#include "Engine/Profiler/ProfilerCPU.h"
|
#include "Engine/Profiler/ProfilerCPU.h"
|
||||||
|
#include "Engine/Profiler/ProfilerMemory.h"
|
||||||
#include "AudioBackend.h"
|
#include "AudioBackend.h"
|
||||||
#include "Audio.h"
|
#include "Audio.h"
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
#include "Engine/Engine/EngineService.h"
|
#include "Engine/Engine/EngineService.h"
|
||||||
#include "Engine/Profiler/ProfilerGPU.h"
|
#include "Engine/Profiler/ProfilerGPU.h"
|
||||||
#include "Engine/Profiler/ProfilerMemory.h"
|
#include "Engine/Profiler/ProfilerMemory.h"
|
||||||
|
#if !USE_EDITOR
|
||||||
#include "Engine/Render2D/Font.h"
|
#include "Engine/Render2D/Font.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
bool Graphics::UseVSync = false;
|
bool Graphics::UseVSync = false;
|
||||||
Quality Graphics::AAQuality = Quality::Medium;
|
Quality Graphics::AAQuality = Quality::Medium;
|
||||||
@@ -40,12 +42,6 @@ extern GPUDevice* CreateGPUDeviceDX11();
|
|||||||
#if GRAPHICS_API_DIRECTX12
|
#if GRAPHICS_API_DIRECTX12
|
||||||
extern GPUDevice* CreateGPUDeviceDX12();
|
extern GPUDevice* CreateGPUDeviceDX12();
|
||||||
#endif
|
#endif
|
||||||
#if GRAPHICS_API_PS4
|
|
||||||
extern GPUDevice* CreateGPUDevicePS4();
|
|
||||||
#endif
|
|
||||||
#if GRAPHICS_API_PS5
|
|
||||||
extern GPUDevice* CreateGPUDevicePS5();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class GraphicsService : public EngineService
|
class GraphicsService : public EngineService
|
||||||
{
|
{
|
||||||
@@ -166,10 +162,12 @@ bool GraphicsService::Init()
|
|||||||
device = CreateGPUDeviceVulkan();
|
device = CreateGPUDeviceVulkan();
|
||||||
#endif
|
#endif
|
||||||
#if GRAPHICS_API_PS4
|
#if GRAPHICS_API_PS4
|
||||||
|
extern GPUDevice* CreateGPUDevicePS4();
|
||||||
if (!device)
|
if (!device)
|
||||||
device = CreateGPUDevicePS4();
|
device = CreateGPUDevicePS4();
|
||||||
#endif
|
#endif
|
||||||
#if GRAPHICS_API_PS5
|
#if GRAPHICS_API_PS5
|
||||||
|
extern GPUDevice* CreateGPUDevicePS5();
|
||||||
if (!device)
|
if (!device)
|
||||||
device = CreateGPUDevicePS5();
|
device = CreateGPUDevicePS5();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -295,7 +295,11 @@ void ApplePlatform::Sleep(int32 milliseconds)
|
|||||||
|
|
||||||
void ApplePlatform::Yield()
|
void ApplePlatform::Yield()
|
||||||
{
|
{
|
||||||
pthread_yield();
|
#if PLATFORM_ARCH_ARM64
|
||||||
|
__builtin_arm_yield();
|
||||||
|
#else
|
||||||
|
_mm_pause();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
double ApplePlatform::GetTimeSeconds()
|
double ApplePlatform::GetTimeSeconds()
|
||||||
|
|||||||
@@ -380,6 +380,7 @@ void PostProcessingPass::Render(RenderContext& renderContext, GPUTexture* input,
|
|||||||
|
|
||||||
if (useBloom)
|
if (useBloom)
|
||||||
{
|
{
|
||||||
|
PROFILE_GPU("Bloom");
|
||||||
context->SetRenderTarget(bloomBuffer1->View(0, 0));
|
context->SetRenderTarget(bloomBuffer1->View(0, 0));
|
||||||
context->SetViewportAndScissors((float)w2, (float)h2);
|
context->SetViewportAndScissors((float)w2, (float)h2);
|
||||||
context->BindSR(0, input->View());
|
context->BindSR(0, input->View());
|
||||||
@@ -440,6 +441,8 @@ void PostProcessingPass::Render(RenderContext& renderContext, GPUTexture* input,
|
|||||||
// Check if use lens flares
|
// Check if use lens flares
|
||||||
if (useLensFlares)
|
if (useLensFlares)
|
||||||
{
|
{
|
||||||
|
PROFILE_GPU("Lens Flares");
|
||||||
|
|
||||||
// Prepare lens flares helper textures
|
// Prepare lens flares helper textures
|
||||||
context->BindSR(5, GetCustomOrDefault(settings.LensFlares.LensStar, _defaultLensStar, TEXT("Engine/Textures/DefaultLensStarburst")));
|
context->BindSR(5, GetCustomOrDefault(settings.LensFlares.LensStar, _defaultLensStar, TEXT("Engine/Textures/DefaultLensStarburst")));
|
||||||
context->BindSR(6, GetCustomOrDefault(settings.LensFlares.LensColor, _defaultLensColor, TEXT("Engine/Textures/DefaultLensColor")));
|
context->BindSR(6, GetCustomOrDefault(settings.LensFlares.LensColor, _defaultLensColor, TEXT("Engine/Textures/DefaultLensColor")));
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ bool VolumetricFogPass::Init(RenderContext& renderContext, GPUContext* context,
|
|||||||
break;
|
break;
|
||||||
case Quality::Ultra:
|
case Quality::Ultra:
|
||||||
_cache.GridPixelSize = 8;
|
_cache.GridPixelSize = 8;
|
||||||
_cache.GridSizeZ = 256;
|
_cache.GridSizeZ = 128;
|
||||||
_cache.FogJitter = true;
|
_cache.FogJitter = true;
|
||||||
_cache.MissedHistorySamplesCount = 8;
|
_cache.MissedHistorySamplesCount = 8;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user