Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image_proj.c
| Context not available. | |||||
| /* now rgba_ub contains the edge result, but this should be converted to luminance to avoid | /* now rgba_ub contains the edge result, but this should be converted to luminance to avoid | ||||
| * colored speckles appearing in final image, and also to check for threshold */ | * colored speckles appearing in final image, and also to check for threshold */ | ||||
| rgba[0] = rgba[1] = rgba[2] = rgb_to_grayscale(rgba); | rgba[0] = rgba[1] = rgba[2] = IMB_colormanagement_get_luminance(rgba); | ||||
| if (fabsf(rgba[0]) > ps->brush->sharp_threshold) { | if (fabsf(rgba[0]) > ps->brush->sharp_threshold) { | ||||
| float alpha = projPixel->pixel.f_pt[3]; | float alpha = projPixel->pixel.f_pt[3]; | ||||
| projPixel->pixel.f_pt[3] = rgba[3] = mask; | projPixel->pixel.f_pt[3] = rgba[3] = mask; | ||||
| Context not available. | |||||
| sub_v3_v3v3(rgba, rgba_pixel, rgba); | sub_v3_v3v3(rgba, rgba_pixel, rgba); | ||||
| /* now rgba_ub contains the edge result, but this should be converted to luminance to avoid | /* now rgba_ub contains the edge result, but this should be converted to luminance to avoid | ||||
| * colored speckles appearing in final image, and also to check for threshold */ | * colored speckles appearing in final image, and also to check for threshold */ | ||||
| rgba[0] = rgba[1] = rgba[2] = rgb_to_grayscale(rgba); | rgba[0] = rgba[1] = rgba[2] = IMB_colormanagement_get_luminance(rgba); | ||||
| if (fabsf(rgba[0]) > ps->brush->sharp_threshold) { | if (fabsf(rgba[0]) > ps->brush->sharp_threshold) { | ||||
| float alpha = rgba_pixel[3]; | float alpha = rgba_pixel[3]; | ||||
| rgba[3] = rgba_pixel[3] = mask; | rgba[3] = rgba_pixel[3] = mask; | ||||
| Context not available. | |||||