diff options
| author | x2048 <codeforsmile@gmail.com> | 2022-09-06 08:25:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-06 08:25:18 +0200 |
| commit | ff6dcfea82974df6db5a557e31aaddb6bdb7a71f (patch) | |
| tree | 18bafaedcfdff36a0c0719653b99370b7434b344 /src/client/render/anaglyph.h | |
| parent | 464043b8abdbd936640757604ecb21662592043b (diff) | |
| download | minetest-ff6dcfea82974df6db5a557e31aaddb6bdb7a71f.tar.xz | |
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>
Diffstat (limited to 'src/client/render/anaglyph.h')
| -rw-r--r-- | src/client/render/anaglyph.h | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/src/client/render/anaglyph.h b/src/client/render/anaglyph.h index a03b7dc7e..7a186aeff 100644 --- a/src/client/render/anaglyph.h +++ b/src/client/render/anaglyph.h @@ -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: + 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: - using RenderingCoreStereo::RenderingCoreStereo; - void drawAll() override; + ConfigureOverrideMaterialTarget(RenderTarget *upstream, bool enable); + + virtual void activate(PipelineContext &context) override; +private: + RenderTarget *upstream; + bool enable; }; + +void populateAnaglyphPipeline(RenderPipeline *pipeline, Client *client); |
