9 #include "VectorMath.h"
23 static SdfTextShader* CreateSignedDistanceFieldUniformScale(
const TShaderId shaderId);
25 static SdfTextShader* CreateSignedDistanceFieldUniformScaleSuperSampled(
const TShaderId shaderId);
27 static SdfTextShader* CreateSignedDistanceField(
const TShaderId shaderId);
29 static SdfTextShader* CreateSignedDistanceFieldSuperSampled(
const TShaderId shaderId);
32 const GLuint GetDiffuseSamplerId()
const;
34 void SetMVP(
const m44& mvp)
const;
36 void SetScale(
const v3& scale)
const;
38 void SetGlyphColor(
const v4& rgba)
const;
40 void SetSdfConstants(
const float sdfSpread,
const float textureSize,
const float texelToPixelRatio,
const float haloSize,
const float haloHardness,
const float antiAliasTweakMultiplier)
const;
45 GLuint m_modelViewProjectionUniformLocation;
46 GLuint m_scaleUniformLocation;
47 GLuint m_glyphColorUniformLocation;
48 GLuint m_diffuseTextureSampleUniformLocation;
49 GLuint m_sdfConstantsUniformLocation;
51 const bool m_isUniformScale;
54 SdfTextShader(
const TShaderId shaderId,
const std::string& vertexCode,
const std::string& fragmentCode,
bool isUniformScale,
bool isNull =
false);