metaforce/Runtime/Graphics/Shaders/CScanLinesFilter.hpp

44 lines
1.2 KiB
C++
Raw Permalink Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2017-05-31 22:34:24 -07:00
#include "Runtime/CToken.hpp"
2022-01-31 16:06:54 -08:00
//#include <boo/graphicsdev/IGraphicsDataFactory.hpp>
#include <zeus/CColor.hpp>
2017-05-31 22:34:24 -07:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
class CTexture;
enum class EFilterShape;
enum class EFilterType;
2017-05-31 22:34:24 -07:00
2018-12-07 21:30:43 -08:00
class CScanLinesFilter {
struct Uniform {
zeus::CColor color;
};
2022-01-31 16:06:54 -08:00
// boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf;
// boo::ObjToken<boo::IShaderDataBinding> m_dataBind;
2018-12-07 21:30:43 -08:00
Uniform m_uniform;
bool m_even;
2017-05-31 22:34:24 -07:00
public:
2018-12-07 21:30:43 -08:00
static void Initialize();
static void Shutdown();
explicit CScanLinesFilter(EFilterType type, bool even);
2018-12-07 21:30:43 -08:00
void draw(const zeus::CColor& color);
void DrawFilter(EFilterShape, const zeus::CColor& color, float) { draw(color); }
2017-05-31 22:34:24 -07:00
};
2018-12-07 21:30:43 -08:00
class CScanLinesFilterEven : public CScanLinesFilter {
public:
explicit CScanLinesFilterEven(EFilterType type) : CScanLinesFilter(type, true) {}
explicit CScanLinesFilterEven(EFilterType type, const TLockedToken<CTexture>&) : CScanLinesFilterEven(type) {}
};
2018-12-07 21:30:43 -08:00
class CScanLinesFilterOdd : public CScanLinesFilter {
public:
explicit CScanLinesFilterOdd(EFilterType type) : CScanLinesFilter(type, false) {}
explicit CScanLinesFilterOdd(EFilterType type, const TLockedToken<CTexture>&) : CScanLinesFilterOdd(type) {}
};
2021-04-10 01:42:06 -07:00
} // namespace metaforce