Blender Git Loki

Git Commits -> Revision 1b1275f

Revision 1b1275f by Mike Erwin (master)
September 17, 2016, 11:33 (GMT)
add GPU_SHADER_TEXT for font rendering

With USE_GLSL enabled, GPU_basic_shader(TEXTURE|COLOR) always rendered black. New shader uses a solid color + alpha channel of texture (which in our case is a font glyph). See fragment shader for details.

I prefer this approah -- multiple shaders that each do one thing well (and are easy to read/write/understand), instead of one shader that can do many things given the right options.

Commit Details:

Full Hash: 1b1275f0db85101345def817fee486beebaa6b9a
Parent Commit: c3034af
Lines Changed: +57, -3

2 Added Paths:

/source/blender/gpu/shaders/gpu_shader_text_frag.glsl (+14, -0) (View)
/source/blender/gpu/shaders/gpu_shader_text_vert.glsl (+16, -0) (View)

4 Modified Paths:

/source/blender/blenfont/intern/blf.c (+4, -3) (Diff)
/source/blender/gpu/CMakeLists.txt (+3, -0) (Diff)
/source/blender/gpu/GPU_shader.h (+2, -0) (Diff)
/source/blender/gpu/intern/gpu_shader.c (+18, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021