Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2015-02-11 07:54:14 +0300
committerJoshua Leung <aligorith@gmail.com>2015-02-11 07:54:14 +0300
commit387d91829d787ac96afbb2b3f86899e0e3346222 (patch)
tree10ae1574ede4515f5c7f0f5cc97cc2333356ebb7
parent4ae6d5899914a3b1baf54816062073a2f959a6bd (diff)
Fix T43149: Grease Pencil fill areas look divided by multiples ray lines
The problem here was caused by the usage of GL_POLYGON_SMOOTH (thanks Campbell for the help tracking this down!). Apparently the issue is that this option ends up doing some nasty accumulation with whatever is in the framebuffer for each *tesselated* polygon (instead of the whole polygon as intended/expected). ** IMPORTANT USER NOTES ** With the removal of this option, filled areas and volumetric strokes will now have jagged edges again. To resolve these artifacts, it is necessary to enable Viewport Multisampling (found in the User Preferences, under the System tab), and restart Blender to see the effects of this change.
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 895fc6608e2..20279caaf7c 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1051,8 +1051,10 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy,
/* turn on smooth lines (i.e. anti-aliasing) */
glEnable(GL_LINE_SMOOTH);
- glEnable(GL_POLYGON_SMOOTH);
- glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
+ /* XXX: turn on some way of ensuring that the polygon edges get smoothed
+ * GL_POLYGON_SMOOTH is nasty and shouldn't be used, as it ends up
+ * creating internal white rays due to the ways it accumulates stuff
+ */
/* turn on alpha-blending */
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
@@ -1064,7 +1066,6 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy,
/* turn off alpha blending, then smooth lines */
glDisable(GL_BLEND); // alpha blending
glDisable(GL_LINE_SMOOTH); // smooth lines
- glDisable(GL_POLYGON_SMOOTH); // smooth poly lines
/* restore initial gl conditions */
glLineWidth(1.0);