mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-26 18:21:04 +00: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:
parent
464043b8ab
commit
ff6dcfea82
32 changed files with 1476 additions and 565 deletions
|
@ -20,15 +20,50 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#pragma once
|
||||
#include "stereo.h"
|
||||
#include "pipeline.h"
|
||||
|
||||
class RenderingCoreAnaglyph : public RenderingCoreStereo
|
||||
/**
|
||||
* Set color mask when rendering the next steps
|
||||
*/
|
||||
class SetColorMaskStep : public TrivialRenderStep
|
||||
{
|
||||
protected:
|
||||
void setupMaterial(int color_mask);
|
||||
void useEye(bool right) override;
|
||||
void resetEye() override;
|
||||
|
||||
public:
|
||||
using RenderingCoreStereo::RenderingCoreStereo;
|
||||
void drawAll() override;
|
||||
SetColorMaskStep(int color_mask);
|
||||
|
||||
void run(PipelineContext &context) override;
|
||||
private:
|
||||
int color_mask;
|
||||
};
|
||||
|
||||
/**
|
||||
* Resets depth buffer of the current render target
|
||||
*
|
||||
*/
|
||||
class ClearDepthBufferTarget : public RenderTarget
|
||||
{
|
||||
public:
|
||||
ClearDepthBufferTarget(RenderTarget *target);
|
||||
|
||||
void reset(PipelineContext &context) override {}
|
||||
void activate(PipelineContext &context) override;
|
||||
private:
|
||||
RenderTarget *target;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Enables or disables override material when activated
|
||||
*
|
||||
*/
|
||||
class ConfigureOverrideMaterialTarget : public RenderTarget
|
||||
{
|
||||
public:
|
||||
ConfigureOverrideMaterialTarget(RenderTarget *upstream, bool enable);
|
||||
|
||||
virtual void activate(PipelineContext &context) override;
|
||||
private:
|
||||
RenderTarget *upstream;
|
||||
bool enable;
|
||||
};
|
||||
|
||||
void populateAnaglyphPipeline(RenderPipeline *pipeline, Client *client);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue