1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-26 05:15:27 +01:00

Implement rendering pipeline and post-processing (#12465)

Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: lhofhansl <lhofhansl@yahoo.com>
This commit is contained in:
x2048
2022-09-06 08:25:18 +02:00
committed by GitHub
parent 464043b8ab
commit ff6dcfea82
32 changed files with 1476 additions and 565 deletions

View File

@@ -21,23 +21,21 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "stereo.h"
class RenderingCoreSideBySide : public RenderingCoreStereo
class DrawImageStep : public RenderStep
{
protected:
video::ITexture *left = nullptr;
video::ITexture *right = nullptr;
bool horizontal = false;
bool flipped = false;
core::dimension2du image_size;
v2s32 rpos;
void initTextures() override;
void clearTextures() override;
void useEye(bool right) override;
void resetEye() override;
public:
RenderingCoreSideBySide(IrrlichtDevice *_device, Client *_client, Hud *_hud,
bool _horizontal = false, bool _flipped = false);
void drawAll() override;
DrawImageStep(u8 texture_index, v2f offset);
void setRenderSource(RenderSource *_source) override;
void setRenderTarget(RenderTarget *_target) override;
void reset(PipelineContext &context) override {}
void run(PipelineContext &context) override;
private:
u8 texture_index;
v2f offset;
RenderSource *source;
RenderTarget *target;
};
void populateSideBySidePipeline(RenderPipeline *pipeline, Client *client, bool horizontal, bool flipped, v2f &virtual_size_scale);