Blender Git Loki

Git Commits -> Revision d7d4bca

Revision d7d4bca by Bastien Montagne (master)
May 1, 2017, 14:32 (GMT)
Reworked version of dashed line shader.

Using geometry shader allows us to get rid of the 'line origin' extra
vertex attribute, which means dashed shader no longer requires fiddling
with those vertex attributes definition, and, most importantly, does not
require anymore special drawing code!

As you can see, this makes code much simpler, and much less verbose,
especially in complex cases.

In addition, changed how dashes are handled, to have two 'modes', a
simple one with single color (using default "color" uniform name), and a
more advanced one allowing more complex and multi-color patterns.

Note that since GLSL 1.2 does not support geometry shaders, a hack was
added for now (which gives solid lines, but at least does not make
Blender crash).

Commit Details:

Full Hash: d7d4bca23be91ec5b0ce562d47a34ee49dd337b8
Parent Commit: 6ef497d
Lines Changed: +537, -875

3 Added Paths:

/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_geom.glsl (+46, -0) (View)
/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_legacy_vert.glsl (+22, -0) (View)
/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_legacy_vert.glsl (+21, -0) (View)

1 Deleted Path:

/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_frag.glsl (+0, -24)

25 Modified Paths:

/intern/gawain/gawain/immediate.h (+1, -0) (Diff)
/intern/gawain/src/immediate.c (+18, -0) (Diff)
/source/blender/editors/animation/anim_markers.c (+3, -6) (Diff)
/source/blender/editors/gpencil/gpencil_paint.c (+7, -11) (Diff)
/source/blender/editors/include/UI_interface.h (+1, -2) (Diff)
/source/blender/editors/interface/interface_draw.c (+6, -16) (Diff)
/source/blender/editors/sculpt_paint/paint_stroke.c (+7, -12) (Diff)
/source/blender/editors/space_clip/clip_draw.c (+103, -239) (Diff)
/source/blender/editors/space_image/image_draw.c (+2, -5) (Diff)
/source/blender/editors/space_nla/nla_draw.c (+18, -46) (Diff)
/source/blender/editors/space_sequencer/sequencer_draw.c (+8, -19) (Diff)
/source/blender/editors/space_text/text_draw.c (+6, -16) (Diff)
/source/blender/editors/space_view3d/drawarmature.c (+21, -48) (Diff)
/source/blender/editors/space_view3d/view3d_draw.c (+66, -102) (Diff)
/source/blender/editors/space_view3d/view3d_ruler.c (+27, -42) (Diff)
/source/blender/editors/transform/transform.c (+17, -33) (Diff)
/source/blender/editors/transform/transform_constraints.c (+6, -14) (Diff)
/source/blender/editors/util/ed_util.c (+6, -16) (Diff)
/source/blender/editors/uvedit/uvedit_draw.c (+34, -71) (Diff)
/source/blender/gpu/CMakeLists.txt (+3, -1) (Diff)
/source/blender/gpu/intern/gpu_shader.c (+24, -4) (Diff)
/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_frag.glsl (+30, -8) (Diff)
/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_vert.glsl (+0, -18) (Diff)
/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_vert.glsl (+1, -18) (Diff)
/source/blender/windowmanager/intern/wm_gesture.c (+33, -104) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021