Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
secondstage.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4// Copyright (C) 2017 numzero, Lobachevskiy Vitaliy <numzer0@yandex.ru>
5
6#pragma once
7#include "stereo.h"
8#include "pipeline.h"
9
14{
15public:
22 PostProcessingStep(u32 shader_id, const std::vector<u8> &texture_map);
23
24
25 void setRenderSource(RenderSource *source) override;
26 void setRenderTarget(RenderTarget *target) override;
27 void reset(PipelineContext &context) override;
28 void run(PipelineContext &context) override;
29
36 void setBilinearFilter(u8 index, bool value);
37private:
39 std::vector<u8> texture_map;
40 RenderSource *source { nullptr };
41 RenderTarget *target { nullptr };
42 video::SMaterial material;
43
44 void configureMaterial();
45};
46
47RenderStep *addPostProcessing(RenderPipeline *pipeline, RenderStep *previousStep, v2f scale, Client *client);
Definition client.h:105
Step to apply post-processing filter to the rendered image.
Definition secondstage.h:14
u32 shader_id
Definition secondstage.h:38
void setRenderSource(RenderSource *source) override
Assigns render source to this step.
Definition secondstage.cpp:34
PostProcessingStep(u32 shader_id, const std::vector< u8 > &texture_map)
Construct a new PostProcessingStep object.
Definition secondstage.cpp:13
void setBilinearFilter(u8 index, bool value)
Configure bilinear filtering for a specific texture layer.
Definition secondstage.cpp:77
void configureMaterial()
Definition secondstage.cpp:20
RenderTarget * target
Definition secondstage.h:41
RenderSource * source
Definition secondstage.h:40
std::vector< u8 > texture_map
Definition secondstage.h:39
video::SMaterial material
Definition secondstage.h:42
void setRenderTarget(RenderTarget *target) override
Assigned render target to this step.
Definition secondstage.cpp:39
void reset(PipelineContext &context) override
Definition secondstage.cpp:44
void run(PipelineContext &context) override
Runs the step.
Definition secondstage.cpp:48
Render Pipeline provides a flexible way to execute rendering steps in the engine.
Definition pipeline.h:349
Represents a source of rendering information such as textures.
Definition pipeline.h:60
Base class for rendering steps in the pipeline.
Definition pipeline.h:280
Represents a render target (screen or framebuffer)
Definition pipeline.h:78
core::vector2d< f32 > v2f
Definition irr_v2d.h:11
Definition activeobjectmgr.cpp:11
RenderStep * addPostProcessing(RenderPipeline *pipeline, RenderStep *previousStep, v2f scale, Client *client)
Definition secondstage.cpp:84
Definition pipeline.h:27