Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_colorbalance.cc
| Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | for (int c = 0; c < 3; c++) { | ||||
| n->lift[c] = (d != 0.0f ? n->slope[c] + 2.0f * n->offset[c] / d : 0.0f); | n->lift[c] = (d != 0.0f ? n->slope[c] + 2.0f * n->offset[c] / d : 0.0f); | ||||
| n->gain[c] = d; | n->gain[c] = d; | ||||
| n->gamma[c] = (n->power[c] != 0.0f) ? 1.0f / n->power[c] : 1000000.0f; | n->gamma[c] = (n->power[c] != 0.0f) ? 1.0f / n->power[c] : 1000000.0f; | ||||
| } | } | ||||
| } | } | ||||
| static void node_composit_init_colorbalance(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_colorbalance(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodeColorBalance *n = MEM_cnew<NodeColorBalance>(__func__); | NodeColorBalance *n = MEM_cnew<NodeColorBalance>(MEM_AT); | ||||
| n->lift[0] = n->lift[1] = n->lift[2] = 1.0f; | n->lift[0] = n->lift[1] = n->lift[2] = 1.0f; | ||||
| n->gamma[0] = n->gamma[1] = n->gamma[2] = 1.0f; | n->gamma[0] = n->gamma[1] = n->gamma[2] = 1.0f; | ||||
| n->gain[0] = n->gain[1] = n->gain[2] = 1.0f; | n->gain[0] = n->gain[1] = n->gain[2] = 1.0f; | ||||
| n->slope[0] = n->slope[1] = n->slope[2] = 1.0f; | n->slope[0] = n->slope[1] = n->slope[2] = 1.0f; | ||||
| n->offset[0] = n->offset[1] = n->offset[2] = 0.0f; | n->offset[0] = n->offset[1] = n->offset[2] = 0.0f; | ||||
| n->power[0] = n->power[1] = n->power[2] = 1.0f; | n->power[0] = n->power[1] = n->power[2] = 1.0f; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||