Commit: 9e79b41397441a2072bc18757edf103c69190f3a Author: Antonio Vazquez Date: Thu Jun 15 10:24:15 2017 +0200 Branches: greasepencil-object https://developer.blender.org/rB9e79b41397441a2072bc18757edf103c69190f3a
Fix error with object scale and stroke thickness With new calculation of previous commit for stroke thickness the scale of the object was not used and need to be used. Now the scale is included and an average value is used because the axis change is not directly related to the stroke thickness. =================================================================== M source/blender/draw/engines/gpencil/shaders/gpencil_stroke_vert.glsl =================================================================== diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_vert.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_vert.glsl index 5173321c132..fce902d8646 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_vert.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_vert.glsl @@ -23,7 +23,8 @@ void main(void) if (is_persp == TRUE) { float size = (ProjectionMatrix[3][3] == 0.0) ? (thickness / (-gl_Position.z * defaultpixsize)) : (thickness / defaultpixsize); - finalThickness = max(abs(size) / 40.0 , 1.0); + float objscale = (ModelViewProjectionMatrix[0][0] + ModelViewProjectionMatrix[1][1] + ModelViewProjectionMatrix[2][2]) / 3.0; + finalThickness = max((abs(size) / 40.0) * objscale , 1.0); } else { finalThickness = thickness; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs