// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. #pragma once #include "Engine/Graphics/RenderView.h" #include "RendererPass.h" #include "Engine/Content/Assets/Shader.h" /// /// Forward rendering pass for transparent geometry. /// class ForwardPass : public RendererPass { private: AssetReference _shader; GPUPipelineState* _psApplyDistortion; public: /// /// Initializes a new instance of the class. /// ForwardPass(); public: /// /// Performs forward pass rendering for the input task. Renders transparent objects. /// /// The rendering context. /// Target with renderer frame ready for further processing. /// The output frame. void Render(RenderContext& renderContext, GPUTexture* input, GPUTexture* output); private: #if COMPILE_WITH_DEV_ENV void OnShaderReloading(Asset* obj) { _psApplyDistortion->ReleaseGPU(); invalidateResources(); } #endif public: // [RendererPass] String ToString() const override; bool Init() override; void Dispose() override; protected: // [RendererPass] bool setupResources() override; };