Commit: 6fe23b60dd2c4e3a63905a2a52d0f6093b8d5dda
Author: Antony Riakiotakis
Date:   Wed Feb 18 11:59:55 2015 +0100
Branches: master
https://developer.blender.org/rB6fe23b60dd2c4e3a63905a2a52d0f6093b8d5dda

Use clamp to border for brushes or textures can "leak" after rotating
texture coordinates of brushes (in rake mode).

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

M       source/blender/editors/sculpt_paint/paint_cursor.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c 
b/source/blender/editors/sculpt_paint/paint_cursor.c
index 2d425b7..cf3f682 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -341,8 +341,8 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, 
bool col, bool prima
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 
        if (mtex->brush_map_mode == MTEX_MAP_MODE_VIEW) {
-               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 
GL_CLAMP_TO_EDGE);
-               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 
GL_CLAMP_TO_EDGE);
+               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 
GL_CLAMP_TO_BORDER);
+               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 
GL_CLAMP_TO_BORDER);
        }
 
        BKE_paint_reset_overlay_invalid(invalid);
@@ -464,8 +464,8 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, 
float zoom)
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
 
        BKE_paint_reset_overlay_invalid(PAINT_INVALID_OVERLAY_CURVE);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to