Blender Git Commit Log

Git Commits -> Revision 7144fdf

Revision 7144fdf by Clément Foucault (master)
March 29, 2018, 19:32 (GMT)
BLF: Perf: Divide by 6 the amount of verts sent to the GPU.

This means smaller imm buffer usage.

This does not reduce the number of drawcalls.

This uses geometry shader which is slow for the GPU but given we are really
CPU bound on this case, it should not matter.

A perfect implementation would:
- Set the glyph coord in a bufferTexture and just send the glyph ID to the
GPU to read the bufferTexture.
- Use GWN_draw_primitive and draw 2*strllen triangle and just retrieve the
glyph ID and color based on gl_VertexID / 6.
- Stream fixed size buffer that the Driver can discard quickly but this is
the same as improving IMM directly.

Commit Details:

Full Hash: 7144fdf28568e195dc639bea8828e614d7eb6f79
Parent Commit: c48b6fa
Lines Changed: +66, -41

1 Added Path:

/source/blender/gpu/shaders/gpu_shader_text_geom.glsl (+34, -0) (View)

6 Modified Paths:

/source/blender/blenfont/intern/blf.c (+3, -3) (Diff)
/source/blender/blenfont/intern/blf_font.c (+4, -4) (Diff)
/source/blender/blenfont/intern/blf_glyph.c (+5, -25) (Diff)
/source/blender/gpu/CMakeLists.txt (+1, -0) (Diff)
/source/blender/gpu/intern/gpu_shader.c (+4, -1) (Diff)
/source/blender/gpu/shaders/gpu_shader_text_vert.glsl (+15, -8) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021