Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_FilterNode.cpp
| Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | case CMP_FILT_SOFT: | ||||
| operation = new ConvolutionFilterOperation(); | operation = new ConvolutionFilterOperation(); | ||||
| operation->set3x3Filter(1 / 16.0f, 2 / 16.0f, 1 / 16.0f, 2 / 16.0f, 4 / 16.0f, 2 / 16.0f, 1 / 16.0f, 2 / 16.0f, 1 / 16.0f); | operation->set3x3Filter(1 / 16.0f, 2 / 16.0f, 1 / 16.0f, 2 / 16.0f, 4 / 16.0f, 2 / 16.0f, 1 / 16.0f, 2 / 16.0f, 1 / 16.0f); | ||||
| break; | break; | ||||
| case CMP_FILT_SHARP: | case CMP_FILT_SHARP: | ||||
| operation = new ConvolutionFilterOperation(); | operation = new ConvolutionFilterOperation(); | ||||
| operation->set3x3Filter(-1, -1, -1, -1, 9, -1, -1, -1, -1); | operation->set3x3Filter(-1, -1, -1, -1, 9, -1, -1, -1, -1); | ||||
| break; | break; | ||||
| case CMP_FILT_LAPLACE: | case CMP_FILT_LAPLACE: | ||||
| operation = new ConvolutionFilterOperation(); | operation = new ConvolutionEdgeFilterOperation(); | ||||
| operation->set3x3Filter(-1 / 8.0f, -1 / 8.0f, -1 / 8.0f, -1 / 8.0f, 1.0f, -1 / 8.0f, -1 / 8.0f, -1 / 8.0f, -1 / 8.0f); | operation->set3x3Filter(-1 / 8.0f, -1 / 8.0f, -1 / 8.0f, -1 / 8.0f, 1.0f, -1 / 8.0f, -1 / 8.0f, -1 / 8.0f, -1 / 8.0f); | ||||
| break; | break; | ||||
| case CMP_FILT_SOBEL: | case CMP_FILT_SOBEL: | ||||
| operation = new ConvolutionEdgeFilterOperation(); | operation = new ConvolutionEdgeFilterOperation(); | ||||
| operation->set3x3Filter(1, 2, 1, 0, 0, 0, -1, -2, -1); | operation->set3x3Filter(1, 2, 1, 0, 0, 0, -1, -2, -1); | ||||
| break; | break; | ||||
| case CMP_FILT_PREWITT: | case CMP_FILT_PREWITT: | ||||
| operation = new ConvolutionEdgeFilterOperation(); | operation = new ConvolutionEdgeFilterOperation(); | ||||
| Show All 23 Lines | |||||