mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-13 11:19:58 +01:00
Use of secondary texture in image shader (renamed from mask texture) in image filters for ichannel_1 as texture of display loopback only if not needed otherwise (e.g. input image needed in Sharpen filter).
69 lines
1.1 KiB
C++
69 lines
1.1 KiB
C++
#ifndef IMAGESHADER_H
|
|
#define IMAGESHADER_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include "Shader.h"
|
|
|
|
class ImageShader : public Shader
|
|
{
|
|
|
|
public:
|
|
ImageShader();
|
|
|
|
void use() override;
|
|
void reset() override;
|
|
void accept(Visitor& v) override;
|
|
void copy(ImageShader const& S);
|
|
|
|
uint secondary_texture;
|
|
|
|
// uniforms
|
|
float stipple;
|
|
glm::mat4 iNodes;
|
|
};
|
|
|
|
class MaskShader : public Shader
|
|
{
|
|
|
|
public:
|
|
MaskShader();
|
|
|
|
void use() override;
|
|
void reset() override;
|
|
void accept(Visitor& v) override;
|
|
void copy(MaskShader const& S);
|
|
|
|
enum Modes {
|
|
NONE = 0,
|
|
PAINT = 1,
|
|
SHAPE = 2,
|
|
SOURCE = 3
|
|
};
|
|
uint mode;
|
|
|
|
enum Shapes {
|
|
ELLIPSE = 0,
|
|
OBLONG = 1,
|
|
RECTANGLE = 2,
|
|
HORIZONTAL = 3,
|
|
VERTICAL = 4
|
|
};
|
|
uint shape;
|
|
|
|
// uniforms
|
|
glm::vec2 size;
|
|
float blur;
|
|
|
|
int option;
|
|
int effect;
|
|
glm::vec4 cursor;
|
|
glm::vec3 brush;
|
|
|
|
static const char* mask_icons[4];
|
|
static const char* mask_names[4];
|
|
static const char* mask_shapes[5];
|
|
};
|
|
|
|
#endif // IMAGESHADER_H
|