Graphics: Fix blending (temporary fix until frame graph handles it)

This commit is contained in:
Jérôme Leclercq
2021-11-24 21:56:33 +01:00
parent d475bbd4a2
commit b8b0552a4e
4 changed files with 25 additions and 14 deletions

View File

@@ -34,7 +34,7 @@ namespace Nz
Graphics(Config config);
~Graphics();
inline const std::shared_ptr<RenderPipeline>& GetBlitPipeline() const;
inline const std::shared_ptr<RenderPipeline>& GetBlitPipeline(bool transparent) const;
inline const std::shared_ptr<RenderPipelineLayout>& GetBlitPipelineLayout() const;
inline const DefaultTextures& GetDefaultTextures() const;
inline const std::shared_ptr<AbstractBuffer>& GetFullscreenVertexBuffer() const;
@@ -73,6 +73,7 @@ namespace Nz
std::shared_ptr<AbstractBuffer> m_fullscreenVertexBuffer;
std::shared_ptr<RenderDevice> m_renderDevice;
std::shared_ptr<RenderPipeline> m_blitPipeline;
std::shared_ptr<RenderPipeline> m_blitPipelineTransparent;
std::shared_ptr<RenderPipelineLayout> m_blitPipelineLayout;
std::shared_ptr<VertexDeclaration> m_fullscreenVertexDeclaration;
DefaultTextures m_defaultTextures;

View File

@@ -7,9 +7,9 @@
namespace Nz
{
inline const std::shared_ptr<RenderPipeline>& Graphics::GetBlitPipeline() const
inline const std::shared_ptr<RenderPipeline>& Graphics::GetBlitPipeline(bool transparent) const
{
return m_blitPipeline;
return (transparent) ? m_blitPipelineTransparent : m_blitPipeline;
}
inline const std::shared_ptr<RenderPipelineLayout>& Graphics::GetBlitPipelineLayout() const