Bug 361923

Summary: Inconsistencies of rendering (brush stroke) depending viewport zoom
Product: [Applications] krita Reporter: David REVOY <info>
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: halla, sanusiharianto
Priority: NOR    
Version First Reported In: 3.0 Alpha   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description David REVOY 2016-04-18 06:52:48 UTC
https://share.kde.org/index.php/s/t83Vga0cIgr7gfg/download
[^ video of the issue, 50 second, *.webm , 5MB.  Quick description: first 25 second (left) 50% viewport all is fine, last 25 second (right) 44% viewport and bug ]

Hi, I open here a bug report about inconsistencies of rendering (brush stroke) depending viewport zoom: in 3.0(alpha) my brush strokes are all rendered correctly at discrete zoom of viewport, but  not when I use a random viewport zoom value. 

How to reproduce
===============
* Use a brush preset as 'Deevad E4 Splat'  ( http://www.peppercarrot.com/extras/resources/deevad.bundle )
* Be sure viewport zoom is at 50% ( you can use numkeypad+ and numkeypad- to navigate from discrete zoom to discrete zoom )
* paint strokes :  they render perfectly on release of stylus or mouse-button.
* Now, zoom to a value 'not discrete',  ( in video 44% ) with Ctrl+Space+drag 
* Paint stroke with the same preset

Result:
======
After the release of stylus or mouse-button, the stroke is changing *totally*. It produce a non WYSIWYG experience of painting. (a bit like typing a letter on keyboard, and having another letter on screen). This is even more dramatic after painting a long stroke to add texture to a scene, and then release the stylus and get a totally different rendering.
Another effect is also something like 'self-collision' of stroke and tile flicker if you paint over another stroke. It's visible on the video. I describe it like a semi-effect of the brush blending mode 'copy'. 

References/Spec:
==============
- Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz
- GeForce GTX 650 Ti , Nvidia proprietary driver 340update, OpenGL canvas 'on'
- Ubuntu 16.04, Cinnamon desktop 2.8. 
- Video recorded in mid of week ( git6b2491e ) , reproduced with a daily build of 1 min ago ( git fb07755 )
Comment 1 Halla Rempt 2016-04-18 12:00:39 UTC
https://phabricator.kde.org/T2316
Comment 2 Dmitry Kazakov 2016-04-26 14:48:37 UTC
Git commit e6636aa466a740ee4464d2e516428ae3773b33af by Dmitry Kazakov.
Committed on 26/04/2016 at 11:10.
Pushed by dkazakov into branch 'master'.

Make ImagePipe brushes to initialize internal indexes on the start of every stroke

The main difference with the previous behavior is that now
the imagepipe brush does not "continue" from the previous stroke,
but instead initialized on every tablet press
Fixes T2316

M  +7    -0    libs/brush/kis_imagepipe_brush.cpp

http://commits.kde.org/krita/e6636aa466a740ee4464d2e516428ae3773b33af