API Almost finished
This commit is contained in:
@ -54,6 +54,7 @@ void FontShader::compile() {
|
||||
"uniform sampler2D u_Text0;\n"
|
||||
"uniform sampler2D u_Text1;\n"
|
||||
"uniform sampler2D u_Text2;\n"
|
||||
"uniform sampler2D u_Text3;\n"
|
||||
|
||||
"void main() {\n"
|
||||
"o_Color = o_VertColor;\n"
|
||||
@ -62,8 +63,10 @@ void FontShader::compile() {
|
||||
"tColor = texture(u_Text0, o_TextCoord);\n"
|
||||
"} else if(o_TextIndex == 1) \n{"
|
||||
"tColor = texture(u_Text1, o_TextCoord);\n"
|
||||
"} else {\n"
|
||||
"} else if(o_TextIndex == 2) \n{"
|
||||
"tColor = texture(u_Text2, o_TextCoord);\n"
|
||||
"} else {\n"
|
||||
"tColor = texture(u_Text3, o_TextCoord);\n"
|
||||
"}\n"
|
||||
"o_Color.a *= tColor.r;\n"
|
||||
"}\n"
|
||||
@ -78,4 +81,5 @@ void FontShader::compile() {
|
||||
this->paramTexture0 = this->getParameterByName("u_Text0");
|
||||
this->paramTexture1 = this->getParameterByName("u_Text1");
|
||||
this->paramTexture2 = this->getParameterByName("u_Text2");
|
||||
this->paramTexture3 = this->getParameterByName("u_Text3");
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
|
||||
#define FONT_SHADER_PARTS_MAX 4
|
||||
#define FONT_SHADER_QUADS_MAX 32
|
||||
#define FONT_SHADER_TEXTURE_MAX 8
|
||||
#define FONT_SHADER_TEXTURE_MAX 4
|
||||
|
||||
namespace Dawn {
|
||||
// #pragma pack(push, 4)
|
||||
@ -30,6 +30,7 @@ namespace Dawn {
|
||||
shaderparameter_t paramTexture0;
|
||||
shaderparameter_t paramTexture1;
|
||||
shaderparameter_t paramTexture2;
|
||||
shaderparameter_t paramTexture3;
|
||||
shaderbufferlocation_t bufferUiCanvas;
|
||||
shaderbufferlocation_t bufferFont;
|
||||
|
||||
|
Reference in New Issue
Block a user