[Bf-blender-cvs] [62294c5b37e] temp-3d-texturing-brush-b: Fixes.
Jeroen Bakker
noreply at git.blender.org
Mon Mar 7 15:55:22 CET 2022
Commit: 62294c5b37eeaa552cdffc22abd70a7a9cbf8405
Author: Jeroen Bakker
Date: Mon Mar 7 15:55:14 2022 +0100
Branches: temp-3d-texturing-brush-b
https://developer.blender.org/rB62294c5b37eeaa552cdffc22abd70a7a9cbf8405
Fixes.
===================================================================
M source/blender/editors/sculpt_paint/sculpt_texture_paint_b.cc
M source/blender/imbuf/IMB_rasterizer.hh
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt_texture_paint_b.cc b/source/blender/editors/sculpt_paint/sculpt_texture_paint_b.cc
index 9ad8be1d8e1..05708cc47bb 100644
--- a/source/blender/editors/sculpt_paint/sculpt_texture_paint_b.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_texture_paint_b.cc
@@ -200,6 +200,7 @@ using RasterizerType = Rasterizer<VertexShader, FragmentShader, AddPixel, NodeDa
void NodeData::init_pixels(Object *ob, PBVHNode *node, ImBuf *image_buffer)
{
+ printf("%s\n", __func__);
Mesh *mesh = static_cast<Mesh *>(ob->data);
MLoopUV *ldata_uv = static_cast<MLoopUV *>(CustomData_get_layer(&mesh->ldata, CD_MLOOPUV));
if (ldata_uv == nullptr) {
diff --git a/source/blender/imbuf/IMB_rasterizer.hh b/source/blender/imbuf/IMB_rasterizer.hh
index 24306f4514f..dd13f789ee5 100644
--- a/source/blender/imbuf/IMB_rasterizer.hh
+++ b/source/blender/imbuf/IMB_rasterizer.hh
@@ -567,12 +567,12 @@ class Rasterizer {
if (left_target == sorted_vertices[1]) {
VertexOutputType mid_right = right + right_add * distance_min_to_mid;
return (mid_right.data - sorted_vertices[1]->data) /
- (mid_right.coord[0] - sorted_vertices[1]->coord[0]);
+ max_ff(mid_right.coord[0] - sorted_vertices[1]->coord[0], 1.0);
}
VertexOutputType mid_left = left + left_add * distance_min_to_mid;
return (sorted_vertices[1]->data - mid_left.data) /
- (sorted_vertices[1]->coord[0] - mid_left.coord[0]);
+ max_ff(sorted_vertices[1]->coord[0] - mid_left.coord[0], 1.0);
}
/**
More information about the Bf-blender-cvs
mailing list