Part #2 to vert color fix in new subdivide, Please check UV and Vertcolor with new subdivide.
Was checking for a condition < 0 should have been > 1
This commit is contained in:
@@ -1227,9 +1227,8 @@ static void set_uv_vcol(EditFace *efa, float *co, float *uv, char *col)
|
||||
|
||||
/* interpolate */
|
||||
l= 1.0+u+v;
|
||||
|
||||
/* outside triangle? */
|
||||
if(efa->v4 && l < 0.0) {
|
||||
if(efa->v4 && l > 1.0) {
|
||||
/* do it all over, but now with vertex 2 replaced with 4 */
|
||||
|
||||
/* calculate u and v */
|
||||
@@ -1263,7 +1262,8 @@ static void set_uv_vcol(EditFace *efa, float *co, float *uv, char *col)
|
||||
fac= (int)(l*cp2[i] - u*cp0[i] - v*cp1[i]);
|
||||
col[i]= CLAMPIS(fac, 0, 255);
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
|
||||
//new = l*vertex3_val - u*vertex1_val - v*vertex2_val;
|
||||
uv[0] = (l*efa->tf.uv[2][0] - u*efa->tf.uv[0][0] - v*efa->tf.uv[1][0]);
|
||||
uv[1] = (l*efa->tf.uv[2][1] - u*efa->tf.uv[0][1] - v*efa->tf.uv[1][1]);
|
||||
|
||||
Reference in New Issue
Block a user