Files
FlaxEngine/Source/Engine/Renderer/Renderer.h
Wojciech Figat a7e428a21c Merge branch 'master' into 1.5
# Conflicts:
#	Content/Shaders/GI/DDGI.flax
#	Content/Shaders/GI/GlobalSurfaceAtlas.flax
#	Content/Shaders/TAA.flax
#	Content/Shaders/VolumetricFog.flax
#	Source/Editor/CustomEditors/Editors/ActorTagEditor.cs
#	Source/Engine/Core/Config/GraphicsSettings.cpp
#	Source/Engine/Engine/PostProcessEffect.cs
#	Source/Engine/Graphics/GPUResourcesCollection.cpp
#	Source/Engine/Graphics/GPUResourcesCollection.h
#	Source/Engine/Graphics/PostProcessBase.h
#	Source/FlaxEngine.Gen.cs
2023-01-10 15:37:55 +01:00

57 lines
2.3 KiB
C++

// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
#pragma once
#include "Engine/Scripting/ScriptingObject.h"
class GPUContext;
class GPUTexture;
class GPUTextureView;
struct RenderContext;
class RenderTask;
class SceneRenderTask;
class MaterialBase;
class Actor;
/// <summary>
/// High-level rendering service.
/// </summary>
API_CLASS(Static) class FLAXENGINE_API Renderer
{
DECLARE_SCRIPTING_TYPE_NO_SPAWN(Renderer);
public:
/// <summary>
/// Determines whether the scene rendering system is ready (all shaders are loaded and helper resources are ready).
/// </summary>
/// <returns><c>true</c> if this rendering service is ready for scene rendering; otherwise, <c>false</c>.</returns>
static bool IsReady();
/// <summary>
/// Performs rendering for the input task.
/// </summary>
/// <param name="task">The scene rendering task.</param>
static void Render(SceneRenderTask* task);
public:
/// <summary>
/// Draws scene objects depth (to the output Z buffer). The output must be depth texture to write hardware depth to it.
/// </summary>
/// <param name="context">The GPU commands context to use.</param>
/// <param name="task">Render task to use it's view description and the render buffers.</param>
/// <param name="output">The output texture. Must be valid and created.</param>
/// <param name="customActors">The custom set of actors to render. If empty, the loaded scenes will be rendered.</param>
API_FUNCTION() static void DrawSceneDepth(GPUContext* context, SceneRenderTask* task, GPUTexture* output, const Array<Actor*, HeapAllocation>& customActors);
/// <summary>
/// Draws postFx material to the render target.
/// </summary>
/// <param name="context">The GPU commands context to use.</param>
/// <param name="renderContext">The rendering context.</param>
/// <param name="material">The material to render. It must be a post fx material.</param>
/// <param name="output">The output texture. Must be valid and created.</param>
/// <param name="input">The input texture. It's optional.</param>
API_FUNCTION() static void DrawPostFxMaterial(GPUContext* context, API_PARAM(Ref) const RenderContext& renderContext, MaterialBase* material, GPUTexture* output, GPUTextureView* input);
};