Texture Paint: prevent normal angle masking duplicating backface culling.
If backface culling is off, the user obviously wants to paint on back faces, so the normal angle cutoff designed to prevent painting at glancing angles shouldn't do the culling as a side effect.
This commit is contained in:
parent
4c3ed98ca2
commit
3135ed376b
|
@ -1461,6 +1461,11 @@ static float project_paint_uvpixel_mask(
|
|||
angle_cos = dot_v3v3(viewDirPersp, no);
|
||||
}
|
||||
|
||||
/* If backface culling is disabled, allow painting on back faces. */
|
||||
if (!ps->do_backfacecull) {
|
||||
angle_cos = fabsf(angle_cos);
|
||||
}
|
||||
|
||||
if (angle_cos <= ps->normal_angle__cos) {
|
||||
return 0.0f; /* outsize the normal limit*/
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue