Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/shaders/gpu_shader_text_vert.glsl
| #ifndef USE_GPU_SHADER_CREATE_INFO | |||||
| uniform mat4 ModelViewProjectionMatrix; | uniform mat4 ModelViewProjectionMatrix; | ||||
| in vec4 pos; /* rect */ | in vec4 pos; /* rect */ | ||||
| in vec4 col; | in vec4 col; | ||||
| in int offset; | in int offset; | ||||
| in ivec2 glyph_size; | in ivec2 glyph_size; | ||||
| flat out vec4 color_flat; | flat out vec4 color_flat; | ||||
| noperspective out vec2 texCoord_interp; | noperspective out vec2 texCoord_interp; | ||||
| flat out int glyph_offset; | flat out int glyph_offset; | ||||
| flat out ivec2 glyph_dim; | flat out ivec2 glyph_dim; | ||||
| flat out int interp_size; | flat out int interp_size; | ||||
| #endif | |||||
| void main() | void main() | ||||
| { | { | ||||
| color_flat = col; | color_flat = col; | ||||
| glyph_offset = offset; | glyph_offset = offset; | ||||
| glyph_dim = abs(glyph_size); | glyph_dim = abs(glyph_size); | ||||
| interp_size = int(glyph_size.x < 0) + int(glyph_size.y < 0); | interp_size = int(glyph_size.x < 0) + int(glyph_size.y < 0); | ||||
| Show All 13 Lines | |||||