metaforce/Runtime/Graphics/Shaders/CTextSupportShader.hpp

44 lines
951 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2017-01-29 03:58:16 +00:00
#include <array>
#include "Runtime/GuiSys/CGuiWidget.hpp"
#include "zeus/CColor.hpp"
#include "zeus/CMatrix4f.hpp"
#include "zeus/CVector2f.hpp"
#include "zeus/CVector2i.hpp"
#include "zeus/CVector3f.hpp"
2017-01-29 03:58:16 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
2017-01-29 03:58:16 +00:00
class CGlyph;
2017-01-30 06:58:59 +00:00
class CFontImageDef;
class CTextRenderBuffer;
2017-01-29 03:58:16 +00:00
2018-12-08 05:30:43 +00:00
class CTextSupportShader {
friend class CTextRenderBuffer;
struct Uniform {
hsh::float4x4 m_mvp;
hsh::float4 m_uniformColor;
2018-12-08 05:30:43 +00:00
};
struct CharacterInstance {
std::array<hsh::float3, 4> m_pos;
std::array<hsh::float2, 4> m_uv;
hsh::float4 m_fontColor;
hsh::float4 m_outlineColor;
hsh::float4 m_mulColor;
2018-12-08 05:30:43 +00:00
void SetMetrics(const CGlyph& glyph, const zeus::CVector2i& offset);
};
struct ImageInstance {
std::array<hsh::float3, 4> m_pos;
std::array<hsh::float2, 4> m_uv;
hsh::float4 m_color;
2018-12-08 05:30:43 +00:00
void SetMetrics(const CFontImageDef& imgDef, const zeus::CVector2i& offset);
};
2017-01-29 03:58:16 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde