#! C:/Program Files/Nuke6.1v1/Nuke6.1.exe -nx version 6.1 v1 Gizmo { help "ourOptimizedAnaglyph 0.3\n\nreplaces r by a weighted portion of g and b.\nr=pow(((g*weight)+(b*(1-weight)), gamma)*multiplier\n\n\ndocumentation\n\ngamma r\ngamma control for red channel\n\nf stops r\nexposure control for red channel\n\ngamma gb \ngamma control for green and blue channel\n\nf stops gb\nexposure control for green and blue channel\n\nf stops all\nglobal exposure control for all channels\n\nsaturation\nadjusts saturation\n\nhorizontal offset\ncontrols the screen plane according to the horizontal image offset\n\nblack outside\nsets the undefined pixels on left/right side to black\n\nsRGB\napplies a lin to sRGB curve to the rendered output\n\nalpha (mix-max)\nblends between a 50 percent mix or a max of inputs' left/right alphas" addUserKnob {20 ourOptimizedAnaglyph} addUserKnob {7 gamma_r l "gamma r" R 0 5} gamma_r 1.5 addUserKnob {7 fstops_r l "f stops r" R -3 3} addUserKnob {7 WeightGreen l "weight gb"} WeightGreen 0.7 addUserKnob {7 fstops_gb l "f stops gb" R -3 3} addUserKnob {7 multiplier l "f stops all" R -3 3} addUserKnob {26 ""} addUserKnob {7 saturation} saturation 1 addUserKnob {7 h_off l "horizontal offset" R -100 100} addUserKnob {6 blackOutside l "black outside" +STARTLINE} addUserKnob {6 sRGB +STARTLINE} sRGB true addUserKnob {7 alpha l "alpha (mix-max)"} addUserKnob {20 info} addUserKnob {26 history T "0.3 added 'alpha (mix-max)'\n0.2 initial release"} } Input { inputs 0 name Input1 xpos -242 ypos -195 } Saturation { saturation {{parent.saturation i}} name Saturation1 xpos -242 ypos -162 } set N5ce3730 [stack 0] OneView { name OneView1 label left xpos -287 ypos -96 } Transform { translate {{-parent.h_off.left*0.5 i} 0} center {1024 778} black_outside {{parent.blackOutside i}} name Transform1 xpos -287 ypos -58 } push $N5ce3730 OneView { view right name OneView2 label right xpos -196 ypos -97 } Transform { translate {{parent.h_off.left*0.5 i} 0} center {1024 778} black_outside {{parent.blackOutside i}} name Transform2 xpos -196 ypos -59 } MergeExpression { inputs 2 expr0 "pow((Ag*parent.WeightGreen+Ab*(1-parent.WeightGreen)), 1/parent.gamma_r)*pow(2, parent.multiplier)*pow(2, fstops_r)" expr1 "Bg*pow(2, parent.fstops_gb)*pow(2, parent.multiplier)" expr2 "Bb*pow(2, parent.fstops_gb)*pow(2, parent.multiplier)" channel3 rgba expr3 "(max(Aa,Ba)*parent.alpha) + (((Aa+Ba)/2)*(1-parent.alpha))" name MergeExpression1 xpos -241 ypos 3 } Expression { expr0 parent.sRGB>0?toSRGB(r):r expr1 parent.sRGB>0?toSRGB(g):g expr2 parent.sRGB>0?toSRGB(b):b name Expression1 xpos -241 ypos 29 } Output { name Output1 xpos -241 ypos 80 } end_group