#include <GteTextEffect.h>
Definition at line 20 of file GteTextEffect.h.
TextEffect::TextEffect |
( |
std::shared_ptr< ProgramFactory > const & |
factory, |
|
|
std::shared_ptr< Texture2 > const & |
texture |
|
) |
| |
std::shared_ptr< ConstantBuffer > const & TextEffect::GetColor |
( |
| ) |
const |
std::shared_ptr< ConstantBuffer > const & TextEffect::GetTranslate |
( |
| ) |
const |
void TextEffect::SetColor |
( |
Vector4< float > const & |
color | ) |
|
void TextEffect::SetTranslate |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
std::shared_ptr<SamplerState> gte::TextEffect::mSamplerState |
|
private |
Initial value:=
"uniform TextColor\n"
"{\n"
" vec4 textColor;\n"
"};\n"
"\n"
"layout(location = 0) in vec2 vertexTCoord;\n"
"layout(location = 0) out vec4 pixelColor;\n"
"\n"
"uniform sampler2D baseSampler;\n"
"\n"
"void main()\n"
"{\n"
" float bitmapAlpha = texture(baseSampler, vertexTCoord).r;\n"
" if (bitmapAlpha > 0.5f)\n"
" {\n"
" discard;\n"
" }\n"
" pixelColor = textColor;\n"
"}\n"
Definition at line 40 of file GteTextEffect.h.
Initial value:=
"uniform Translate\n"
"{\n"
" vec2 translate;\n"
"};\n"
"\n"
"layout(location = 0) in vec2 modelPosition;\n"
"layout(location = 1) in vec2 modelTCoord;\n"
"layout(location = 0) out vec2 vertexTCoord;\n"
"\n"
"void main()\n"
"{\n"
" vertexTCoord = modelTCoord;\n"
" gl_Position.x = 2.0f * modelPosition.x - 1.0f + 2.0f * translate.x;\n"
" gl_Position.y = 2.0f * modelPosition.y - 1.0f + 2.0f * translate.y;\n"
" gl_Position.z = -1.0f;\n"
" gl_Position.w = 1.0f;\n"
"}\n"
Definition at line 39 of file GteTextEffect.h.
The documentation for this class was generated from the following files: