-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Dev: created PostProcessPass for more quick and flexible renderpasse…
…s management
- Loading branch information
1 parent
b2c3f09
commit 724be6d
Showing
31 changed files
with
214 additions
and
812 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
This file is part of Vulkan-Engine, a simple to use Vulkan based 3D library | ||
MIT License | ||
Copyright (c) 2023 Antonio Espinosa Garcia | ||
*/ | ||
#ifndef POSTPROCESS_PASS_H | ||
#define POSTPROCESS_PASS_H | ||
#include <engine/core/passes/pass.h> | ||
|
||
VULKAN_ENGINE_NAMESPACE_BEGIN | ||
|
||
namespace Core { | ||
/* | ||
Generic Postprocess Pass. It recieves an image from a previous pass and performs a postptocess task defined by a shader | ||
on it. Can be inherited. | ||
*/ | ||
class PostProcessPass : public GraphicPass | ||
{ | ||
protected: | ||
ColorFormatType m_colorFormat; | ||
Mesh* m_vignette; | ||
Graphics::DescriptorSet m_imageDescriptorSet; | ||
std::string m_shaderPath; | ||
|
||
public: | ||
PostProcessPass(Graphics::Device* ctx, | ||
Extent2D extent, | ||
uint32_t framebufferCount, | ||
ColorFormatType colorFormat, | ||
Mesh* vignette, | ||
std::string shaderPath, | ||
std::string name = "Post Process", | ||
bool isDefault = true) | ||
: BasePass(ctx, extent, framebufferCount, 1, isDefault, name) | ||
, m_colorFormat(colorFormat) | ||
, m_vignette(vignette) | ||
, m_shaderPath(shaderPath) { | ||
} | ||
|
||
virtual void setup_attachments(std::vector<Graphics::Attachment>& attachments, | ||
std::vector<Graphics::SubPassDependency>& dependencies); | ||
|
||
virtual void setup_uniforms(std::vector<Graphics::Frame>& frames); | ||
|
||
virtual void setup_shader_passes(); | ||
|
||
virtual void render(Graphics::Frame& currentFrame, Scene* const scene, uint32_t presentImageIndex = 0); | ||
|
||
virtual void connect_to_previous_images(std::vector<Graphics::Image> images); | ||
}; | ||
|
||
} // namespace Core | ||
VULKAN_ENGINE_NAMESPACE_END | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.