[Bf-blender-cvs] [89281f0dd8f] greasepencil-object: Merge branch 'master' into greasepencil-object

Antonioya noreply at git.blender.org
Thu Jan 10 13:26:27 CET 2019


Commit: 89281f0dd8fc40aa4d13bc354c08a5390f9cce74
Author: Antonioya
Date:   Thu Jan 10 13:17:31 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB89281f0dd8fc40aa4d13bc354c08a5390f9cce74

Merge branch 'master' into greasepencil-object

 Conflicts:
	source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl

===================================================================



===================================================================

diff --cc source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl
index 48c37303082,c2a5f6b0b84..ad85046487b
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl
@@@ -161,13 -158,14 +161,16 @@@ void main(void
  		length_b = finalThickness[2];
  	}
  
- 	/* generate the start endcap (alpha < 0 used as endcap flag)*/
- 	if ((caps_mode[0] != GPENCIL_FLATCAP) && is_equal(P0,P2) && 
+ 	/* generate the start endcap */
 -	if (is_equal(P0,P2) && (color_type == GPENCIL_COLOR_SOLID)){
++	if ((caps_mode[0] != GPENCIL_FLATCAP) && is_equal(P0,P2) &&
 +		(color_type == GPENCIL_COLOR_SOLID))
 +	{
- 		mTexCoord = vec2(2, 1);
- 		mColor = vec4(finalColor[1].rgb, finalColor[1].a * -1.0) ;
+ 		vec4 cap_color = finalColor[1];
+ 
+ 		mTexCoord = vec2(2.0, 1.0);
+ 		mColor = cap_color;
  		vec2 svn1 =  normalize(sp1 - sp2) * length_a * 4.0;
+ 		uvfac = vec2(0.0, 1.0);
  		gl_Position = vec4((sp1 + svn1) / Viewport, getZdepth(P1), 1.0);
  		EmitVertex();
  
@@@ -203,13 -204,13 +209,15 @@@
  	gl_Position = vec4((sp2 - length_b * miter_b) / Viewport, getZdepth(P2), 1.0);
  	EmitVertex();
  
- 	/* generate the end endcap (alpha < 0 used as endcap flag)*/
- 	if ((caps_mode[1] != GPENCIL_FLATCAP) && is_equal(P1,P3) && 
+ 	/* generate the end endcap */
 -	if (is_equal(P1,P3) && (color_type == GPENCIL_COLOR_SOLID) && (finaluvdata[2].x > 0)){
++	if ((caps_mode[1] != GPENCIL_FLATCAP) && is_equal(P1,P3) &&
 +		(color_type == GPENCIL_COLOR_SOLID) && (finaluvdata[2].x > 0))
 +	{
- 		mTexCoord = vec2(finaluvdata[2].x, 2);
- 		mColor = vec4(finalColor[2].rgb, finalColor[2].a * -1.0) ;
- 		uvfac = finaluvdata[2].x;
+ 		vec4 cap_color = finalColor[2];
+ 
+ 		mTexCoord = vec2(finaluvdata[2].x, 2.0);
+ 		mColor = cap_color;
+ 		uvfac = vec2(finaluvdata[2].x, 1.0);
  		gl_Position = vec4((sp2 + (length_b * 2.0) * miter_b) / Viewport, getZdepth(P2), 1.0);
  		EmitVertex();



More information about the Bf-blender-cvs mailing list