Merge remote-tracking branch 'origin/master' into 1.8

# Conflicts:
#	Flax.flaxproj
This commit is contained in:
Wojtek Figat
2024-02-26 19:49:39 +01:00
2740 changed files with 5217 additions and 3615 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "AmbientOcclusionPass.h"
#include "RenderList.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "FXAA.h"
#include "Engine/Content/Assets/Shader.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "SMAA.h"
#include "Engine/Content/Assets/Shader.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "TAA.h"
#include "Engine/Content/Assets/Shader.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "AtmospherePreCompute.h"
#include "Engine/Engine/Engine.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "ColorGradingPass.h"
#include "RenderList.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "DepthOfFieldPass.h"
#include "RenderList.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#if USE_EDITOR

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#if USE_EDITOR

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#if USE_EDITOR

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#if USE_EDITOR

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#if USE_EDITOR

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "EyeAdaptationPass.h"
#include "HistogramPass.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "ForwardPass.h"
#include "RenderList.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "GBufferPass.h"
#include "RenderList.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "DynamicDiffuseGlobalIllumination.h"
#include "GlobalSurfaceAtlasPass.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "GlobalSurfaceAtlasPass.h"
#include "DynamicDiffuseGlobalIllumination.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "GlobalSignDistanceFieldPass.h"
#include "RenderList.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "HistogramPass.h"
#include "RenderList.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "LightPass.h"
#include "ShadowsPass.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "MotionBlurPass.h"
#include "GBufferPass.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "PostProcessingPass.h"
#include "RenderList.h"
@@ -194,8 +194,18 @@ void PostProcessingPass::Render(RenderContext& renderContext, GPUTexture* input,
bool useCameraArtifacts = EnumHasAnyFlags(view.Flags, ViewFlags::CameraArtifacts) && (settings.CameraArtifacts.VignetteIntensity > 0.0f || settings.CameraArtifacts.GrainAmount > 0.0f || settings.CameraArtifacts.ChromaticDistortion > 0.0f || settings.CameraArtifacts.ScreenFadeColor.A > 0.0f);
bool useLensFlares = EnumHasAnyFlags(view.Flags, ViewFlags::LensFlares) && settings.LensFlares.Intensity > 0.0f && useBloom;
// Cache viewport sizes
int32 w1 = input->Width();
int32 w2 = w1 >> 1;
int32 w4 = w2 >> 1;
int32 w8 = w4 >> 1;
int32 h1 = input->Height();
int32 h2 = h1 >> 1;
int32 h4 = h2 >> 1;
int32 h8 = h4 >> 1;
// Ensure to have valid data and if at least one effect should be applied
if (!(useBloom || useToneMapping || useCameraArtifacts) || checkIfSkipPass())
if (!(useBloom || useToneMapping || useCameraArtifacts) || checkIfSkipPass() || w8 == 0 || h8 ==0)
{
// Resources are missing. Do not perform rendering. Just copy raw frame
context->SetViewportAndScissors((float)output->Width(), (float)output->Height());
@@ -209,16 +219,6 @@ void PostProcessingPass::Render(RenderContext& renderContext, GPUTexture* input,
auto cb0 = shader->GetCB(0);
auto cb1 = shader->GetCB(1);
// Cache viewport sizes
int32 w1 = input->Width();
int32 w2 = w1 >> 1;
int32 w4 = w2 >> 1;
int32 w8 = w4 >> 1;
int32 h1 = input->Height();
int32 h2 = h1 >> 1;
int32 h4 = h2 >> 1;
int32 h8 = h4 >> 1;
////////////////////////////////////////////////////////////////////////////////////
// Setup shader

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "ProbesRenderer.h"
#include "Renderer.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "ReflectionsPass.h"
#include "GBufferPass.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "RenderList.h"
#include "Engine/Core/Collections/Sorting.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using Flax.Build;
using Flax.Build.NativeCpp;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "Renderer.h"
#include "Engine/Graphics/GPUContext.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using System.Runtime.InteropServices;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "ScreenSpaceReflectionsPass.h"
#include "ReflectionsPass.h"
@@ -176,6 +176,8 @@ void ScreenSpaceReflectionsPass::Render(RenderContext& renderContext, GPUTexture
// Prepare resolutions for passes
const int32 width = buffers->GetWidth();
const int32 height = buffers->GetHeight();
if (width < 4 || height < 4)
return;
const int32 traceWidth = width / static_cast<int32>(settings.RayTracePassResolution);
const int32 traceHeight = height / static_cast<int32>(settings.RayTracePassResolution);
const int32 resolveWidth = width / static_cast<int32>(settings.RayTracePassResolution);

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "ShadowsPass.h"
#include "GBufferPass.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "BitonicSort.h"
#include "Engine/Content/Content.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "MultiScaler.h"
#include "Engine/Graphics/Textures/GPUTexture.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#include "VolumetricFogPass.h"
#include "ShadowsPass.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
#pragma once