INDX INDEX_SECTIONgQ quantico::Cop/sd_flood_fill::1.0gQ-quantico::Cop/sd_flood_fill_to_bbox_size::1.0g{gQ)quantico::Cop/sd_flood_fill_to_color::1.0hgQ,quantico::Cop/sd_flood_fill_to_gradient::1.0qgQ)quantico::Cop/sd_flood_fill_to_index::1.0igQ,quantico::Cop/sd_flood_fill_to_position::1.0kgQ0quantico::Cop/sd_flood_fill_to_random_color::1.0l(gQquantico::sd_flood_fill::1.0 Flood FillHoplib:/quantico::Cop/sd_flood_fill::1.0?quantico::Cop/sd_flood_fill::1.01opdef:/quantico::Cop/sd_flood_fill::1.0?IconImageCopvisibleoutputs=2 gQ)quantico::sd_flood_fill_to_bbox_size::1.0Flood Fill to BBox Sizeboplib:/quantico::Cop/sd_flood_fill_to_bbox_size::1.0?quantico::Cop/sd_flood_fill_to_bbox_size::1.0>opdef:/quantico::Cop/sd_flood_fill_to_bbox_size::1.0?IconImageCopgQ%quantico::sd_flood_fill_to_color::1.0Flood Fill to ColorZoplib:/quantico::Cop/sd_flood_fill_to_color::1.0?quantico::Cop/sd_flood_fill_to_color::1.0:opdef:/quantico::Cop/sd_flood_fill_to_color::1.0?IconImageCopgQ(quantico::sd_flood_fill_to_gradient::1.0Flood Fill to Gradient`oplib:/quantico::Cop/sd_flood_fill_to_gradient::1.0?quantico::Cop/sd_flood_fill_to_gradient::1.0=opdef:/quantico::Cop/sd_flood_fill_to_gradient::1.0?IconImageCopgQ%quantico::sd_flood_fill_to_index::1.0Flood Fill to IndexZoplib:/quantico::Cop/sd_flood_fill_to_index::1.0?quantico::Cop/sd_flood_fill_to_index::1.0:opdef:/quantico::Cop/sd_flood_fill_to_index::1.0?IconImageCopvisibleoutputs=2 gQ(quantico::sd_flood_fill_to_position::1.0Flood Fill to Position`oplib:/quantico::Cop/sd_flood_fill_to_position::1.0?quantico::Cop/sd_flood_fill_to_position::1.0=opdef:/quantico::Cop/sd_flood_fill_to_position::1.0?IconImageCopgQ,quantico::sd_flood_fill_to_random_color::1.0Flood Fill to Random Colorhoplib:/quantico::Cop/sd_flood_fill_to_random_color::1.0?quantico::Cop/sd_flood_fill_to_random_color::1.0Aopdef:/quantico::Cop/sd_flood_fill_to_random_color::1.0?IconImageCopgQINDX DialogScriptgM CreateScriptNgM InternalFileOptions0gM Contents.gz3QgM TypePropertiesOptions.gM HelpgM Tools.shelfgM IconImage!?gQExtraFileOptionsafgM Contentsaj2gQ# Dialog script for quantico::sd_flood_fill::1.0 automatically generated { name quantico::sd_flood_fill::1.0 script quantico::flood_fill::1.2 label "SD Flood Fill" input input1 src output output1 flood_fill output output2 special_shape_infos signature default Default { Mono } { RGBA RGBA } help { "" } parm { name "threshold" label "Threshold" type float default { "0.5" } help "Areas of the image where the mask value is higher than this value will be filled." range { 0! 1! } parmtag { "script_callback_language" "python" } } parm { name "profile" label "Safety/Speed trade-off" type ordinal default { "70" } menu usetokenvalue { "40" "Simple or small shapes" "70" "Complex or big shapes" "100" "No failure mode" } parmtag { "script_callback_language" "python" } } parm { name "advanced" label "Show Advanced options" type toggle default { "0" } parmtag { "script_callback_language" "python" } } parm { name "profileOverride" label "Override Safety/Speed trade-off" type integer default { "-1" } hidewhen "{ advanced == 0 }" range { -1 100 } parmtag { "script_callback_language" "python" } } } # Automatically generated script \set noalias = 1 # # Creation script for quantico::sd_flood_fill::1.0 operator # if ( "$arg1" == "" ) then echo This script is intended as a creation script exit endif # Node $arg1 (quantico::Cop/sd_flood_fill::1.0) opexprlanguage -s hscript $arg1 opuserdata -n '___Version___' -v '' $arg1  nodeconntype nodeparmtype=ks䶑/'VOqť%.^$Am(r\.''5Zɐhw'dYpFl4 @7 ABLnAӢ MXN{b$uh=x[رWO8׃(d=pQi0)ҡ{%2O ~ mb>=-x?pZD9X,$΂<#@ntÄQ$R%tvqQh12F|8On&؄5PVS,[hqw MQd0VÒzt}^.lj(bgyT?0 "CZmf{nzD1Q3(ӛ4@D1?q~\śB ,nUv "?zp`F.Dx |fS&W`ףF_Bڢ &c}4Ly@Iy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`A b*Mx˸yȻӔD9?EIVpģry:`b|h(3AZc`UJW\YaPPcddfhNQ`qnheioqfRJCCK\_`]H@GYcYMB3C\pbTNR`dfgc;!`bx?uyU3=`/Fb-Qx}gPVЁnsШww_Ebm)`A b*:UuزǩynͰp]effflmsS4Mvv5`b|h3BIQ^]OLX`^QJUjfejjB6B\nplgjoiWACPajljhh`O=HEDE??KacaZRXX[_Q;)`bx?uyU3>`/Fb-S|loOko{ċOOǥRI]ͨcAWwmA?hQ'`A b*1AVnSb¬r^]iqssrpk`S]VI:/7Khg8`b|h,%+99=FFEA;8EIAA?== 0.5f) res.xy = (float2)(-1.0f/@xres, 0.0f); else res.xy = bestVal; res.zw = (float2)(@src2.z, 1.0f); @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 2 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( src1 ) input1_type [ 0 locks=0 ] ( "floatn" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "floatn" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( src2 ) input2_type [ 0 locks=0 ] ( "floatn" ) input2_optional [ 0 locks=0 ] ( "off" ) } HouLC1033600b8306751bd830a226a255hdaroot/flood_fill_step_b_preprocess.userdata ___Version___20.5.410HouLC1033600bb106751bd830c14ad5e2hdaroot/flood_fill_out.inittype = opencl matchesdef = 1 HouLC1033600bb606751bd830a31e0274hdaroot/flood_fill_out.defcomment "" position 21.556 2.57874 connectornextid 4 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 3 "output1" } inputsNamed3 { 0 (__dot2) "" 1 "input1" 1 (__dot4) "" 1 "input2" 2 step_b_pointers 2 1 "input3" } inputs { 0 (__dot2) 0 1 1 (__dot4) 0 1 2 step_b_pointers 0 1 } stat { create 1730636610 modify 1732358335 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb106751bd830c6684a7ehdaroot/flood_fill_out.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer msk? float val=0 #bind layer src1? val=0 #bind layer src2? val=0 #bind layer !&dst @KERNEL { float2 pixSize = (float2)(-1.0f/@xres, -1.0f/@yres); float2 pixSize2 = (float2)(0.5f/@xres, 0.5f/@yres); float2 pos = fma(@P.xy, 0.5f, 0.5f); float4 val1 = @src1.textureNearest(pos+@src2.xy); float4 val2 = @src2.textureNearest(pos+@src2.xy); float4 res = (float4)(0.0f, 0.0f, 0.0f, 0.0f); if (1.0f-@msk) { if (fabs(val2.x) < pixSize2.x && fabs(val2.y) < pixSize2.y) { res.xy = fma(@src2.xy, 0.5f, val1.xy-0.5f)/fmin(pixSize, val1.xy-val1.zw); res.zw = -2.0f*fmin(pixSize, val1.xy-val1.zw); } else res = (float4)(pos, 1.0f, 1.0f); } @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 3 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( msk ) input1_type [ 0 locks=0 ] ( "float" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "floatn" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( src1 ) input2_type [ 0 locks=0 ] ( "floatn" ) input2_optional [ 0 locks=0 ] ( "on" ) input3_name [ 0 locks=0 ] ( src2 ) input3_type [ 0 locks=0 ] ( "floatn" ) input3_optional [ 0 locks=0 ] ( "on" ) } HouLC1033600b8d06751bd83001fa0197hdaroot/flood_fill_out.userdata ___Version___20.5.410HouLC1033600b8806751bd8304be2b7dahdaroot/special_shape_infos_out.inittype = opencl matchesdef = 1 HouLC1033600b8906751bd8303cefc8f5hdaroot/special_shape_infos_out.defcomment "" position 21.6658 -0.233241 connectornextid 4 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 3 "output1" } inputsNamed3 { 0 step_b_pointers 2 1 "input1" 1 (__dot6) "" 1 "input2" 2 (__dot3) "" 1 "input3" } inputs { 0 step_b_pointers 0 1 1 (__dot6) 0 1 2 (__dot3) 0 1 } stat { create 1730636610 modify 1732358417 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8806751bd8302d0e939bhdaroot/special_shape_infos_out.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer src1? val=0 #bind layer src2? val=0 #bind layer msk? float val=0 #bind layer !&dst @KERNEL { float2 pixSize2 = (float2)(0.5f/@xres, 0.5f/@yres); float2 pos = fma(@P.xy, 0.5f, 0.5f); float4 val = @src2.textureNearest(pos+@src2.xy); float4 res; float2 iptr; res.xy = fract(pos+@src1.xy, &iptr); if (@src2.z >= 0.5f) { if (fabs(val.x) < pixSize2.x && fabs(val.y) < pixSize2.y) res.z = 1.0f; else res.z = 0.5f; } else res.z = 0.0f; res.w = 1.0f-@msk; @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 3 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( src1 ) input1_type [ 0 locks=0 ] ( "floatn" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "floatn" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( src2 ) input2_type [ 0 locks=0 ] ( "floatn" ) input2_optional [ 0 locks=0 ] ( "on" ) input3_name [ 0 locks=0 ] ( msk ) input3_type [ 0 locks=0 ] ( "float" ) input3_optional [ 0 locks=0 ] ( "on" ) } HouLC1033600b8406751bd830d4e9277ehdaroot/special_shape_infos_out.userdata ___Version___20.5.410HouLC1033600bb206751bd8306072c98dhdaroot/flood_fill_step_0.inittype = opencl matchesdef = 1 HouLC1033600bb306751bd830da3c4c73hdaroot/flood_fill_step_0.defcomment "" position -0.045843 1.26097 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 create_mask 1 1 "input1" } inputs { 0 create_mask 0 1 } stat { create 1730624840 modify 1732356853 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb206751bd830a21deabahdaroot/flood_fill_step_0.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer src? float val=0 #bind layer !&dst @KERNEL { bool bN1, bN2, bN3, bN4; bN1 = @src.bufferIndex((int2)(@ix, @iy-1)); bN2 = @src.bufferIndex((int2)(@ix-1, @iy)); bN3 = @src.bufferIndex((int2)(@ix-1, @iy-1)); bN4 = @src.bufferIndex(@ixy); // Not All Same bool val1 = (bN1 && bN2 && bN3 && bN4) || !(bN1 || bN2 || bN3 || bN4); bool val2 = (bN1 && bN2) || (bN3 && bN4 && (bN1 || bN2)); float2 res1; if (!bN1 && bN3) res1 = (float2)(0.0f, -1.0f); else { if (!bN2 && bN4) res1 = (float2)(0.0f, 1.0f); else { if (!bN4 && bN1) res1 = (float2)(1.0f, 0.0f); else res1 = (float2)(-1.0f, 0.0f); } } float2 p1, p2; float2 pos = fma(@P.xy, 0.5f, 0.5f); float2 pixSize = (float2)(1.0f/@xres, 1.0f/@yres); p1 = res1 * pixSize; p2 = (float2)(-res1.y, res1.x) * pixSize; float2 p1Coord = fma(p1+p2-pixSize, 0.5f, pos); bool bP1 = 1.0f-@src.textureNearest(p1Coord+(p1-p2)); bool bP2 = @src.textureNearest(p1Coord+p1); bool bP3 = 1.0f-@src.textureNearest(p1Coord+p1+p2); bool bP4 = @src.textureNearest(p1Coord+p2); bool bP5 = 1.0f-@src.textureNearest(p1Coord+(p2-p1)); float4 res; if (!val1 && bP1 && bP2) { if (bP3 && bP4) { if (val2 && bP5) res.xy = (float2)(0.0f, 0.0f); else res.xy = p2; } else res.xy = p1 + p2; } else res.xy = p1; if (!val1) { if (!bN1 && !bN2 && !bN3 && bN4) { res.zw = (float2)(1.0f, 1.0f); } else res.zw = (float2)(0.5f, 1.0f); } else res.zw = (float2)(0.0f, 1.0f); @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( src ) input1_type [ 0 locks=0 ] ( "float" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float4" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8e06751bd8300da817cbhdaroot/flood_fill_step_0.userdata ___Version___20.5.410HouLC1033600b8706751bd830b831205bhdaroot/flood_fill_step_a_preprocess.inittype = opencl matchesdef = 1 HouLC1033600b8406751bd830d469bd1chdaroot/flood_fill_step_a_preprocess.defcomment "" position 1.79412 3.72762 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 flood_fill_step_0 1 1 "input1" } inputs { 0 flood_fill_step_0 0 1 } stat { create 1730629702 modify 1732278425 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8706751bd830b0b40f68hdaroot/flood_fill_step_a_preprocess.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer src? val=0 #bind layer !&dst float2 choose_best(float2 a, float2 b, float2 pixSize2) { if (((a.x < b.x) && ((a.y-b.y) < pixSize2.y)) || ((a.y-b.y) < -pixSize2.y)) return a; else return b; } @KERNEL { float4 pixVal = @src.textureNearest(fma(@P.xy, 0.5f, 0.5f)+@src.xy); float4 res; res.xy = @src.xy+pixVal.xy; res.zw = choose_best(res.xy, @src.xy, (float2)(0.5f/@xres, 0.5f/@yres)); @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( src ) input1_type [ 0 locks=0 ] ( "floatn" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "floatn" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8306751bd830c4342b96hdaroot/flood_fill_step_a_preprocess.userdata ___Version___20.5.410HouLC1033600bb906751bd8308d79f2a3hdaroot/params.inittype = null matchesdef = 1 HouLC1033600bbe06751bd8303707fd9chdaroot/params.defcomment "" position -6.56485 1.33597 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 inputs 0 1 "input1" } inputs { 0 inputs 0 1 } stat { create 1731575527 modify 1733159177 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb106751bd830272c5bd2hdaroot/params.spareparmdef parm { name "nbIter" label "nbIter" type integer default { "0" } range { 0 10 } parmtag { "script_callback_language" "python" } } parm { name "nbIter2" label "nbIter2" type integer default { "0" } range { 0 10 } parmtag { "script_callback_language" "python" } } parm { name "step_a_iterations" label "Step A Iterations" type integer default { "0" } range { 0 10 } parmtag { "script_callback_language" "python" } } parm { name "step_b_iterations" label "Step B Iterations" type integer default { "0" } range { 0 10 } parmtag { "script_callback_language" "python" } } multiparm { name "outputs" label "Outputs" baseparm invisible default 0 parm { name "outputname#" baseparm label "Output #" export none } } HouLC1033600bbe06751bd830721e7da7hdaroot/params.chn{ channel nbIter { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = "max(ceil(if(ch(\"../profileOverride\") == -1, ch(\"../profile\"), ch(\"../profileOverride\"))*0.01*20)-7, 0)" } } channel nbIter2 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = "max(ceil(if(ch(\"../profileOverride\") == -1, ch(\"../profile\"), ch(\"../profileOverride\"))*0.08)-1, 0)" } } channel step_a_iterations { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = "6+if(ch(\"./nbIter\") >= 16, 8, 0)+if(ch(\"./nbIter\") >= 8, 8, 0)+if(ch(\"./nbIter\") % 8 >= 4, 4, 0)+if(ch(\"./nbIter\") % 4 >= 2, 2, 0)+if(ch(\"./nbIter\") % 2 >= 1, 1, 0)" } } channel step_b_iterations { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = "1+if(ch(\"./nbIter2\") >= 4, 4, 0)+if(ch(\"./nbIter2\") % 4 >= 2, 2, 0)+(ch(\"./nbIter2\") % 2 >= 1)" } } } HouLC1033600bb906751bd830bb7ce766hdaroot/params.parm{ version 0.8 outputs [ 0 locks=0 ] ( 1 ) nbIter [ 8 locks=0 ] ( [ nbIter 0 ] ) nbIter2 [ 8 locks=0 ] ( [ nbIter2 0 ] ) step_a_iterations [ 8 locks=0 ] ( [ step_a_iterations 0 ] ) step_b_iterations [ 8 locks=0 ] ( [ step_b_iterations 0 ] ) outputname1 [ 0 locks=0 ] ( "" ) } HouLC1033600bb506751bd8304cc72c11hdaroot/params.userdata ___Version___20.5.410HouLC1033600bb406751bd830a3a66853hdaroot/create_mask.inittype = opencl matchesdef = 1 HouLC1033600bb506751bd830841c71b1hdaroot/create_mask.defcomment "" position -4.28681 1.33597 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 params 1 1 "input1" } inputs { 0 params 0 1 } stat { create 1731583037 modify 1733158943 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb506751bd8307fb44226hdaroot/create_mask.chn{ channel bindings1_fval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../threshold\") } } } HouLC1033600bb406751bd830cb496927hdaroot/create_mask.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer src? val=0 #bind layer !&dst #bind parm threshold float val=0.5 @KERNEL { @dst.set(step(@src, @threshold)); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 1 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( src ) input1_type [ 0 locks=0 ] ( "float" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) stdswitcher0_1 [ 0 locks=0 ] ( 1 ) bindings1_name [ 0 locks=0 ] ( threshold ) bindings1_type [ 0 locks=0 ] ( "float" ) bindings1_rampsize [ 0 locks=0 ] ( 1024 ) bindings1_ramptype [ 0 locks=0 ] ( "float" ) bindings1_ramp [ 0 locks=0 ] ( 2 ) bindings1_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings1_layertype [ 0 locks=0 ] ( "float4" ) bindings1_layerborder [ 0 locks=0 ] ( "input" ) bindings1_portname [ 0 locks=0 ] ( "" ) bindings1_volume [ 0 locks=0 ] ( "" ) bindings1_forcealign [ 0 locks=0 ] ( "on" ) bindings1_resolution [ 0 locks=0 ] ( "off" ) bindings1_voxelsize [ 0 locks=0 ] ( "off" ) bindings1_xformtoworld [ 0 locks=0 ] ( "off" ) bindings1_xformtovoxel [ 0 locks=0 ] ( "off" ) bindings1_vdbtype [ 0 locks=0 ] ( "any" ) bindings1_attribute [ 0 locks=0 ] ( "" ) bindings1_attribclass [ 0 locks=0 ] ( "point" ) bindings1_attribtype [ 0 locks=0 ] ( "float" ) bindings1_attribsize [ 0 locks=0 ] ( 1 ) bindings1_precision [ 0 locks=0 ] ( "node" ) bindings1_readable [ 0 locks=0 ] ( "on" ) bindings1_writeable [ 0 locks=0 ] ( "off" ) bindings1_optional [ 0 locks=0 ] ( "off" ) bindings1_defval [ 0 locks=0 ] ( "off" ) bindings1_intval [ 0 locks=0 ] ( 0 ) bindings1_fval [ 8 locks=0 ] ( [ bindings1_fval 0 ] ) bindings1_v2val [ 0 locks=0 ] ( 0 0 ) bindings1_v3val [ 0 locks=0 ] ( 0 0 0 ) bindings1_v4val [ 0 locks=0 ] ( 0 0 0 0 ) bindings1_timescale [ 0 locks=0 ] ( "none" ) bindings1_ramp1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp1value [ 0 locks=0 ] ( 0 ) bindings1_ramp1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp2value [ 0 locks=0 ] ( 1 ) bindings1_ramp2interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp_rgb1c [ 0 locks=0 ] ( 0 0 0 ) bindings1_ramp_rgb1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp_rgb2c [ 0 locks=0 ] ( 1 1 1 ) bindings1_ramp_rgb2interp [ 0 locks=0 ] ( "linear" ) } HouLC1033600bb006751bd830eba0f35fhdaroot/create_mask.userdata ___Version___20.5.410HouLC1033600bb206751bd83048833d8ahdaroot/flood_fill_step_a.inittype = opencl matchesdef = 1 HouLC1033600bb306751bd8306866cd9bhdaroot/flood_fill_step_a.defcomment "" position 5.41618 3.80356 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" 3 "output2" 4 "output3" 5 "output4" } inputsNamed3 { 0 flood_fill_step_a_preprocess 1 1 "input1" } inputs { 0 flood_fill_step_a_preprocess 0 1 } stat { create 1730632199 modify 1733158943 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb306751bd83021d43506hdaroot/flood_fill_step_a.chn{ channel options_iterations { lefttype = extend righttype = extend default = 14 flags = 0 segment { length = 0 value = 14 14 expr = ch(\"../params/step_a_iterations\") } } } HouLC1033600bb206751bd83046a5dd1ahdaroot/flood_fill_step_a.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer in_pointers? val=0 #bind layer pointers read write #bind layer best read write #bind layer pointers_temp read write #bind layer best_temp read write float2 choose_best(float2 a, float2 b, float2 pixSize2) { if (((a.x < b.x) && ((a.y-b.y) < pixSize2.y)) || ((a.y-b.y) < -pixSize2.y)) return a; else return b; } @KERNEL { float2 pixSize2 = (float2)(0.5f/@xres, 0.5f/@yres); float2 pos = fma(@P.xy, 0.5f, 0.5f); float4 pixPtr, pixVal, pixBestVal, res; if (@Iteration == 0) { pixPtr = @in_pointers; pixVal = @in_pointers.textureNearest(pos+pixPtr.xy); } else { if (@Iteration % 2 == 1) { pixPtr = @pointers; pixVal = @pointers.textureNearest(pos+pixPtr.xy); } else { pixPtr = @pointers_temp; pixVal = @pointers_temp.textureNearest(pos+pixPtr.xy); } } res.xy = pixPtr.xy+pixVal.xy; res.zw = choose_best(pixPtr.xy+pixVal.zw, pixPtr.zw, pixSize2); if (@Iteration % 2 == 1) @pointers_temp.set(res); else @pointers.set(res); pixPtr.zw = pixPtr.xy; if (@Iteration == 0) { pixVal = fma(pixPtr, 0.5f, 0.5f); pixBestVal = 0.5f; } else { if (@Iteration % 2 == 1) { pixVal = fma(pixPtr, 0.5f, @best.textureNearest(pos+pixPtr.xy)); pixBestVal = @best; } else { pixVal = fma(pixPtr, 0.5f, @best_temp.textureNearest(pos+pixPtr.xy)); pixBestVal = @best_temp; } } res = (float4)(fmin(pixVal.xy, pixBestVal.xy), fmax(pixVal.zw, pixBestVal.zw)); if (@Iteration % 2 == 1) @best_temp.set(res); else @best.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 8 locks=0 ] ( [ options_iterations 1 ] ) options_iteration [ 0 locks=0 ] ( "on" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 4 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( in_pointers ) input1_type [ 0 locks=0 ] ( "float4" ) input1_optional [ 0 locks=0 ] ( "off" ) output1_name [ 0 locks=0 ] ( pointers ) output1_type [ 0 locks=0 ] ( "float4" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) output2_name [ 0 locks=0 ] ( best ) output2_type [ 0 locks=0 ] ( "float4" ) output2_metadata [ 0 locks=0 ] ( "first" ) output2_precision [ 0 locks=0 ] ( "node" ) output2_typeinfo [ 0 locks=0 ] ( "node" ) output2_metaname [ 0 locks=0 ] ( "" ) output3_name [ 0 locks=0 ] ( pointers_temp ) output3_type [ 0 locks=0 ] ( "float4" ) output3_metadata [ 0 locks=0 ] ( "first" ) output3_precision [ 0 locks=0 ] ( "node" ) output3_typeinfo [ 0 locks=0 ] ( "node" ) output3_metaname [ 0 locks=0 ] ( "" ) output4_name [ 0 locks=0 ] ( best_temp ) output4_type [ 0 locks=0 ] ( "float4" ) output4_metadata [ 0 locks=0 ] ( "first" ) output4_precision [ 0 locks=0 ] ( "node" ) output4_typeinfo [ 0 locks=0 ] ( "node" ) output4_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8c06751bd83019b9bb0bhdaroot/flood_fill_step_a.netbox__netbox2 HouLC1033600b8e06751bd8301391627fhdaroot/flood_fill_step_a.userdata ___Version___20.5.410HouLC1033600bb006751bd830b32b1216hdaroot/step_a_pointers.inittype = switch matchesdef = 1 HouLC1033600bb106751bd830b20e7c99hdaroot/step_a_pointers.defcomment "" position 8.21528 2.54542 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 2 "chosen" } inputsNamed3 { 0 flood_fill_step_a 1 1 "input1" 1 flood_fill_step_a 4 1 "input2" } inputs { 0 flood_fill_step_a 0 1 1 flood_fill_step_a 2 1 } stat { create 1730644062 modify 1733158943 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb106751bd830bdcb2da1hdaroot/step_a_pointers.chn{ channel input { lefttype = extend righttype = extend default = 1 flags = 0 segment { length = 0 value = 1 1 expr = "ch(\"../params/step_a_iterations\") % 2 == 0" } } } HouLC1033600bb006751bd8302ab4e5d4hdaroot/step_a_pointers.parm{ version 0.8 input [ 8 locks=0 ] ( [ input 0 ] ) } HouLC1033600bb206751bd83076e5da3ehdaroot/step_a_pointers.netbox__netbox2 HouLC1033600b8c06751bd830f39d9416hdaroot/step_a_pointers.userdata ___Version___20.5.410HouLC1033600bb406751bd830c8a36b4bhdaroot/step_a_best.inittype = switch matchesdef = 1 HouLC1033600bb506751bd830ba2b8e82hdaroot/step_a_best.defcomment "" position 8.21528 4.93164 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 2 "chosen" } inputsNamed3 { 0 flood_fill_step_a 3 1 "input1" 1 flood_fill_step_a 5 1 "input2" } inputs { 0 flood_fill_step_a 1 1 1 flood_fill_step_a 3 1 } stat { create 1730644062 modify 1733158943 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb506751bd8308c07b680hdaroot/step_a_best.chn{ channel input { lefttype = extend righttype = extend default = 1 flags = 0 segment { length = 0 value = 1 1 expr = "ch(\"../params/step_a_iterations\") % 2 == 0" } } } HouLC1033600bb406751bd83088de2c48hdaroot/step_a_best.parm{ version 0.8 input [ 8 locks=0 ] ( [ input 0 ] ) } HouLC1033600bb606751bd8307b482cb7hdaroot/step_a_best.netbox__netbox2 HouLC1033600bb006751bd830225eab34hdaroot/step_a_best.userdata ___Version___20.5.410HouLC1033600bb206751bd8303107d039hdaroot/flood_fill_step_b.inittype = opencl matchesdef = 1 HouLC1033600bb306751bd830cdaf940ehdaroot/flood_fill_step_b.defcomment "" position 15.2505 1.4869 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" 2 "output2" } inputsNamed3 { 0 flood_fill_step_b_preprocess 2 1 "input1" } inputs { 0 flood_fill_step_b_preprocess 0 1 } stat { create 1730636610 modify 1733158943 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb306751bd8307b4cfc8chdaroot/flood_fill_step_b.chn{ channel options_iterations { lefttype = extend righttype = extend default = 1 flags = 0 segment { length = 0 value = 1 1 expr = ch(\"../params/step_b_iterations\") } } } HouLC1033600bb206751bd830e09003b7hdaroot/flood_fill_step_b.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer in_pointers? val=0 #bind layer pointers read write #bind layer pointers_temp read write @KERNEL { float2 pos = fma(@P.xy, 0.5f, 0.5f); float4 val1, val2, res; if (@Iteration == 0) { val1 = @in_pointers; val2 = @in_pointers.textureNearest(pos+val1.xy); } else { if (@Iteration % 2 == 1) { val1 = @pointers; val2 = @pointers.textureNearest(pos+val1.xy); } else { val1 = @pointers_temp; val2 = @pointers_temp.textureNearest(pos+val1.xy); } } res = (float4)(val1.xy+val2.xy, 0.0f, 1.0f); if (@Iteration == 0) @pointers.set(res); else { if (@Iteration % 2 == 1) @pointers_temp.set(res); else @pointers.set(res); } } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( [ options_iterations 1 ] ) options_iteration [ 0 locks=0 ] ( "on" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 2 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( in_pointers ) input1_type [ 0 locks=0 ] ( "floatn" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( pointers ) output1_type [ 0 locks=0 ] ( "floatn" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) output2_name [ 0 locks=0 ] ( pointers_temp ) output2_type [ 0 locks=0 ] ( "floatn" ) output2_metadata [ 0 locks=0 ] ( "first" ) output2_precision [ 0 locks=0 ] ( "node" ) output2_typeinfo [ 0 locks=0 ] ( "node" ) output2_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8c06751bd830f682bef5hdaroot/flood_fill_step_b.netbox__netbox1 HouLC1033600b8e06751bd830d6426221hdaroot/flood_fill_step_b.userdata ___Version___20.5.410HouLC1033600bb006751bd8302ac85c03hdaroot/step_b_pointers.inittype = switch matchesdef = 1 HouLC1033600bb106751bd8306d20896chdaroot/step_b_pointers.defcomment "" position 17.3155 1.5619 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 2 "chosen" } inputsNamed3 { 0 flood_fill_step_b 1 1 "input1" 1 flood_fill_step_b 2 1 "input2" } inputs { 0 flood_fill_step_b 0 1 1 flood_fill_step_b 1 1 } stat { create 1730645957 modify 1733158943 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb106751bd830358ee830hdaroot/step_b_pointers.chn{ channel input { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = "ch(\"../params/step_b_iterations\") % 2 == 0" } } } HouLC1033600bb006751bd8302e579dc8hdaroot/step_b_pointers.parm{ version 0.8 input [ 8 locks=0 ] ( [ input 0 ] ) } HouLC1033600bb206751bd83081dc6796hdaroot/step_b_pointers.netbox__netbox1 HouLC1033600b8c06751bd83044a4fa1dhdaroot/step_b_pointers.userdata ___Version___20.5.410HouLC1033600bb306751bd830808a97d6hdaroot/__dot1.networkdotinit{ "version":1, "posx":-0.793742854863155878, "posy":6.20008152760016529, "pinned":false, "color":"FROMOUTPUT", "input":"create_mask 0 1" } HouLC1033600bb306751bd830c5adacb9hdaroot/__dot2.networkdotinit{ "version":1, "posx":20.3897839120509126, "posy":6.39881973338490262, "pinned":false, "color":"FROMOUTPUT", "input":"(__dot1) 0 1" } HouLC1033600bb306751bd830cda8a818hdaroot/__dot3.networkdotinit{ "version":1, "posx":-0.793742854863155878, "posy":-1.98271041675701531, "pinned":false, "color":"FROMOUTPUT", "input":"create_mask 0 1" } HouLC1033600bb306751bd8303bb672e9hdaroot/__dot6.networkdotinit{ "version":1, "posx":13.2086282821127163, "posy":-1.24551568220901432, "pinned":false, "color":"FROMOUTPUT", "input":"flood_fill_step_b_preprocess 0 1" } HouLC1033600bb306751bd830b17008abhdaroot/__dot4.networkdotinit{ "version":1, "posx":19.7830185779911218, "posy":3.77645399339506005, "pinned":false, "color":"FROMOUTPUT", "input":"step_a_best 0 1" } HouLC1033600ba306751bd830da6bac07hdaroot.order14 inputs outputs flood_fill_step_b_preprocess flood_fill_out special_shape_infos_out flood_fill_step_0 flood_fill_step_a_preprocess params create_mask flood_fill_step_a step_a_pointers step_a_best flood_fill_step_b step_b_pointers HouLC1033600ba106751bd83019cf124ehdaroot.net1 HouLC1033600bb606751bd830f96ba020LIMITED_COMMERCIAL_FILE!!!INDX DialogScriptggM CreateScriptghgMInternalFileOptions0gM Contents.gzugMTypePropertiesOptions t.gMHelp gM Tools.shelf gM IconImage ?gQExtraFileOptionsM#gMContentsM')gQ# Dialog script for quantico::sd_flood_fill_to_bbox_size::1.0 automatically generated { name quantico::sd_flood_fill_to_bbox_size::1.0 script quantico::flood_fill_to_bbox_size::1.2 label "Flood Fill to BBox Size" input input1 flood_fill output output1 dst signature default Default { RGBA } { Mono } help { "" } parm { name "output" label "Output" type ordinal default { "0" } menu { "0" "max(X, Y)" "1" "X" "2" "Y" } parmtag { "script_callback_language" "python" } } } # Automatically generated script \set noalias = 1 # # Creation script for quantico::sd_flood_fill_to_bbox_size::1.0 operator # if ( "$arg1" == "" ) then echo This script is intended as a creation script exit endif # Node $arg1 (quantico::Cop/sd_flood_fill_to_bbox_size::1.0) opexprlanguage -s hscript $arg1 opuserdata -n '___Version___' -v '' $arg1  nodeconntype nodeparmtype[o65f]4xD*@uAhӡ؆m!PHAÂl^ ?/E}w8/f~r-DˆR1aFĞW96;)N)h&ym2N;?缴0LtnLt5IEdCCVT#GC(Hx=T(Ti繕i2,.f@W|ڀ#r#5(TyWrnUWتJ5? yś+ʬeVTuWeYMgy.b)-*UJ䦖Jyn)ZTQ-TgJfbh'[UKm5 /${fހ˭{ jծQBP#]J1L ީ?tm] noqWxlJ7ΪSy9>RܐҐ\0oT8I&3e$|96~o8x^j}oϖжWFiHQ^aYB? ;~E_˵]ˏɭx}yܹ!DI.Fvm dyu\z׶ScppF@#1 C?Gl#Y,]~E[<,Z4: ƚW" p?bBop&}@^: f'ƅ zA8vmx 622XGe#aW_$| 4oyk^ :g! `0wx!/x݆!LNjI䬯ӎuaHq@"ʹ&k5yवJs [39p ޼iCR4廭a;]M ormkWW6^<u<mk‘Vڧ[/K!MrQŔcQ x3ILo#-͘MYG~||$Q݅roN3GwO^XX( תgZ JMA  6&5D"1ƼO  (J{vl #^܂O+7Өrj[jD[n7.Bo%n F {y!/j`@B:2N+>ȕKmu} +KeQ Wڦu|,pٍj?wÔ"LGkstlDy/rp_BHI6wO+yr!V[hj'ZqiwiH=[ƮF8XZ~s$E%F1&P8I_<ϒ>{o+.m9)CheckExternal := 1; ContentsCompressionType := 1; ForbidOutsideParms := 1; GzipContents := 1; LockContents := 1; MakeDefault := 1; ParmsFromVfl := 0; PrefixDroppedParmLabel := 0; PrefixDroppedParmName := 0; SaveCachedCode := 0; SaveIcon := 1; SaveSpareParms := 0; UnlockOnCreate := 0; UseDSParms := 1; COP $HDA_TABLE_AND_NAME SD/Flood Fill PIC2#Nnye53Created by Houdini14.0.321 [12/05/24 09:49:39]g^]www-datak1ehungaryr1~@@uF@Q=tX?!v82ThG_Cp_oeREgV2_p!rVȄgVΌ%bB7xd{qLr2pA6ac @v 0hjApIEWBA{dqIXA0sas'?uyU3`/Fbo?`bב?`PsbצY?`'TbCs?uyU3`/Fb-(14'$,:<;;;4.089877:50-50+*063*-6:98878:3/.140('/31120+19;878/`A b*(13'$,:;::;4/079877:50-4/+*063*-6:8877793/.240('/31120,18:878/`b|h(14'$,:<;;;4.089877:50-50+*064+.6:98878:4/-140('/31120+19;878/`bx?uyU3`/Fb-1>?6BP[[ZZ[WKFISWYYVJEJSMGELSJ6?6BP[[YZ[WKFISWYYVJEJSMGFLSJ6HIFGA6;O[\[N8`bx?uyU3`/Fb-6A>Joxqqrszm\PaousdSVimkjijl\AH`jeeeeflYLM\`S<3CT]VSK?Inxqqrrym\PaovtdSVimkjijl[@H`jeeeeglYLM\`S<3CT]WTL@Joxqqqszm\PbousdSWjmkjikl[@G`jeeeeflYLM\`S<3DU]WSK?94DPQORYbliWBWjpjhfefl]RR`P@75;DNY^bgmS=298.`A b*3AGex|wxusqrtusdM?94DPQNRYaliXBWjpjhfefl]RR_P@75;DOZ^bgmT=3:8.`b|h4AGex|wxusrqtusdM?94DPQOSYbliXBXkpjhfeel]RR_P@75;DOZ^agmT=2:9.`bx?uyU3`/Fb-6GO[lqlmrturryhC03;PYTRNNTaYI;Pafbdfhin\NIPFA?2FXaeiknt^D003,`A b*6GO[lrlnqtursyhC03;PYTQMNSaYI;Pagcdfhim\NIOGA?2FYaeiknt^D013,`b|h6GO[lqlnqturrygC142FYbeiknt_D013,`bx?uyU3`/Fb->V[BQXRTbpxstz}X=5>I]e``YQJFA=;V[BQYSTboxst{}X=5=I]fa`YQJEA=;I]e`aYQJF@=;LLHIThz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ml[WbeWH>A<7:Wehea\TMXXUT]bdce^K277.`bx?uyU3>`/Fb-,5=\b]TTbjg`UXgfkcOFXb_]\]]aTMNNGFKHC=8CQWUPF?@YVNGMRUUXQA.=C7`A b*+5=\b]TTcjg_UXfejcOFXb_\\\]aTMNOGFKGC=8CQXUOF??XVMFMRUUXQ@.BIMM@>DMJLI?*3@IFEDEGD=31:DKHGE@313530.0;CEA889<@;40CH9`A b*/4-=HG?BINM@>DMJLI?*4AIEDDEGD=32;DKGFC?423630.0:BDA878<@;40BH9`b|h05.=HG>BINN@>DMJLI?*4AIFEDEGD=31:DKHGE@313530.0:BEA878<@;40CH9`bx?HouLC1033600ba706751bd83064be737bnode_typeCop HouLC1033600ba006751bd830672b7871hdaroot.inittype = quantico::sd_flood_fill_to_bbox_size::1.0 matchesdef = 0 HouLC1033600ba106751bd83078f1fd91hdaroot.defcomment "" position 34.6822 -19.4286 connectornextid 0 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { } inputs { } stat { create 1733159112 modify 1733159122 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bbc06751bd8303ef0a9adhdaroot.userdata ___Version___HouLC1033600bb906751bd830a26abf12hdaroot/inputs.inittype = input matchesdef = 1 HouLC1033600bbe06751bd8308841f1fchdaroot/inputs.defcomment "" position 0 5.55112e-17 connectornextid 1 flags = lock off model off template off footprint off xray off bypass off display on render on highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 0 "output1" } inputsNamed3 { } inputs { } stat { create 1730811734 modify 1730811773 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb906751bd830870458bdhdaroot/inputs.parm{ version 0.8 } HouLC1033600bb506751bd8306611d4e4hdaroot/inputs.userdata ___Version___20.5.410HouLC1033600bb806751bd830ecf989dchdaroot/outputs.inittype = output matchesdef = 1 HouLC1033600bb906751bd830efb52fb4hdaroot/outputs.defcomment "" position 12.517 0.125993 connectornextid 1 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { 0 output 3 1 "input1" } inputs { 0 output 0 1 } stat { create 1730811734 modify 1733159135 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb806751bd8303ce2cd45hdaroot/outputs.parm{ version 0.8 } HouLC1033600bb406751bd830d572f688hdaroot/outputs.userdata ___Version___20.5.410HouLC1033600bb806751bd830da6a204fhdaroot/max_x_y.inittype = blend matchesdef = 1 HouLC1033600bb906751bd8304b8c0537hdaroot/max_x_y.defcomment "" position 5.85708 2.10599 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 2 "blend" } inputsNamed3 { 0 X 1 1 "bg" 1 Y 1 1 "fg" } inputs { 0 X 0 1 1 Y 0 1 } stat { create 1730812079 modify 1730812228 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb806751bd8304d186402hdaroot/max_x_y.parm{ version 0.8 signature [ 0 locks=0 ] ( auto ) mask [ 0 locks=0 ] ( 1 ) scopergba [ 0 locks=0 ] ( 15 ) mode [ 0 locks=0 ] ( "max" ) alpha [ 0 locks=0 ] ( "off" ) swap [ 0 locks=0 ] ( "off" ) } HouLC1033600bb406751bd8308c63c235hdaroot/max_x_y.userdata ___Version___20.5.410HouLC1033600ba206751bd830c9f3a1f6hdaroot/X.inittype = channelextract matchesdef = 1 HouLC1033600ba306751bd83027792223hdaroot/X.defcomment "" position 2.83883 2.53938 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "channel" } inputsNamed3 { 0 inputs 0 1 "channels" } inputs { 0 inputs 0 1 } stat { create 1730812107 modify 1733159135 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600ba206751bd830a408d3e3hdaroot/X.parm{ version 0.8 signature [ 0 locks=0 ] ( auto ) channel [ 0 locks=0 ] ( 2 ) } HouLC1033600bbe06751bd8308691478dhdaroot/X.userdata ___Version___20.5.410HouLC1033600ba206751bd830a2f1665dhdaroot/Y.inittype = channelextract matchesdef = 1 HouLC1033600ba306751bd8304d377edehdaroot/Y.defcomment "" position 2.83883 0.318132 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "channel" } inputsNamed3 { 0 inputs 0 1 "channels" } inputs { 0 inputs 0 1 } stat { create 1730812107 modify 1733159135 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600ba206751bd8301c9c976dhdaroot/Y.parm{ version 0.8 signature [ 0 locks=0 ] ( auto ) channel [ 0 locks=0 ] ( 3 ) } HouLC1033600bbe06751bd83043310c28hdaroot/Y.userdata ___Version___20.5.410HouLC1033600bb906751bd83040b5158ehdaroot/output.inittype = switch matchesdef = 1 HouLC1033600bbe06751bd83005687b22hdaroot/output.defcomment "" position 8.85629 0.468132 connectornextid 4 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 3 "chosen" } inputsNamed3 { 0 max_x_y 2 1 "input1" 1 X 1 1 "input2" 2 Y 1 1 "input3" } inputs { 0 max_x_y 0 1 1 X 0 1 2 Y 0 1 } stat { create 1730812176 modify 1733159112 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bbe06751bd83004f5d707hdaroot/output.chn{ channel input { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../output\") } } } HouLC1033600bb906751bd83025b89c5bhdaroot/output.parm{ version 0.8 input [ 8 locks=0 ] ( [ input 0 ] ) } HouLC1033600bb506751bd83011edd644hdaroot/output.userdata ___Version___20.5.410HouLC1033600ba306751bd830da6baccbhdaroot.order6 inputs outputs max_x_y X Y output HouLC1033600ba106751bd83019cf124ehdaroot.net1 HouLC1033600bb606751bd830f96ba020LIMITED_COMMERCIAL_FILE!!!INDX DialogScript gM= CreateScript `gM=InternalFileOptions 0gM= Contents.gz 3gM=TypePropertiesOptions.gM=HelpgM= Tools.shelfgM4 IconImage 5gQExtraFileOptionsVgM=ContentsVgQ# Dialog script for quantico::sd_flood_fill_to_color::1.0 automatically generated { name quantico::sd_flood_fill_to_color::1.0 script quantico::flood_fill_to_color::1.2 label "Flood Fill to Color" input input1 flood_fill input input2 color output output1 dst noautosig signature default RGBA { RGBA RGBA } { RGBA } signature rgb RGB { RGBA RGB } { RGB } signature mono Mono { RGBA Mono } { Mono } help { "" } parm { name "signature" baseparm label "Signature" export none } parm { name "seed" label "Seed" type integer default { "0" } range { 0 100 } parmtag { "script_callback_language" "python" } } groupsimple { name "hsl_adjustement" label "HSL Adjustment" hidewhen "{ signature == mono }" parmtag { "group_default" "1" } parm { name "h_adjustment" label "H" type float default { "0" } range { -1! 1! } parmtag { "script_callback_language" "python" } } parm { name "s_adjustment" label "S" type float default { "0" } range { -1! 1! } parmtag { "script_callback_language" "python" } } parm { name "l_adjustment" label "L" type float default { "0" } range { -1! 1! } parmtag { "script_callback_language" "python" } } } groupsimple { name "hsl_random" label "HSL Random" hidewhen "{ signature == mono }" parmtag { "group_default" "1" } parm { name "h_random" label "H" type float default { "0" } range { -1! 1! } parmtag { "script_callback_language" "python" } } parm { name "s_random" label "S" type float default { "0" } range { -1! 1! } parmtag { "script_callback_language" "python" } } parm { name "l_random" label "L" type float default { "0" } range { -1! 1! } parmtag { "script_callback_language" "python" } } } parm { name "lum_adjustment" label "Luminance Adjustment" type float default { "0" } hidewhen "{ signature != mono }" range { -1! 1! } parmtag { "script_callback_language" "python" } } parm { name "lum_random" label "Luminance Random" type float default { "0" } hidewhen "{ signature != mono }" range { -1! 1! } parmtag { "script_callback_language" "python" } } } # Automatically generated script \set noalias = 1 # # Creation script for quantico::sd_flood_fill_to_color::1.0 operator # if ( "$arg1" == "" ) then echo This script is intended as a creation script exit endif # Node $arg1 (quantico::Cop/sd_flood_fill_to_color::1.0) opexprlanguage -s hscript $arg1 opuserdata -n '___Version___' -v '' $arg1  nodeconntype nodeparmtype]m۸v/~b|JZ-9 /5=\Er0(Ȓ+ɻ RFZnsAIpz?G7 u'nSK'MMlaY]hTl݅K(J5?$L}'z2qg^E`F3' Kʒ΂&.ЫS|*N~*z='Z.i@YEQDƦ .T35Q( FqH7]2OA|eҀ?t HJ/U)ɖ?I*54ti|E6pqcBnKR8r'zd ݬ1n]?pI],4oC%Zu!KbrAaIJRSjhb S `Z0:]D1A_hk8l)iʽWkßt:Q\$N*H8_9][ɭSO'Sr0uBc^E7_4N(f^U9/& SeTUX-ˀ^`:k1^@f觶d:dMp3<܌u SdXe`(n-ۭʊG&3a6r_2.x A gWHƚ k+gMojM]gz]Ñ8ES#x6k'G ɭ:YCc ``~~1`co4*Ek9wl"obYU6$yO'v!=XMgjEC'8qPޙLǶMiLah/h$:fY ;0B@ϝŢڹ'>wCjc:gp$ il?tp !Y7ҝMfcf]2ιu u1pM\̈u2$DO+ap J<@Bv9&-[JzH0!R,YF/޺ԘuW!I,@qKtcTC8Kkd@@4WR>FCRG/=Ma\Uk*qa*q"BE`R~iEstüEƮe|i+-pmGN߀fw%ZJ7M6{6ۻG-d3d3/~l" h >h^jpު ,%+e|K名( b7b,(m=߳{(KLuf;6=߹݁" *\]~8ql6a͟)hQU؊FyWuSr dZysZ~s!3';u7UxζO1:teFloؤroxw6CSJbp6Hf*~}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ppedParmName := 0; SaveCachedCode := 0; SaveIcon := 1; SaveSpareParms := 0; UnlockOnCreate := 0; UseDSParms := 1; COP $HDA_TABLE_AND_NAME SD/Flood Fill PIC2#Nnye53Created by Houdini14.0.321 [12/05/24 09:49:39]g^]www-datak1ehungaryr1~@@uF@Q=tX?!v82ThG_Cp_oeREgV2_p!rVȄgVΌ%bB7xd{qLr2pA6ac @v 0hjApIEWBA{dqIXA0sas'?uyU3`/Fbo?`bב?`PsbצY?`'TbCs?uyU3`/Fb{!$$"#%#`0b'T(//+,1(`bl!! "`8b:)E?uxyU3`/Fbu ()&',% `BIby .;<67@0 `S,bxS2 !$!"% `'["bH]?u}yU3`/Fbt (,*+1# `\Çbg  0>A=>G5 `8]bh?  &$%( `c}ibY?unyU3`/FbM $+,*+1# `V]b =  5@A=>G5 `uNbnF %&$%( `bmE?uTyU3`/FbJ    '//,,+*+1' `+bӳz  :DDAA>=>G8 `b[" !''&&%$%(! `bF|h?uPyU3`/FbK  !),*,1) ` =b& ' &)&#  3@G: `wնb4  "%$&)# `]b0?uJyU3`/FbG  $%$'*-/% `j b1 $% (--/.'#",3328>BD5 `4bJ}i     $''  `E|hbq>?u@yU3`/FbF  &)" $) `b# !!!(*))*,+""*6:249bijҎ?uByU3 `/FbA  *2%#$//,+&  `be  1<.6;2 &*(()+* 4DGCD<) `{b/"       `b2Tb'?u@yU3 `/FbF  :WP.*,)  -2/1& `b#  ?daAGIC4#$')*(&#0BJ: `ƞb      `r>bijҎ?u7yU3 `/Fb^ ytL!+-/.!))816*  `Ao b㽻Z b9FIKJ3%#)+%!!+#!8KGI9 `Yb7ןo      `gb?u+yU3 `/FbY GK%'++,.. !CcZ8 %H^VYO1+<, `&bj~ N`ACFFGIJ4#)B]V;+Uqfj]9$7- `tz6b^k[   0./><;3!,  ` bX?u yU3 `/FbX 0vk8!+,0%(Jjqr_:?]hceeZ/Bgvg( `ƀb81 8xI8HFHN>, -Hdjk[< Imztwvi57Xh]$ `y_b=   "29:1 (?FDDC< 0LWL `1_p!bk!r?u'yU3`/FbT )aP,#-+,.$Chypsn\AVfgefjkS+#BwU `ѽZb5*: 0mb@:HFGK>1)%C`qilhX@axywx}~`0 7eqyxK `fjbN    4=9:8/5EEDDGH81Xbgg@ `ȄbS8?uyU3`/FbT g6%&+,-*,Zspiihe\bebcdhMQx2 `ѽZb5*: sK?CFGHE5/35Xkiddc`Ymwststw|VLezll{m+ `fjbN    -:954432>DABDF6;Xh^^i^$ `}ub(?u"yU3`/Fb[ 8v}K!).-,-." 1cvihmj\UagbV]u~|||; `NbS,  =S-;HIHGIK:' 6_ndcgcY\pytye\clkkmk2 `ɳbş:    #6;547628AEA@;CV]\\^\, `'b.1?u"yU3`/Fb[ -1&()'$&('%&-,'8`tminj[U`ebV]u{||~K `NbS, 27-6=@>BDC>;:86=]lgdhcXaqwtvd\bjkkmvB `ɳbş:   1;74861:BDA@:AV[\\]e9 `'b.1?u,yU3`/FbY 4C>5+'%)3CSWQLYdjkmeVZ`cbRYu{||U `&bk~ @UQH@?>@GV`d`XZ_dfgaYhrutv_Wbjkkn}K `{ b   #06674/V[\\^k@ `Rb'?u.yU3`/FbX  1ddYOE3)6XnwzxiTO\mgZOadcd_JQrz|}O `ƀb91 ={znaVF9Eg]NYfb\\ruututuvuUM`hklozF `ןobTj   .75/-@B=08SZ\]`h< `;ib3??CA@LXab\UJ* `1_p!bk!r?u,yU3`/Fb[ 7c[XWX[IJaspmqj]vN@DHHNLINs}]2 `NbS, Cyolklp[Xn}ls|UJPTU^[UUsyS* `ןobVj     '( !'*+0,0?f|kI#  `Rb'?u"yU3`/FbZ Cm\XZEAUtrmmnf`gŧZ-397=43HF `bL  QpmllpWQg{roY:BIHOE>JI `ןobPj     ,4* DB `'b.1?u'yU3`/FbU9`c_\XJS[^fkmnq]cHFIFG@BV> `pSIb>(Gwyvql``ch{njUX[VWPO]@ `b `_   #11+Az; `ȄbS8?uyU3`/FbT %4FUZVUfgmmjcwIGLIIHIWm-  `ѽZb5*:  *AWgnkcluqyXZ^XXYY`p/  `fjbN   +031' :h-  `| b'a:?uyU3`/FbT" (9DN{ιwhnyck|4;INKIDDluussF  `ѽZb5*: /DR_˽ztyuv=JZ^\[SKkqpooC  `fjbN   ! 211-"  'dnmll@  `| b'a:?uyU3`/FbT$$&% !=țrm\uʷh6#=OJA2!""  `ѽZb5*:%D˥}n{d4*K`ZO<#  `fjbN!   $51&     `| b'a:?uyU3`/FbT""$$ ! yќc?uyU3`/FbW !#! -Q%  %&()*))('*+   `_~b{  !,S%  %'*,-,+*)-.""! `5`_b̗̿        `Ό%b:t?u:yU3 `/Fb_!  !#  !+''&'&'*$   `H b^SI ! #1*('(),&  `pJobmT%  "     `NUbK3:g?u;yU3!`/Fb]! # ! +'&'&#$(    `bN ! 0)'()%! `Yb^F      `%@bq?u7yU3"`/Fb_!    $#&"!*85  #"`H bGSI   !'$(('(%!(&'# `tz6bZk[       `gb?u-yU3#`/FbY!   2PB$&$'6BB2  1UF0`&bh~  !$"  ;WE'('&&11%9bM1`b[E         "=3&`b*?u&yU3$`/FbZ ! !'&&($#4<:<>4 %NYI3`b@ ''*,,/%&% #(''*&%++-.'0YgS7`nEbqOr        7@4&`k!rb?uyU3%`/FbV!"!! WөO%&(# $3:<::<;17\VE1`1b]  !),/%$' [ڮQ&'*%$*+*+-+##EgbL3`5`_bϿ̗      *D>1&`P8b1!c?uyU3&`/FbQ! T1&$ %1<<::9:<<"*C^TB/`S,b\S2 ($"%-,*+-$$& Xŕ3'&#+,+**+,*0Qj_H1`Nb     3F<0&`P8b1!c?uyU3'`/FbQ! Pt0##1?;:9:99<>39IZSB/`S,b]S2+,%+,*+-$&$Ty2$"-,+*)++"8Sh_H1`obE     "4A;0&`(b7x?uyU3(`/FbQ   w5#1:<:9::;:-4FZSB/`S,bZS2 ()''#',,+-' &!}8$+,*+*0Mh_H1`GOrbk       3A;0&`b ??uyU3)`/FbV    ^Զ[2EU?3:9:;:,1CZSB/`1b] $*'&(%(,+-) bc4AG."*+*,Jh_H1`:bo     .A;0&`.1bΌ%?u/yU3*`/FbU *rg*D^C3:9:/1BZSB/`pSIb?( %)&&''$%*,,)!'#+u¥q/ AO0"*)+Hh_H1`kk[b>@a        *A;0&`CbO?u$yU3+`/FbW)+#);;'&Xsk;6;:;:9:53AYSB/`_~bx ,.#!%&'(!!&+(%)6IK2 (^}v? )+*) +Ff]G1`fjbN   *@<1&`3<b ?uyU3,`/FbQ7bQ 2VX\L'  "2:;>><;;=>5/;SQB/`S,bZS2?jU )&'( "Aknr_4  !&)+,+!%=]WE1`GOrbj?G   &:-`(buHۗ*&$ +\ja[\U) WӤ* 88=:1+7>=>A9+.3-` *:bݗU߶^-?7/,,( Wߤ@"BNGJMJ@;KTQSWN2`޲b>g LB         `2bd?uyU31`/Fb-SͥT #$$$%%%%((-(@ĿЭr2%4<8;92+6<>==>90/0*`A b*Wرc1* ''&&&-)Aزv61DLGMG@=<<<748R>)`A b*PКB.KU=%.,****.0@α}G!:NN=6>PSQOOPNIH`G.`b|hF{}        `bx?uyU34`/FbST׻v%Adq`$%# ()-1(6^4 *7(.8>=<>30-`bAZ}G?lw{}u= &1-,+*+'! MOHCFGGFDBJZ]J2`b`_Pk%        `1_p!bk!r?u5yU37`/Fb_Yd6%.5?CBF.(0,+(#  +2/*/00.$0CUO>-`H bCSI\pE6?DNRQY?# (2.-)$ 9ACC@2=Qc^J2`]:bQN      `b?u?yU38`/Fb]BQB'12-(%Gcjuvvr[=;RO>-`bNEWL19CG?7-$.53% & Fdq{}}x[GLd^J2`زbY;?&   @_effbJ `pyb?uDyU39`/FbA//'/334)"! grKHTD/`bd 27/:AEFF9/-3;6# k|ZYfO3`c}ibY"   RX `*jbMU?uQyU3:`/FbK2-35454' %ҡd4>8+` =b'24*FFEGF948:=1ݬo@L?-`8b#:)E    {H`s b?uPyU3;`/FbKEE!0357,!"!,˺ż~!` =b'DI/EFGI>44:;:'.Dž !`8b :)E   q `]b0?u]yU3<`/FbHLT4-056'"( nӺ| `Ʀb&O]C?BGH757;@7 o„ `pb:  i­t `obE?ufyU3=`/FbOXmP',41 ") !'`ƽ| `CsbVo[:@E?369;A, 'c `wb%H  !%[t `fjbN?ubyU3>`/FbLN`H#*/)!"$ "!Xl `SeKb+K_O3;=5.2568!""[r `Mbxc "Qe `kk[b@a?uiyU3?`/Fbr13$"))!"!$+NhuyQ`gbئ46&,22-),--)$(Olz~T`3VbRr$"GbltoL`^Fby_?HouLC1033600ba706751bd83064be737bnode_typeCop HouLC1033600ba006751bd830672b780dhdaroot.inittype = quantico::sd_flood_fill_to_color::1.0 matchesdef = 0 HouLC1033600ba106751bd83078f1fd91hdaroot.defcomment "" position 36.8577 -19.4286 connectornextid 0 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { } inputs { } stat { create 1733159219 modify 1733159247 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bbc06751bd8303ef0a9adhdaroot.userdata ___Version___HouLC1033600bb906751bd830a26abf12hdaroot/inputs.inittype = input matchesdef = 1 HouLC1033600bbe06751bd8308841f1efhdaroot/inputs.defcomment "" position 0 5.55112e-17 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render on highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 0 "output1" 1 "output2" } inputsNamed3 { } inputs { } stat { create 1730817928 modify 1730818473 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb906751bd830870458bdhdaroot/inputs.parm{ version 0.8 } HouLC1033600bb506751bd8306611d4e4hdaroot/inputs.userdata ___Version___20.5.410HouLC1033600bb806751bd830ecf989dchdaroot/outputs.inittype = output matchesdef = 1 HouLC1033600bb906751bd830efb52fachdaroot/outputs.defcomment "" position 10.6236 5.55112e-17 connectornextid 1 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { 0 switch_signature 1 1 "input1" } inputs { 0 switch_signature 0 1 } stat { create 1730817928 modify 1733159229 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb806751bd8303ce2cd45hdaroot/outputs.parm{ version 0.8 } HouLC1033600bb406751bd830d572f688hdaroot/outputs.userdata ___Version___20.5.410HouLC1033600b8d06751bd830963bd1e5hdaroot/flood_fill_to_rgba.inittype = opencl matchesdef = 1 HouLC1033600bb206751bd830c695bb32hdaroot/flood_fill_to_rgba.defcomment "" position 4.39705 2.43691 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 inputs 0 1 "input1" 2 inputs 1 1 "input2" } inputs { 0 inputs 0 1 1 inputs 1 1 } stat { create 1730818286 modify 1733159230 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb206751bd830671eb320hdaroot/flood_fill_to_rgba.chn{ channel bindings2_v3val1 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../h_adjustment\") } } channel bindings2_v3val2 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../s_adjustment\") } } channel bindings2_v3val3 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../l_adjustment\") } } channel bindings3_v3val1 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../h_random\") } } channel bindings3_v3val2 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../s_random\") } } channel bindings3_v3val3 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../l_random\") } } channel bindings1_intval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../seed\") } } } HouLC1033600b8d06751bd830e46160f5hdaroot/flood_fill_to_rgba.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill val=0 #bind layer color? float4 val={0,0,0,1} #bind layer !&dst float4 #bind parm seed int val=0; #bind parm hsl_adjustment float3 val={0,0,0} #bind parm hsl_random float3 val={0,0,0} #include \"random.h\" float3 rgb_to_hsl(float3 rgb) { float3 hsl; float4 val = rgb.x <= fmin(rgb.y, rgb.z) ? (float4)(rgb.yzx, 3.0f) : (rgb.y <= fmin(rgb.x, rgb.z) ? (float4)(rgb.zxy, 5.0f) : (float4)(rgb.xyz, 1.0f)); float max_val = fmax(fmax(rgb.x, rgb.y), rgb.z); hsl.x = (val.w - (3.0f/4096.0f + val.x - val.y)/(max_val-val.z+1.0f/4096.0f))/6.0f; hsl.y = (max_val-val.z)/(1.0f+1.0f/4096.0f-fabs(1.0f-val.z-max_val)); hsl.z = 0.5f*(max_val+val.z); return hsl; } float3 hsl_to_rgb(float3 hsl) { float3 rgb = fmax(fmin(fabs(hsl.xxx-(float3)(0.5f, 1.0f/3.0f, 2.0f/3.0f))*(float3)(6.0f, -6.0f, -6.0f)+(float3)(-1.0f, 2.0f, 2.0f), (float3)(1.0f, 1.0f, 1.0f)), (float3)(0.0f, 0.0f, 0.0f)); float val = fma(0.5f-fabs(0.5f-hsl.z),hsl.y,hsl.z); return fma(2.0f*(val-hsl.z), rgb, fma(2.0f,hsl.z,-val)); } @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float4 res = (float4)(0.0f); if (@flood_fill.z != 0.0f) { float2 size = (float2)(@xres, @yres); pos = fma(-@flood_fill.xy,@flood_fill.zw,fma(@flood_fill.zw,0.5f,pos)); float4 color_val = @color.textureSample(pos); res.w = color_val.w; color_val.xyz = rgb_to_hsl(color_val.xyz); // Randomizing uint seed_val = @seed; seed_val = SYSwang_inthash(seed_val); float2 iptr; pos = fract(pos, &iptr); seed_val += (uint)(fma(pos.y,size.y,pos.x)*size.x); seed_val = SYSwang_inthash(seed_val); float3 rnd = (float3)(fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f)); rnd = fmin(fmax(fma(rnd,@hsl_random,@hsl_adjustment), (float3)(-1.0f)), (float3)(1.0f)); float ival; res.x = fract(color_val.x + rnd.x, &ival); res.y = mix(mix(color_val.y, 0.0f, fabs(fmin(rnd.y, 0.0f))), 1.0f, fmax(rnd.y, 0.0f)); res.z = mix(mix(color_val.z, 0.0f, fabs(fmin(rnd.z, 0.0f))), 1.0f, fmax(rnd.z, 0.0f)); res.xyz = hsl_to_rgb(res.xyz); } @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 2 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 3 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "floatn" ) input1_optional [ 0 locks=0 ] ( "off" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float4" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( color ) input2_type [ 0 locks=0 ] ( "float4" ) input2_optional [ 0 locks=0 ] ( "on" ) stdswitcher0_1 [ 0 locks=0 ] ( 1 ) bindings1_name [ 0 locks=0 ] ( seed ) bindings1_type [ 0 locks=0 ] ( "int" ) bindings1_rampsize [ 0 locks=0 ] ( 1024 ) bindings1_ramptype [ 0 locks=0 ] ( "float" ) bindings1_ramp [ 0 locks=0 ] ( 2 ) bindings1_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings1_layertype [ 0 locks=0 ] ( "float4" ) bindings1_layerborder [ 0 locks=0 ] ( "input" ) bindings1_portname [ 0 locks=0 ] ( "" ) bindings1_volume [ 0 locks=0 ] ( "" ) bindings1_forcealign [ 0 locks=0 ] ( "on" ) bindings1_resolution [ 0 locks=0 ] ( "off" ) bindings1_voxelsize [ 0 locks=0 ] ( "off" ) bindings1_xformtoworld [ 0 locks=0 ] ( "off" ) bindings1_xformtovoxel [ 0 locks=0 ] ( "off" ) bindings1_vdbtype [ 0 locks=0 ] ( "any" ) bindings1_attribute [ 0 locks=0 ] ( "" ) bindings1_attribclass [ 0 locks=0 ] ( "point" ) bindings1_attribtype [ 0 locks=0 ] ( "float" ) bindings1_attribsize [ 0 locks=0 ] ( 1 ) bindings1_precision [ 0 locks=0 ] ( "node" ) bindings1_readable [ 0 locks=0 ] ( "on" ) bindings1_writeable [ 0 locks=0 ] ( "off" ) bindings1_optional [ 0 locks=0 ] ( "off" ) bindings1_defval [ 0 locks=0 ] ( "off" ) bindings1_intval [ 8 locks=0 ] ( [ bindings1_intval 0 ] ) bindings1_fval [ 0 locks=0 ] ( 0 ) bindings1_v2val [ 0 locks=0 ] ( 0 0 ) bindings1_v3val [ 8 locks=0 ] ( 0 0 0 ) bindings1_v4val [ 0 locks=0 ] ( 0 0 0 0 ) bindings1_timescale [ 0 locks=0 ] ( "none" ) bindings1_ramp1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp1value [ 0 locks=0 ] ( 0 ) bindings1_ramp1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp2value [ 0 locks=0 ] ( 1 ) bindings1_ramp2interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp_rgb1c [ 0 locks=0 ] ( 0 0 0 ) bindings1_ramp_rgb1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp_rgb2c [ 0 locks=0 ] ( 1 1 1 ) bindings1_ramp_rgb2interp [ 0 locks=0 ] ( "linear" ) stdswitcher0_2 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_name [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( hsl_adjustment ) bindings2_type [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float3" ) bindings2_rampsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1024 ) bindings2_ramptype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings2_ramp [ 0 locks=0 ] ( 2 ) bindings2_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings2_layertype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float4" ) bindings2_layerborder [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "input" ) bindings2_portname [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings2_volume [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings2_forcealign [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings2_resolution [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_voxelsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_xformtoworld [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_xformtovoxel [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_vdbtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "any" ) bindings2_attribute [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings2_attribclass [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "point" ) bindings2_attribtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings2_attribsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_precision [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "node" ) bindings2_readable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings2_writeable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_optional [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_defval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_intval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_fval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_v2val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 ) bindings2_v3val [ 8 locks=0 autoscope=0 autosel=4294967295 ] ( [ bindings2_v3val1 0 ] [ bindings2_v3val2 0 ] [ bindings2_v3val3 0 ] ) bindings2_v4val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 0 ) bindings2_timescale [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "none" ) bindings2_ramp1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_ramp1value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_ramp1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings2_ramp2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_ramp2value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_ramp2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings2_ramp_rgb1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_ramp_rgb1c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 ) bindings2_ramp_rgb1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings2_ramp_rgb2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_ramp_rgb2c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 1 1 ) bindings2_ramp_rgb2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) stdswitcher0_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_name [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( hsl_random ) bindings3_type [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float3" ) bindings3_rampsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1024 ) bindings3_ramptype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings3_ramp [ 0 locks=0 ] ( 2 ) bindings3_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings3_layertype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float4" ) bindings3_layerborder [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "input" ) bindings3_portname [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings3_volume [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings3_forcealign [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings3_resolution [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_voxelsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_xformtoworld [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_xformtovoxel [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_vdbtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "any" ) bindings3_attribute [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings3_attribclass [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "point" ) bindings3_attribtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings3_attribsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_precision [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "node" ) bindings3_readable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings3_writeable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_optional [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_defval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_intval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_fval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_v2val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 ) bindings3_v3val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( [ bindings3_v3val1 0 ] [ bindings3_v3val2 0 ] [ bindings3_v3val3 0 ] ) bindings3_v4val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 0 ) bindings3_timescale [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "none" ) bindings3_ramp1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_ramp1value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_ramp1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings3_ramp2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_ramp2value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_ramp2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings3_ramp_rgb1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_ramp_rgb1c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 ) bindings3_ramp_rgb1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings3_ramp_rgb2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_ramp_rgb2c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 1 1 ) bindings3_ramp_rgb2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) } HouLC1033600b8906751bd830a5c8e0b5hdaroot/flood_fill_to_rgba.userdata ___Version___20.5.410HouLC1033600bb306751bd83034087475hdaroot/switch_signature.inittype = switch matchesdef = 1 HouLC1033600bb006751bd83007c74171hdaroot/switch_signature.defcomment "" position 7.49487 0 connectornextid 4 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "chosen" } inputsNamed3 { 0 flood_fill_to_rgba 1 1 "input1" 2 flood_fill_to_rgb 1 1 "input2" 3 flood_fill_to_mono 1 1 "input3" } inputs { 0 flood_fill_to_rgba 0 1 1 flood_fill_to_rgb 0 1 2 flood_fill_to_mono 0 1 } stat { create 1731671970 modify 1733159219 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb006751bd830b757b6f6hdaroot/switch_signature.chn{ channel input { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = "if(strcmp(chs(\"../signature\"), \"default\") == 0, 0, if(strcmp(chs(\"../signature\"), \"rgb\") == 0, 1, if(strcmp(chs(\"../signature\"), \"mono\") == 0, 2, 0)))" } } } HouLC1033600bb306751bd83078278a01hdaroot/switch_signature.parm{ version 0.8 input [ 0 locks=0 ] ( [ input 0 ] ) } HouLC1033600b8f06751bd8300b88a23ehdaroot/switch_signature.userdata ___Version___20.5.410HouLC1033600bb206751bd83047abcc20hdaroot/flood_fill_to_rgb.inittype = opencl matchesdef = 1 HouLC1033600bb306751bd83021e8a83ehdaroot/flood_fill_to_rgb.defcomment "" position 4.39705 0 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 inputs 0 1 "input1" 2 inputs 1 1 "input2" } inputs { 0 inputs 0 1 1 inputs 1 1 } stat { create 1730818286 modify 1733159230 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb306751bd830a9c7ae23hdaroot/flood_fill_to_rgb.chn{ channel bindings2_v3val1 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../h_adjustment\") } } channel bindings2_v3val2 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../s_adjustment\") } } channel bindings2_v3val3 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../l_adjustment\") } } channel bindings3_v3val1 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../h_random\") } } channel bindings3_v3val2 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../s_random\") } } channel bindings3_v3val3 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../l_random\") } } channel bindings1_intval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../seed\") } } } HouLC1033600bb206751bd830908ba858hdaroot/flood_fill_to_rgb.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill val=0 #bind layer color? float3 val={0,0,0} #bind layer !&dst float3 #bind parm seed int val=0; #bind parm hsl_adjustment float3 val={0,0,0} #bind parm hsl_random float3 val={0,0,0} #include \"random.h\" float3 rgb_to_hsl(float3 rgb) { float3 hsl; float4 val = rgb.x <= fmin(rgb.y, rgb.z) ? (float4)(rgb.yzx, 3.0f) : (rgb.y <= fmin(rgb.x, rgb.z) ? (float4)(rgb.zxy, 5.0f) : (float4)(rgb.xyz, 1.0f)); float max_val = fmax(fmax(rgb.x, rgb.y), rgb.z); hsl.x = (val.w - (3.0f/4096.0f + val.x - val.y)/(max_val-val.z+1.0f/4096.0f))/6.0f; hsl.y = (max_val-val.z)/(1.0f+1.0f/4096.0f-fabs(1.0f-val.z-max_val)); hsl.z = 0.5f*(max_val+val.z); return hsl; } float3 hsl_to_rgb(float3 hsl) { float3 rgb = fmax(fmin(fabs(hsl.xxx-(float3)(0.5f, 1.0f/3.0f, 2.0f/3.0f))*(float3)(6.0f, -6.0f, -6.0f)+(float3)(-1.0f, 2.0f, 2.0f), (float3)(1.0f, 1.0f, 1.0f)), (float3)(0.0f, 0.0f, 0.0f)); float val = fma(0.5f-fabs(0.5f-hsl.z),hsl.y,hsl.z); return fma(2.0f*(val-hsl.z), rgb, fma(2.0f,hsl.z,-val)); } @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float3 res = (float3)(0.0f); if (@flood_fill.z != 0.0f) { float2 size = (float2)(@xres, @yres); pos = fma(-@flood_fill.xy,@flood_fill.zw,fma(@flood_fill.zw,0.5f,pos)); float3 color_val = @color.textureSample(pos); color_val.xyz = rgb_to_hsl(color_val.xyz); // Randomizing uint seed_val = @seed; seed_val = SYSwang_inthash(seed_val); float2 iptr; pos = fract(pos, &iptr); seed_val += (uint)(fma(pos.y,size.y,pos.x)*size.x); seed_val = SYSwang_inthash(seed_val); float3 rnd = (float3)(fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f)); rnd = fmin(fmax(fma(rnd,@hsl_random,@hsl_adjustment), (float3)(-1.0f)), (float3)(1.0f)); float ival; res.x = fract(color_val.x + rnd.x, &ival); res.y = mix(mix(color_val.y, 0.0f, fabs(fmin(rnd.y, 0.0f))), 1.0f, fmax(rnd.y, 0.0f)); res.z = mix(mix(color_val.z, 0.0f, fabs(fmin(rnd.z, 0.0f))), 1.0f, fmax(rnd.z, 0.0f)); res.xyz = hsl_to_rgb(res.xyz); } @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 2 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 3 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "floatn" ) input1_optional [ 0 locks=0 ] ( "off" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float3" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( color ) input2_type [ 0 locks=0 ] ( "float3" ) input2_optional [ 0 locks=0 ] ( "on" ) stdswitcher0_1 [ 0 locks=0 ] ( 1 ) bindings1_name [ 0 locks=0 ] ( seed ) bindings1_type [ 0 locks=0 ] ( "int" ) bindings1_rampsize [ 0 locks=0 ] ( 1024 ) bindings1_ramptype [ 0 locks=0 ] ( "float" ) bindings1_ramp [ 0 locks=0 ] ( 2 ) bindings1_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings1_layertype [ 0 locks=0 ] ( "float4" ) bindings1_layerborder [ 0 locks=0 ] ( "input" ) bindings1_portname [ 0 locks=0 ] ( "" ) bindings1_volume [ 0 locks=0 ] ( "" ) bindings1_forcealign [ 0 locks=0 ] ( "on" ) bindings1_resolution [ 0 locks=0 ] ( "off" ) bindings1_voxelsize [ 0 locks=0 ] ( "off" ) bindings1_xformtoworld [ 0 locks=0 ] ( "off" ) bindings1_xformtovoxel [ 0 locks=0 ] ( "off" ) bindings1_vdbtype [ 0 locks=0 ] ( "any" ) bindings1_attribute [ 0 locks=0 ] ( "" ) bindings1_attribclass [ 0 locks=0 ] ( "point" ) bindings1_attribtype [ 0 locks=0 ] ( "float" ) bindings1_attribsize [ 0 locks=0 ] ( 1 ) bindings1_precision [ 0 locks=0 ] ( "node" ) bindings1_readable [ 0 locks=0 ] ( "on" ) bindings1_writeable [ 0 locks=0 ] ( "off" ) bindings1_optional [ 0 locks=0 ] ( "off" ) bindings1_defval [ 0 locks=0 ] ( "off" ) bindings1_intval [ 8 locks=0 ] ( [ bindings1_intval 0 ] ) bindings1_fval [ 0 locks=0 ] ( 0 ) bindings1_v2val [ 0 locks=0 ] ( 0 0 ) bindings1_v3val [ 8 locks=0 ] ( 0 0 0 ) bindings1_v4val [ 0 locks=0 ] ( 0 0 0 0 ) bindings1_timescale [ 0 locks=0 ] ( "none" ) bindings1_ramp1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp1value [ 0 locks=0 ] ( 0 ) bindings1_ramp1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp2value [ 0 locks=0 ] ( 1 ) bindings1_ramp2interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp_rgb1c [ 0 locks=0 ] ( 0 0 0 ) bindings1_ramp_rgb1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp_rgb2c [ 0 locks=0 ] ( 1 1 1 ) bindings1_ramp_rgb2interp [ 0 locks=0 ] ( "linear" ) stdswitcher0_2 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_name [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( hsl_adjustment ) bindings2_type [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float3" ) bindings2_rampsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1024 ) bindings2_ramptype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings2_ramp [ 0 locks=0 ] ( 2 ) bindings2_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings2_layertype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float4" ) bindings2_layerborder [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "input" ) bindings2_portname [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings2_volume [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings2_forcealign [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings2_resolution [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_voxelsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_xformtoworld [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_xformtovoxel [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_vdbtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "any" ) bindings2_attribute [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings2_attribclass [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "point" ) bindings2_attribtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings2_attribsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_precision [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "node" ) bindings2_readable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings2_writeable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_optional [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_defval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_intval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_fval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_v2val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 ) bindings2_v3val [ 8 locks=0 autoscope=0 autosel=4294967295 ] ( [ bindings2_v3val1 0 ] [ bindings2_v3val2 0 ] [ bindings2_v3val3 0 ] ) bindings2_v4val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 0 ) bindings2_timescale [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "none" ) bindings2_ramp1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_ramp1value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_ramp1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings2_ramp2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_ramp2value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_ramp2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings2_ramp_rgb1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_ramp_rgb1c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 ) bindings2_ramp_rgb1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings2_ramp_rgb2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_ramp_rgb2c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 1 1 ) bindings2_ramp_rgb2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) stdswitcher0_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_name [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( hsl_random ) bindings3_type [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float3" ) bindings3_rampsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1024 ) bindings3_ramptype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings3_ramp [ 0 locks=0 ] ( 2 ) bindings3_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings3_layertype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float4" ) bindings3_layerborder [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "input" ) bindings3_portname [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings3_volume [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings3_forcealign [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings3_resolution [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_voxelsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_xformtoworld [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_xformtovoxel [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_vdbtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "any" ) bindings3_attribute [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings3_attribclass [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "point" ) bindings3_attribtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings3_attribsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_precision [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "node" ) bindings3_readable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings3_writeable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_optional [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_defval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_intval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_fval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_v2val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 ) bindings3_v3val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( [ bindings3_v3val1 0 ] [ bindings3_v3val2 0 ] [ bindings3_v3val3 0 ] ) bindings3_v4val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 0 ) bindings3_timescale [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "none" ) bindings3_ramp1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_ramp1value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_ramp1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings3_ramp2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_ramp2value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_ramp2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings3_ramp_rgb1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_ramp_rgb1c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 ) bindings3_ramp_rgb1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings3_ramp_rgb2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_ramp_rgb2c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 1 1 ) bindings3_ramp_rgb2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) } HouLC1033600b8e06751bd830575f5e45hdaroot/flood_fill_to_rgb.userdata ___Version___20.5.410HouLC1033600b8d06751bd830ba247e9chdaroot/flood_fill_to_mono.inittype = opencl matchesdef = 1 HouLC1033600bb206751bd83026d361f3hdaroot/flood_fill_to_mono.defcomment "" position 4.39705 -2.51529 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display on render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 inputs 0 1 "input1" 2 inputs 1 1 "input2" } inputs { 0 inputs 0 1 1 inputs 1 1 } stat { create 1730818286 modify 1733159230 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb206751bd830ac7c866ehdaroot/flood_fill_to_mono.chn{ channel bindings2_v3val1 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../h_adjustment\") } } channel bindings2_v3val2 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../s_adjustment\") } } channel bindings2_v3val3 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../l_adjustment\") } } channel bindings3_v3val1 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../h_random\") } } channel bindings3_v3val2 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../s_random\") } } channel bindings3_v3val3 { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../l_random\") } } channel bindings1_intval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../seed\") } } channel bindings2_fval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../lum_adjustment\") } } channel bindings3_fval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../lum_random\") } } } HouLC1033600b8d06751bd830ba3d2bachdaroot/flood_fill_to_mono.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill val=0 #bind layer color? float val=0 #bind layer !&dst float #bind parm seed int val=0; #bind parm lum_adjustment float val=0 #bind parm lum_random float val=0 #include \"random.h\" @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float res = 0.0f; if (@flood_fill.z != 0.0f) { float2 size = (float2)(@xres, @yres); pos = fma(-@flood_fill.xy,@flood_fill.zw,fma(@flood_fill.zw,0.5f,pos)); float color_val = @color.textureSample(pos); // Randomizing uint seed_val = @seed; seed_val = SYSwang_inthash(seed_val); float2 iptr; pos = fract(pos, &iptr); seed_val += (uint)(fma(pos.y,size.y,pos.x)*size.x); seed_val = SYSwang_inthash(seed_val); float rnd = fma(SYSfastRandom(&seed_val),0.999f,0.001f); rnd = fmin(fmax(fma(rnd,@lum_random,@lum_adjustment), -1.0f), 1.0f); /*float ival; res.x = fract(color_val.x + rnd.x, &ival); res.y = mix(mix(color_val.y, 0.0f, fabs(fmin(rnd.y, 0.0f))), 1.0f, fmax(rnd.y, 0.0f)); res.z = mix(mix(color_val.z, 0.0f, fabs(fmin(rnd.z, 0.0f))), 1.0f, fmax(rnd.z, 0.0f)); res.xyz = hsl_to_rgb(res.xyz);*/ res = mix(mix(color_val, 0.0f, fabs(fmin(rnd, 0.0f))), 1.0f, fmax(rnd, 0.0f)); } @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 2 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 3 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "floatn" ) input1_optional [ 0 locks=0 ] ( "off" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( color ) input2_type [ 0 locks=0 ] ( "float" ) input2_optional [ 0 locks=0 ] ( "on" ) stdswitcher0_1 [ 0 locks=0 ] ( 1 ) bindings1_name [ 0 locks=0 ] ( seed ) bindings1_type [ 0 locks=0 ] ( "int" ) bindings1_rampsize [ 0 locks=0 ] ( 1024 ) bindings1_ramptype [ 0 locks=0 ] ( "float" ) bindings1_ramp [ 0 locks=0 ] ( 2 ) bindings1_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings1_layertype [ 0 locks=0 ] ( "float4" ) bindings1_layerborder [ 0 locks=0 ] ( "input" ) bindings1_portname [ 0 locks=0 ] ( "" ) bindings1_volume [ 0 locks=0 ] ( "" ) bindings1_forcealign [ 0 locks=0 ] ( "on" ) bindings1_resolution [ 0 locks=0 ] ( "off" ) bindings1_voxelsize [ 0 locks=0 ] ( "off" ) bindings1_xformtoworld [ 0 locks=0 ] ( "off" ) bindings1_xformtovoxel [ 0 locks=0 ] ( "off" ) bindings1_vdbtype [ 0 locks=0 ] ( "any" ) bindings1_attribute [ 0 locks=0 ] ( "" ) bindings1_attribclass [ 0 locks=0 ] ( "point" ) bindings1_attribtype [ 0 locks=0 ] ( "float" ) bindings1_attribsize [ 0 locks=0 ] ( 1 ) bindings1_precision [ 0 locks=0 ] ( "node" ) bindings1_readable [ 0 locks=0 ] ( "on" ) bindings1_writeable [ 0 locks=0 ] ( "off" ) bindings1_optional [ 0 locks=0 ] ( "off" ) bindings1_defval [ 0 locks=0 ] ( "off" ) bindings1_intval [ 8 locks=0 ] ( [ bindings1_intval 0 ] ) bindings1_fval [ 0 locks=0 ] ( 0 ) bindings1_v2val [ 0 locks=0 ] ( 0 0 ) bindings1_v3val [ 8 locks=0 ] ( 0 0 0 ) bindings1_v4val [ 0 locks=0 ] ( 0 0 0 0 ) bindings1_timescale [ 0 locks=0 ] ( "none" ) bindings1_ramp1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp1value [ 0 locks=0 ] ( 0 ) bindings1_ramp1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp2value [ 0 locks=0 ] ( 1 ) bindings1_ramp2interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp_rgb1c [ 0 locks=0 ] ( 0 0 0 ) bindings1_ramp_rgb1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp_rgb2c [ 0 locks=0 ] ( 1 1 1 ) bindings1_ramp_rgb2interp [ 0 locks=0 ] ( "linear" ) stdswitcher0_2 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_name [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( lum_adjustment ) bindings2_type [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings2_rampsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1024 ) bindings2_ramptype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings2_ramp [ 0 locks=0 ] ( 2 ) bindings2_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings2_layertype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float4" ) bindings2_layerborder [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "input" ) bindings2_portname [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings2_volume [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings2_forcealign [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings2_resolution [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_voxelsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_xformtoworld [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_xformtovoxel [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_vdbtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "any" ) bindings2_attribute [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings2_attribclass [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "point" ) bindings2_attribtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings2_attribsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_precision [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "node" ) bindings2_readable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings2_writeable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_optional [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_defval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings2_intval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_fval [ 8 locks=0 autoscope=0 autosel=4294967295 ] ( [ bindings2_fval 0 ] ) bindings2_v2val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 ) bindings2_v3val [ 8 locks=0 autoscope=0 autosel=4294967295 ] ( [ bindings2_v3val1 0 ] [ bindings2_v3val2 0 ] [ bindings2_v3val3 0 ] ) bindings2_v4val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 0 ) bindings2_timescale [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "none" ) bindings2_ramp1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_ramp1value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_ramp1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings2_ramp2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_ramp2value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_ramp2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings2_ramp_rgb1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings2_ramp_rgb1c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 ) bindings2_ramp_rgb1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings2_ramp_rgb2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings2_ramp_rgb2c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 1 1 ) bindings2_ramp_rgb2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) stdswitcher0_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_name [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( lum_random ) bindings3_type [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings3_rampsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1024 ) bindings3_ramptype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings3_ramp [ 0 locks=0 ] ( 2 ) bindings3_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings3_layertype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float4" ) bindings3_layerborder [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "input" ) bindings3_portname [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings3_volume [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings3_forcealign [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings3_resolution [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_voxelsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_xformtoworld [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_xformtovoxel [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_vdbtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "any" ) bindings3_attribute [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) bindings3_attribclass [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "point" ) bindings3_attribtype [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "float" ) bindings3_attribsize [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_precision [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "node" ) bindings3_readable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) bindings3_writeable [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_optional [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_defval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) bindings3_intval [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_fval [ 8 locks=0 autoscope=0 autosel=4294967295 ] ( [ bindings3_fval 0 ] ) bindings3_v2val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 ) bindings3_v3val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( [ bindings3_v3val1 0 ] [ bindings3_v3val2 0 ] [ bindings3_v3val3 0 ] ) bindings3_v4val [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 0 ) bindings3_timescale [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "none" ) bindings3_ramp1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_ramp1value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_ramp1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings3_ramp2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_ramp2value [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_ramp2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings3_ramp_rgb1pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) bindings3_ramp_rgb1c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 0 0 ) bindings3_ramp_rgb1interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) bindings3_ramp_rgb2pos [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 ) bindings3_ramp_rgb2c [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 1 1 1 ) bindings3_ramp_rgb2interp [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "linear" ) } HouLC1033600b8906751bd8300f1eb5abhdaroot/flood_fill_to_mono.userdata ___Version___20.5.410HouLC1033600ba306751bd830da6bacb5hdaroot.order6 inputs outputs flood_fill_to_rgba switch_signature flood_fill_to_rgb flood_fill_to_mono HouLC1033600ba106751bd83019cf124ehdaroot.net1 HouLC1033600bb606751bd830f96ba020LIMITED_COMMERCIAL_FILE!!!INDX DialogScriptgMt CreateScriptfgMtInternalFileOptions 0gMt Contents.gz )gMtTypePropertiesOptions.gMtHelpgMt Tools.shelfgMm IconImage"?gQExtraFileOptionsagMtContentsagQ# Dialog script for quantico::sd_flood_fill_to_gradient::1.0 automatically generated { name quantico::sd_flood_fill_to_gradient::1.0 script quantico::flood_fill_to_gradient::1.2 label "Flood Fill to Gradient" input input1 flood_fill input input2 angle_input input input3 slope_input output output1 dst signature default Default { RGBA Mono Mono } { Mono } help { "" } parm { name "seed" label "Seed" type integer default { "0" } range { 0 100 } parmtag { "script_callback_language" "python" } } parm { name "angle" label "Angle" type angle default { "0" } range { 0 360 } parmtag { "script_callback_language" "python" } } parm { name "angle_variation" label "Angle Variation" type float default { "0" } range { 0! 1! } parmtag { "script_callback_language" "python" } } parm { name "multiply_by_bbox_size" label "Multiply by Bounding Box Size" type float default { "0" } range { 0! 1! } parmtag { "script_callback_language" "python" } } parm { name "angle_image_input_multiplier" label "Angle Image Input Multiplier" type float default { "0" } range { 0! 1! } parmtag { "script_callback_language" "python" } } parm { name "slope_image_input_multiplier" label "Slope Image Input Multiplier" type float default { "0" } range { 0! 1! } parmtag { "script_callback_language" "python" } } parm { name "multiply_by_slope_intensity" label "Multiply by Slope Intensity" type float default { "0" } range { 0! 1! } parmtag { "script_callback_language" "python" } } parm { name "flat_slope_color" label "Flat Slope Color" type color size 1 default { "0.5" } range { 0 1 } parmtag { "script_callback_language" "python" } } } # Automatically generated script \set noalias = 1 # # Creation script for quantico::sd_flood_fill_to_gradient::1.0 operator # if ( "$arg1" == "" ) then echo This script is intended as a creation script exit endif # Node $arg1 (quantico::Cop/sd_flood_fill_to_gradient::1.0) opexprlanguage -s hscript $arg1 opuserdata -n '___Version___' -v '' $arg1  nodeconntype nodeparmtypeFvVBOH~ȀkԼEc342x7^ D%&K=6-}G&H""%JNmLCU:UuNHmw7UuKQ&XQ,6۴-ћEu~\yL9..ԑ/4;#MϟSo1'1gtq)#(;hz4=Lic]۶5s o;w:_>77ont+^E jx.N_?t:t:O;?75;MprqUow5zFh_U&'|t:1\GtKÄѸ4/gklW:t%}s^y/_/o^xI3DЉ"8"`tY(Z)I{BxN;Eu~@'$3%a,XWVYB`4GՇEJ> "bſ5)zޣ_K+(An/> N(ϺO~g# *nul>SXQ_My)GHQ RJ5)OAфQ_idb]Xjr Ɋha|^zVd3qx$ Q_\IHի)Q)ؒKoK%3zyJK^g8I~q (rEc2"_!QպGHLJbeLۓҹɎMȲ(dR6 uh^V֯wRè;M3oF2)ʦj`ݚOG|'F~/YB#-LT۱zc1dB) ]"QDͩO"q<0#C@)K0f2+q1Y%8ĥfIT$I*.gtY~"(e<:ORRhhDӵeB3ˈ anb^)?ƽ|Qnz.L^JxU[UsVQ պLWlFS$+οǻض{ޠ^_)#gOb{dkEGb  c |\Ŗ iu<jfIj|xj,Ɦ6#1@SmTͶl#R E~O[_wk 6jnm?[+c+Ls߻]7Z'feYT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3ɳz [[+aSi C5;)PܷÃyX#@}og/4!4 B2 |Sx1͌ڧv;/W$F Q4 ]L‘Nckwk}t @A-h/ܸ55l%=`H^ 25Վg%*r徹o}CASn{=7;~{<0:{mv6a0l.ޞqxе>UaݎefVB}4}Σ5AQ\)XvݷDW(Ȭzx`c>4.m׵:~`c *=rN +S c|-#`oHm45i֔]MZ:Gf#p04dMv$5~hZ1|swzɫūo5~CheckExternal := 1; ContentsCompressionType := 1; ForbidOutsideParms := 1; GzipContents := 1; LockContents := 1; MakeDefault := 1; ParmsFromVfl := 0; PrefixDroppedParmLabel := 0; PrefixDroppedParmName := 0; SaveCachedCode := 0; SaveIcon := 1; SaveSpareParms := 0; UnlockOnCreate := 0; UseDSParms := 1; COP $HDA_TABLE_AND_NAME SD/Flood Fill PIC2#Nnye53Created by Houdini14.0.321 [12/05/24 09:49:39]g^]www-datak1ehungaryr1~@@uF@Q=tX?!v82ThG_Cp_oeREgV2_p!rVȄgVΌ%bB7xd{qLr2pA6ac @v 0hjApIEWBA{dqIXA0sas'?uyU3`/Fbk6`S:b,6`Ӧb0R6`ݩb;e?uyU3`/FbQ'./+*+--$!'-)&'*,+'-1212-)'*,+& &)&&))%`S,bYS2'..+*+--$!'-)&'*,+'-1212-)'*,+& &)&&))%`5`_bϿ̗'./+*+--$!'-)&'*,+'-1212-)'*,+& &)&&))%`P8b1!c?uyU3`/Fb-" 9FF@?@CG:+!"*:>:669<81:ADBBBBCF;318;7/*.12/00+`A b*" 9FE@?@CG:+!"+:>:66:<81:BDBBBBCE;318;7/*.12/00+`b|h" 9FF@?@CG:+!"+:>:66:<81:BDBBBBCF;318;7/*.12/00+`bx?uyU3`/Fb--.$3P_\XWWXaZC%#%%9NLJHHIIB7BLPNNNNOSD::EE?:>75:7432 `A b*-.$3P_[WVVXaZC%#%%:OLJIHIJB7BMQNNNNOSD::EE?9>75:7432 `b|h-.$3P_\XWWXaZC%#%%:OLJIHIJB7BMQNNNNOSD::FE?:>75:7432 `bx?u yU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ƳľǒS`2bd?uyU3+`/Fb-H^eѱľ׳ļƒS`A b*H^fѱĿֳ̿ļƒS`b|hH^fѲĿ̿׳ļǒS`bx?uyU3,`/Fb-OwԫěӸɥԡśM`A b*OwӪěӸɦԠŜM`b|hOxԫěӸɥԡƜM`bx?uyU3-`/Fb-KƝּҷٰۭ»z|I`A b*KƝּҶٱۭºz|I`b|hKƝּҷٰۭ»z|I`bx?uyU3.`/Fb-IѬϩˠ˹خP`A b*IѬϩ˟̹خP`b|hIѬϩˠ̹خP`bx?uyU3/`/Fb-L˪ͼīîǶͪöťǟ^`A b*L˫̻Ŭ¯ƵͩöŦǟ^`b|hL˫ͼŬïǶͪöŦǟ^`bx?uyU30`/Fb-V޽yîٸ޺٪_`A b*V޽yîٸ߻٫_`b|hV޽yïٸ߻٫_`bx?uyU31`/Fb-Zµ״ڻșȸӸǮذT`A b*ZµشڼșǸӸǯذT`b|hZµ״ٻșȸӸǯذT`bx?uyU32`/Fb-Y彜ʹֵѵN`A b*Z彜ʹῡڿֶѵN`b|hZ彜ʹֶѵN`bx?uyU33`/Fb-W˼ƾí߫иϺŧƷP`A b*W˼ží߫ϷϺħƷP`b|hW˼žíߪиϺħƷP`bx?uyU34`/Fb-W̰ţ㼲Ů͸]`A b*X˰ţ㼳‘Ů͸]`b|hW˰ţ㼳‘Ů͸]`bx?uyU35`/Fb-W䮌涸޻δ˧Ĵ]`A b*X䮋淸޻δ˧Ĵ]`b|hW䮌淸޻δ˧Ĵ]`bx?uyU36`/Fb-YʣݾӫӺ[`A b*ZʣݾҫӺ[`b|hYʣݾҫӺ[`bx?uyU37`/Fb-Z˿ɽҾƩZ`A b*ZʾҾƩߡZ`b|hZʾӿƩZ`bx?uyU38`/Fb-JʭӪuܿƨȻ㚄[`A b*JʭӪuܿƨȻ㙅¿[`b|hJʭԫuܿƨȻ㚅¿[`bx?uyU39`/Fb-Eġ甆̸ܢ[`A b*F߻ġ甆̸ܢZ`b|hFġ甆̸ܢZ`bx?uyU3:`/Fb-I֯ժеϛX`A b*I֯ժдϛW`b|hI֯ժеϛW`bx?uyU3;`/Fb-P˺ƿθȰ⼟œR`A b*P˺žθȰởŒQ`b|hQ˺žθȰ⼟ƓR`bx?uyU3<`/Fb-TҾҬտٶ̒L`A b*TҾҬԿٶ̑L`b|hTҿҬԿٶ̑L`bx?uyU3=`/Fb-Wݱ¬пȸϖS`A b*Xݱ¬пȸϖS`b|hXݱȸϖS`bx?uyU3>`/Fb-Xľŷοǯʼ\`A b*XľŸοǮʼ]`b|hXľŸοǮʼ\`bx?uyU3?`/Fb-VjXopuqmyp[k|s`bt{gfjmlhcburqu}|k_d`A b*VjWopuqmypZk|r`btzgfjmlhcburpu}|k_~d`b|hVjXnpurnzp[k|r`btzgfjnlhcburqv}|k_~d`bx?HouLC1033600ba706751bd83064be737bnode_typeCop HouLC1033600ba006751bd830672b780dhdaroot.inittype = quantico::sd_flood_fill_to_index::1.0 matchesdef = 0 HouLC1033600ba106751bd83078f1fdaehdaroot.defcomment "" position 39.246 -19.0103 connectornextid 0 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { } inputs { } stat { create 1733159321 modify 1733159333 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bbc06751bd8303ef0a9adhdaroot.userdata ___Version___HouLC1033600bb906751bd830a26abf12hdaroot/inputs.inittype = input matchesdef = 1 HouLC1033600bbe06751bd8308841f1efhdaroot/inputs.defcomment "" position 0 5.55112e-17 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render on highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 0 "output1" 1 "output2" } inputsNamed3 { } inputs { } stat { create 1730882032 modify 1731664889 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb906751bd830870458bdhdaroot/inputs.parm{ version 0.8 } HouLC1033600bb506751bd8306611d4e4hdaroot/inputs.userdata ___Version___20.5.410HouLC1033600bb806751bd830ecf989dchdaroot/outputs.inittype = output matchesdef = 1 HouLC1033600bb906751bd830efb52ff2hdaroot/outputs.defcomment "" position 21.9629 -1.72488 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { 0 final_compose 2 1 "input1" 1 shift_count 3 1 "input2" } inputs { 0 final_compose 0 1 1 shift_count 1 1 } stat { create 1730882032 modify 1733159325 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb806751bd8303ce2cd45hdaroot/outputs.parm{ version 0.8 } HouLC1033600bb406751bd830d572f688hdaroot/outputs.userdata ___Version___20.5.410HouLC1033600bb406751bd83011fc6737hdaroot/eval_points.inittype = opencl matchesdef = 1 HouLC1033600bb506751bd830f1863190hdaroot/eval_points.defcomment "" position 3 -1.11022e-16 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 inputs 0 1 "input1" 2 inputs 1 1 "input2" } inputs { 0 inputs 0 1 1 inputs 1 1 } stat { create 1730882309 modify 1733159325 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb506751bd830474ae960hdaroot/eval_points.chn{ channel bindings1_fval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../ignore_shape_smaller_than\") } } } HouLC1033600bb406751bd830d0c33b10hdaroot/eval_points.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill? val=0 #bind layer special_shape_infos? val=0 #bind layer dst noread write float #bind parm ignore_shape_smaller_than float @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float2 size = (float2)(@xres, @yres); float2 val = (pos-@special_shape_infos.xy)*size; bool bVal = dot(val, val) < 0.5f; float fVal = hypot(@flood_fill.z, @flood_fill.w); if (fVal == 0.0f && bVal) { val = @flood_fill.textureNearest(pos-(float2)(1.0f/size.x, 0.0f)).zw; fVal = hypot(val.x, val.y); } if ((fVal >= fmax(@ignore_shape_smaller_than, fmax(1.0f/@xres, 1.0f/@yres))) && bVal) @dst.set(1.0f); else @dst.set(0.0f); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 2 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 1 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "floatn" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( special_shape_infos ) input2_type [ 0 locks=0 ] ( "floatn" ) input2_optional [ 0 locks=0 ] ( "off" ) stdswitcher0_1 [ 0 locks=0 ] ( 1 ) bindings1_name [ 0 locks=0 ] ( ignore_shape_smaller_than ) bindings1_type [ 0 locks=0 ] ( "float" ) bindings1_rampsize [ 0 locks=0 ] ( 1024 ) bindings1_ramptype [ 0 locks=0 ] ( "float" ) bindings1_ramp [ 0 locks=0 ] ( 2 ) bindings1_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings1_layertype [ 0 locks=0 ] ( "float4" ) bindings1_layerborder [ 0 locks=0 ] ( "input" ) bindings1_portname [ 0 locks=0 ] ( "" ) bindings1_volume [ 0 locks=0 ] ( "" ) bindings1_forcealign [ 0 locks=0 ] ( "on" ) bindings1_resolution [ 0 locks=0 ] ( "off" ) bindings1_voxelsize [ 0 locks=0 ] ( "off" ) bindings1_xformtoworld [ 0 locks=0 ] ( "off" ) bindings1_xformtovoxel [ 0 locks=0 ] ( "off" ) bindings1_vdbtype [ 0 locks=0 ] ( "any" ) bindings1_attribute [ 0 locks=0 ] ( "" ) bindings1_attribclass [ 0 locks=0 ] ( "point" ) bindings1_attribtype [ 0 locks=0 ] ( "float" ) bindings1_attribsize [ 0 locks=0 ] ( 1 ) bindings1_precision [ 0 locks=0 ] ( "node" ) bindings1_readable [ 0 locks=0 ] ( "on" ) bindings1_writeable [ 0 locks=0 ] ( "off" ) bindings1_optional [ 0 locks=0 ] ( "off" ) bindings1_defval [ 0 locks=0 ] ( "off" ) bindings1_intval [ 0 locks=0 ] ( 0 ) bindings1_fval [ 8 locks=0 ] ( [ bindings1_fval 0 ] ) bindings1_v2val [ 0 locks=0 ] ( 0 0 ) bindings1_v3val [ 0 locks=0 ] ( 0 0 0 ) bindings1_v4val [ 0 locks=0 ] ( 0 0 0 0 ) bindings1_timescale [ 0 locks=0 ] ( "none" ) bindings1_ramp1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp1value [ 0 locks=0 ] ( 0 ) bindings1_ramp1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp2value [ 0 locks=0 ] ( 1 ) bindings1_ramp2interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp_rgb1c [ 0 locks=0 ] ( 0 0 0 ) bindings1_ramp_rgb1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp_rgb2c [ 0 locks=0 ] ( 1 1 1 ) bindings1_ramp_rgb2interp [ 0 locks=0 ] ( "linear" ) } HouLC1033600bb006751bd83033896d1ehdaroot/eval_points.userdata ___Version___20.5.410HouLC1033600bb006751bd830a2af1fb3hdaroot/fix_miss_points.inittype = opencl matchesdef = 1 HouLC1033600bb106751bd8301c928200hdaroot/fix_miss_points.defcomment "" position 5.18686 -9.71445e-17 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 eval_points 1 1 "input1" } inputs { 0 eval_points 0 1 } stat { create 1730883570 modify 1731665931 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb006751bd830073e07e9hdaroot/fix_miss_points.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer src read float val=0 #bind layer dst write float @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float2 pixSize = (float2)(1.0f/@xres, 1.0f/@yres); if (((@src.textureNearest(pos+(float2)(0.0f, -pixSize.y)) + @src.textureNearest(pos+(float2)(0.0f, pixSize.y)) + @src + @src.textureNearest(pos+(float2)(-pixSize.x, 0.0f)) + @src.textureNearest(pos+(float2)( pixSize.x, 0.0f))) > 1.0f) && (@src == 1.0f)) { @dst.set(1.0f); } else { @dst.set(@src); } } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( src ) input1_type [ 0 locks=0 ] ( "float" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8c06751bd830a8349443hdaroot/fix_miss_points.userdata ___Version___20.5.410HouLC1033600bb106751bd8309c392478hdaroot/vertical_count.inittype = opencl matchesdef = 1 HouLC1033600bb606751bd83093be4569hdaroot/vertical_count.defcomment "" position 7.72061 -1.11022e-16 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" 2 "output2" } inputsNamed3 { 0 fix_miss_points 1 1 "input1" } inputs { 0 fix_miss_points 0 1 } stat { create 1730886709 modify 1731663871 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb106751bd830604ccd15hdaroot/vertical_count.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer src read opt float val=0 #bind layer !&dst #bind layer count read write int @KERNEL { if (@src >= 1.0f) { int coord = @ixy.y*@xres; int old_val = atomic_add((__global int *)(@count.data) + coord, 1); *((__global int *)(@count.data) + coord + old_val + 1) = @ixy.x; } @dst.set(@src); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 2 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=1 ] ( "/* * PROPRIETARY INFORMATION. This software is proprietary to * Side Effects Software Inc., and is not to be reproduced, * transmitted, or disclosed in any way without written permission. * * Produced by: * Side Effects Software Inc * 123 Front Street West, Suite 1401 * Toronto, Ontario * Canada M5J 2M2 * 416-504-9876 * * NAME: interpolate.h ( CE Library, OpenCL) * * COMMENTS: */ #ifndef __INTERPOLATE_H__ #define __INTERPOLATE_H__ // #pragma OPENCL EXTENSION cl_amd_printf : enable /*#ifdef cl_amd_printf #define CHECKNAN(f) if (isnan(f)) { printf(\"%s is NAN, x = %g, y = %g, z = %g\\n\",#f, x, y, z);} #define CHECKNAN2D(f) if (isnan(f)) { printf(\"%s is NAN, x = %g, y = %g\\n\",#f, x, y);} #else*/ #define CHECKNAN(f) #define CHECKNAN2D(f) // #endif #define CLAMPOFFSET 1e-4f static float lerp(float v1, float v2, float t) { return v1 + (v2 - v1)*t; } static float fit01(float t, float v1, float v2) { return mix(v1, v2, clamp(t, 0.0f, 1.0f)); } static float fitTo01(float val, float omin, float omax) { float d = omax - omin; if (fabs(d) < 1e-8f) return 0.5f; if (omin < omax) { if (val < omin) return 0; if (val > omax) return 1; } else { if (val < omax) return 1; if (val > omin) return 0; } return (val - omin) / d; } // in is an array size long of values to be interpolated within the // [0, 1] interval. // pos==0 => in[0] // pos==1 => in[size-1] static float lerpConstant( constant float * in, int size, float pos ) { int m = size - 1; float flr; float t = fract(clamp(pos, 0.0f, 1.0f) * m, &flr); int flooridx = convert_int(flr); int ceilidx = min(flooridx+1, m); return mix(in[flooridx], in[ceilidx], t); } static float3 lerpConstant3( constant float * in, int size, float pos ) { int m = size - 1; float flr; float t = fract(clamp(pos, 0.0f, 1.0f) * m, &flr); int flooridx = convert_int(flr); int ceilidx = min(flooridx+1, m); float3 v1 = vload3(flooridx, in); float3 v2 = vload3(ceilidx, in); return mix(v1, v2, t); } static float centerFromFace(__global const float *a, size_t idx, uint axisstride) { return 0.5f * (a[idx] + a[idx + axisstride]); } static float faceFromCenter(__global const float *a, size_t idx, uint axisstride) { return 0.5f * (a[idx - axisstride] + a[idx]); } static float cornerFromCenter(__global const float *a, size_t idx, uint ystride, uint zstride) { return 0.125f * (a[idx] + a[idx - 1] + a[idx - ystride] + a[idx - zstride] + a[idx - 1 - ystride] + a[idx - 1 - zstride] + a[idx - ystride - zstride] + a[idx - 1 - ystride - zstride]); } static float cornerFromCenter2d(__global const float *a, size_t idx, uint xstride, uint ystride) { return 0.25f * (a[idx] + a[idx - xstride] + a[idx - ystride] + a[idx - xstride - ystride]); } // Calc central difference derivative of cell-centered grid // at a center cell at idx. static float dudxAligned(__global const float *u, const uint idx, const uint xstride, const float inv2dx) { return inv2dx * (u[idx + xstride] - u[idx - xstride]); } // Calc central difference derivative of face-sampled grid // at a center cell at idx. This works for all the off-axes directions // other than the one the face-sampled grid represents. E.g. you can // take the dy-derivative of the x-velocity field. static float dudxAlignedFace(__global const float *u, const uint idx, const uint ustride, const uint xstride, float inv4dx) { return inv4dx * ((u[idx + xstride] + u[idx + ustride + xstride]) - (u[idx - xstride] + u[idx + ustride - xstride])); } // Calc central difference derivative of face-sampled grid // at a center cell at idx. This only works for the derivative along // the axis the face-centered grid represents, e.g. you can only take // the dx-derivative of the x-velocity field. static float dudxFaceAtCenter(__global const float *u, const uint idx, const uint xstride, float invdx) { return invdx * (u[idx + xstride] - u[idx]); } static float dudxCenterAtFace(__global const float *u, const uint idx, const uint xstride, float invdx) { return invdx * (u[idx] - u[idx - xstride]); } // Calc central difference derivative of center-sampled grid at a corner cell // at idx, by first averaging along relevant faces (invdx should incorporate // the averaging factor). axis_stride is stride along the differentiation axis, // and the other strides are along the remaining axes. static float dudxCenterAtCorner(__global const float *u, const uint idx, const uint axis_stride, const uint off_stride1, const uint off_stride2, float inv4dx) { return inv4dx * ((u[idx] + u[idx - off_stride1] + u[idx - off_stride2] + u[idx - off_stride1 - off_stride2]) - (u[idx - axis_stride] + u[idx - off_stride1 - axis_stride] + u[idx - off_stride2 - axis_stride] + u[idx - off_stride1 - off_stride2 - axis_stride])); } static float dudxCenterAtCorner2d(__global const float *u, const uint idx, const uint axis_stride, const uint off_stride, float inv2dx) { return inv2dx * ((u[idx] + u[idx - off_stride]) - (u[idx - axis_stride] + u[idx - off_stride - axis_stride])); } static void bilinear_interp(float x, float y, __global const float *p, size_t idx, __global float *phin, __global float *minphi, __global float *maxphi, uint offset, uint xstride, uint ystride) { // clamp to boundaries x = clamp(x, -1.0f, get_global_size(0) - CLAMPOFFSET); y = clamp(y, -1.0f, get_global_size(1) - CLAMPOFFSET); const int gi = (int)floor(x); const int gj = (int)floor(y); // get fractional part const float sx = x - gi; const float sy = y - gj; size_t srcidx = offset + gi * xstride + gj * ystride; const float i00 = p[srcidx]; const float i10 = p[srcidx + xstride]; const float i01 = p[srcidx + ystride]; const float i11 = p[srcidx + xstride + ystride]; CHECKNAN2D(i00) CHECKNAN2D(i10) CHECKNAN2D(i01) CHECKNAN2D(i11) const float val = (i00 * (1-sx) + i10 * (sx)) * (1-sy) + (i01 * (1-sx) + i11 * (sx)) * ( sy); phin[idx] = val; if (minphi) minphi[idx] = fmin(fmin(fmin(i00, i01), i10), i11); if (maxphi) maxphi[idx] = fmax(fmax(fmax(i00, i01), i10), i11); } static float bilinear_interp_val(float x, float y, __global const float *p, uint offset, uint xstride, uint ystride, uint offx, uint offy) { // clamp to boundaries x = clamp(x, -1.0f, get_global_size(0) - CLAMPOFFSET - offx); y = clamp(y, -1.0f, get_global_size(1) - CLAMPOFFSET - offy); const int gi = (int)floor(x); const int gj = (int)floor(y); // get fractional part const float sx = x - gi; const float sy = y - gj; size_t srcidx = offset + gi * xstride + gj * ystride; const float i00 = p[srcidx]; const float i10 = p[srcidx + xstride]; const float i01 = p[srcidx + ystride]; const float i11 = p[srcidx + xstride + ystride]; return (i00 * (1-sx) + i10 * (sx)) * (1-sy) + (i01 * (1-sx) + i11 * (sx)) * ( sy); } static void trilinear_interp(float x, float y, float z, __global const float *p, size_t idx, __global float *phin, __global float *minphi, __global float *maxphi, uint offset, uint ystride, uint zstride) { x = clamp(x, -1.0f, get_global_size(0) - CLAMPOFFSET); y = clamp(y, -1.0f, get_global_size(1) - CLAMPOFFSET); z = clamp(z, -1.0f, get_global_size(2) - CLAMPOFFSET); const int gi = (int)floor(x); const int gj = (int)floor(y); const int gk = (int)floor(z); const float sx = x - gi; const float sy = y - gj; const float sz = z - gk; size_t srcidx = offset + gi + gj * ystride + gk * zstride; const float i000 = p[srcidx]; const float i100 = p[srcidx + 1]; const float i010 = p[srcidx + ystride]; const float i110 = p[srcidx + 1 + ystride]; const float i001 = p[srcidx + zstride]; const float i101 = p[srcidx + 1 + zstride]; const float i011 = p[srcidx + ystride + zstride]; const float i111 = p[srcidx + 1 + ystride + zstride]; CHECKNAN(i000) CHECKNAN(i100) CHECKNAN(i010) CHECKNAN(i110) CHECKNAN(i001) CHECKNAN(i101) CHECKNAN(i011) CHECKNAN(i111) const float val = ((i000 * (1 - sx) + i100 * (sx)) * (1 - sy) + (i010 * (1 - sx) + i110 * (sx)) * ( sy)) * (1 - sz) + ((i001 * (1 - sx) + i101 * (sx)) * (1 - sy) + (i011 * (1 - sx) + i111 * (sx)) * ( sy)) * ( sz); phin[idx] = val; if (minphi) minphi[idx] = fmin(fmin(fmin(fmin(fmin(fmin(fmin(i000, i001), i010), i011), i100), i101), i110), i111); if (maxphi) maxphi[idx] = fmax(fmax(fmax(fmax(fmax(fmax(fmax(i000, i001), i010), i011), i100), i101), i110), i111); } static float trilinear_interp_val(float x, float y, float z, __global const float *p, uint offset, uint ystride, uint zstride, uint offx, uint offy, uint offz ) { x = clamp(x, -1.0f, get_global_size(0) - CLAMPOFFSET - offx); y = clamp(y, -1.0f, get_global_size(1) - CLAMPOFFSET - offy); z = clamp(z, -1.0f, get_global_size(2) - CLAMPOFFSET - offz); const int gi = (int)floor(x); const int gj = (int)floor(y); const int gk = (int)floor(z); const float sx = x - gi; const float sy = y - gj; const float sz = z - gk; size_t srcidx = offset + gi + gj * ystride + gk * zstride; const float i000 = p[srcidx]; const float i100 = p[srcidx + 1]; const float i010 = p[srcidx + ystride]; const float i110 = p[srcidx + 1 + ystride]; const float i001 = p[srcidx + zstride]; const float i101 = p[srcidx + 1 + zstride]; const float i011 = p[srcidx + ystride + zstride]; const float i111 = p[srcidx + 1 + ystride + zstride]; return ((i000 * (1 - sx) + i100 * (sx)) * (1 - sy) + (i010 * (1 - sx) + i110 * (sx)) * ( sy)) * (1 - sz) + ((i001 * (1 - sx) + i101 * (sx)) * (1 - sy) + (i011 * (1 - sx) + i111 * (sx)) * ( sy)) * ( sz); } static float bilinear_interp_vol(float2 pos, __global const float *p, uint offset, uint xstride, uint ystride, uint resx, uint resy) { float x = clamp(pos.x-0.5f, (float)0, (float)(resx-1)); float y = clamp(pos.y-0.5f, (float)0, (float)(resy-1)); const int gi = (int)floor(x); const int gj = (int)floor(y); // In case our clamp is exactly res#-1 const int dx = select((int)xstride, (int)0, gi == resx-1); const int dy = select((int)ystride, (int)0, gj == resy-1); const float sx = x - gi; const float sy = y - gj; size_t srcidx = offset + gi * xstride + gj * ystride; const float i000 = p[srcidx]; const float i100 = p[srcidx + dx]; const float i010 = p[srcidx + dy]; const float i110 = p[srcidx + dx + dy]; return mix( mix(i000, i100, sx), mix(i010, i110, sx), sy); } static float trilinear_interp_vol(float3 pos, __global const float *p, uint offset, uint xstride, uint ystride, uint zstride, uint resx, uint resy, uint resz) { float x = clamp(pos.x-0.5f, (float)0, (float)(resx-1)); float y = clamp(pos.y-0.5f, (float)0, (float)(resy-1)); float z = clamp(pos.z-0.5f, (float)0, (float)(resz-1)); const int gi = (int)floor(x); const int gj = (int)floor(y); const int gk = (int)floor(z); // In case our clamp is exactly res#-1 const int dx = select((int)xstride, (int)0, gi == resx-1); const int dy = select((int)ystride, (int)0, gj == resy-1); const int dz = select((int)zstride, (int)0, gk == resz-1); const float sx = x - gi; const float sy = y - gj; const float sz = z - gk; size_t srcidx = offset + gi * xstride + gj * ystride + gk * zstride; const float i000 = p[srcidx]; const float i100 = p[srcidx + dx]; const float i010 = p[srcidx + dy]; const float i110 = p[srcidx + dx + dy]; const float i001 = p[srcidx + dz]; const float i101 = p[srcidx + dx + dz]; const float i011 = p[srcidx + dy + dz]; const float i111 = p[srcidx + dx + dy + dz]; return mix( mix( mix(i000, i100, sx), mix(i010, i110, sx), sy), mix( mix(i001, i101, sx), mix(i011, i111, sx), sy), sz); } static float4 linesegInterpolationWeights(float u) { return (float4)(1 - u, u, 0, 0); } // From GEOtriInterpolationWeights, but static float4 triInterpolationWeights(float u, float v) { // Triangle - use barycentric coordinates // This is a hack to make sure we are given proper // barycentric u, v coordinates. That is, we require // u+v <= 1, and if that's not the case we hack it so // u = 1-u, v = 1-v, thus ensuring u+v <= 1. (This // assumes that u, v are each between 0 and 1) // This is used for when evaluateInteriorPoint is // called from POP_GenVar for birthing from a surface. // // Note we actually flip on the u+v = 1 axis instead // of what is described above so slightly outside points // do not teleport to opposite locations. float uv = 1 - u - v; // Assume valid uv's. #if 0 if (uv < 0) { u += uv; v += uv; uv = -uv; } #endif return (float4) (uv, u, v, 0); } // From GEOquadInterpolationWeights static float4 quadInterpolationWeights(float u, float v) { float u1 = 1 - u; float v1 = 1 - v; return (float4)(u1 * v1, u1 * v, u * v, u * v1); } // From GEO_PrimTetrahedron::remapTetCoords static float4 tetInterpolationWeights(float u, float v, float w) { float uvw = 1 - u - v - w; // Assume valid uv's. #if 0 if (uvw < 0) { // Mirror in u + v == 1 plane, reducing from 6 tetrahedra to 3, // i.e. a right triangular prism, whose right-angle edge is // along the w axis. if (u + v > 1) { float bary = 1 - u - v; u += bary; v += bary; uvw -= 2 * bary; } // Mirror the far tetrahedron (shares no face with the tet to keep) // into the middle tetrahedron (shares one face with the tet to keep) if (u + w > 1) { // Weight of point at (1,0,1), since 1+1-1 = 1 float weight = (u + w - 1); // Subtract component of (1,0,1), which only changes u and w u -= weight;//*1 //v -= weight*0; w -= weight;//*1 // Add component of (0,1,0), which only changes v //u += weight*0; v += weight;//*1 //w += weight*0; // Update uvw uvw += weight; } // Mirror the remaining outside tetrahedron into the tet to keep if (uvw < 0) { // Weight of point at (0,1,1), since -(1-0-1-1) = 1 float weight = -uvw; // Subtract component of (0,1,1), which only changes v and w //u -= weight*0 v -= weight;//*1 w -= weight;//*1 // Add component of (0,0,0), which requires no change // Update uvw uvw = -uvw; //equivalent to uvw += 2*weight; } } #endif return (float4)(uvw, u, v, w); } void computeSubdCurveCoeffsAndIndices( float u, int n, bool closed, float4 *coeffs_ptr, int4 *indices_ptr) { const float16 theSubDFirstBasis = { 1.0, -1.0, 0.0, 1.0/6.0, 0.0, 1.0, 0.0, -1.0/3.0, 0.0, 0.0, 0.0, 1.0/6.0, 0.0, 0.0, 0.0, 0.0 }; const float16 theOpenBasis = { 1.0/6.0, -0.5, 0.5, -1.0/6.0, 2.0/3.0, 0.0, -1.0, 0.5, 1.0/6.0, 0.5, 0.5, -0.5, 0.0, 0.0, 0.0, 1.0/6.0 }; float4 coeffs = 0.0; int4 indices = 0.0; // UT_ASSERT_P(n >= 1); // Special cases for n <= 2 if (n == 1) { indices.x = -1; indices.y = 0; indices.z = -1; indices.w = -1; coeffs.x = 0; coeffs.y = 1; coeffs.z = 0; coeffs.w = 0; *coeffs_ptr = coeffs; *indices_ptr = indices; } else if (n == 2) { if (closed) { u *= 2; if (u > 1) u = 2-u; } indices.x = -1; indices.y = 0; indices.z = 1; indices.w = -1; coeffs.x = 0.0; coeffs.y = 1.0 - u; coeffs.z = u; coeffs.w = 0.0; } const float16 *basis = &theOpenBasis; const float16 *midbasis = &theOpenBasis; int nedges = n - !closed; u *= nedges; int i = floor(u); i = clamp(i, 0, nedges-1); float t = u - i; float16 temp; if (i == 0) { if (closed) { indices.x = n-1; indices.y = 0; indices.z = 1; indices.w = 2; } else { basis = &theSubDFirstBasis; indices.x = 0; indices.y = 1; indices.z = 2; indices.w = -1; } } else if (i >= n-2) { if (closed) { if (i == n-2) { indices.x = n-3; indices.y = n-2; indices.z = n-1; indices.w = 0; } else { // UT_ASSERT_P(i == n-1); indices.x = n-2; indices.y = n-1; indices.z = 0; indices.w = 1; } } else { basis = &theSubDFirstBasis; indices.x = -1; indices.y = n-3; indices.z = n-2; indices.w = n-1; temp.lo.lo = (*basis).hi.hi; temp.lo.hi = (*basis).hi.lo; temp.hi.lo = (*basis).lo.hi; temp.hi.hi = (*basis).lo.lo; basis = &temp; t = 1-t; } } else { indices.x = i-1; indices.y = i; indices.z = i+1; indices.w = i+2; } float t2 = t*t; float4 tpow = {1.0f, t, t2, t2*t}; (*coeffs_ptr).x = dot(tpow, (*basis).lo.lo); (*coeffs_ptr).y = dot(tpow, (*basis).lo.hi); (*coeffs_ptr).z = dot(tpow, (*basis).hi.lo); (*coeffs_ptr).w = dot(tpow, (*basis).hi.hi); *indices_ptr = indices; } float3 evaluateCubicCoeffs_vload3(float4 coeffs, int4 indices, global float *values) { float3 res = 0; if (indices.x >= 0) res += coeffs.x * vload3(indices.x, values); if (indices.y >= 0) res += coeffs.y * vload3(indices.y, values); if (indices.z >= 0) res += coeffs.z * vload3(indices.z, values); if (indices.w >= 0) res += coeffs.w * vload3(indices.w, values); return res; } float3 evaluateCubicCoeffs_3(float4 coeffs, int4 indices, float3 *values) { float3 res = 0; if (indices.x >= 0) res += coeffs.x * values[indices.x]; if (indices.y >= 0) res += coeffs.y * values[indices.y]; if (indices.z >= 0) res += coeffs.z * values[indices.z]; if (indices.w >= 0) res += coeffs.w * values[indices.w]; return res; } #endif /* * PROPRIETARY INFORMATION. This software is proprietary to * Side Effects Software Inc., and is not to be reproduced, * transmitted, or disclosed in any way without written permission. * * Produced by: * Side Effects Software Inc * 123 Front Street West, Suite 1401 * Toronto, Ontario * Canada M5J 2M2 * 416-504-9876 * * NAME: typedefines.h ( CE Library, OpenCL) * * COMMENTS: OpenCL type definitions */ #ifndef __TYPE_DEFINE_H__ #define __TYPE_DEFINE_H__ // The OpenCL SOP/DOP might define // these before compilation for 32-/64-bit support, // so only define them if not already defined. #ifndef fpreal // The USE_DOUBLE flag is used by the older OpenCL-enabled // DOPs that make up the Pyro solver. #ifdef USE_DOUBLE #pragma OPENCL EXTENSION cl_khr_fp64: enable #define fpreal double #define fpreal2 double2 #define fpreal3 double3 #define fpreal4 double4 #define fpreal8 double8 #define fpreal16 double16 #define FPREAL_PREC 64 // We also want to define exint as long in this case. #define USE_LONG #else #define fpreal float #define fpreal2 float2 #define fpreal3 float3 #define fpreal4 float4 #define fpreal8 float8 #define fpreal16 float16 #define FPREAL_PREC 32 #endif #endif #if FPREAL_PREC==64 // Load a 64-bit fpreal2 from a float2 buffer. static fpreal2 vload2f(size_t i, const global float *b) { i *= 2; return (fpreal2)(b[i], b[i + 1]); } // Load a 64-bit fpreal3 from a float3 buffer. static fpreal3 vload3f(size_t i, const global float *b) { i *= 3; return (fpreal3)(b[i], b[i+1], b[i+2]); } // Load a 64-bit fpreal4 from a float4 buffer. static fpreal4 vload4f(size_t i, const global float *b) { i *= 4; return (fpreal4)(b[i], b[i+1], b[i+2], b[i+3]); } // Store a 64-bit fpreal3 into a float3 buffer. static void vstore3f(fpreal3 a, size_t i, global float *b) { vstore3((float3)(a.x, a.y, a.z), i, b); } // Store a 64-bit fpreal4 into a float4 buffer. static void vstore4f(fpreal4 a, size_t i, global float *b) { vstore4((float4)(a.x, a.y, a.z, a.w), i, b); } #else // Load a 32-bit fpreal2 from a float2 buffer (no-op). #define vload2f vload2 // Load a 32-bit fpreal3 from a float3 buffer (no-op). #define vload3f vload3 // Load a 32-bit fpreal4 from a float4 buffer (no-op). #define vload4f vload4 // Store a 32-bit fpreal3 into a float3 buffer (no-op). #define vstore3f vstore3 // Store a 32-bit fpreal4 into a float4 buffer (no-op). #define vstore4f vstore4 #endif // The OpenCL SOP/DOP might define // these before compilation for 32-/64-bit support, // so only define them if not already defined. #ifndef exint #ifdef USE_LONG #define exint long #define exint2 long2 #define exint3 long3 #define exint4 long4 #else #define exint int #define exint2 int2 #define exint3 int3 #define exint4 int4 #endif #endif #endif /* * PROPRIETARY INFORMATION. This software is proprietary to * Side Effects Software Inc., and is not to be reproduced, * transmitted, or disclosed in any way without written permission. * * Produced by: * Side Effects Software Inc * 123 Front Street West, Suite 1401 * Toronto, Ontario * Canada M5J 2M2 * 416-504-9876 * * NAME: util.h ( CE Library, OpenCL) * * COMMENTS: */ #ifndef __UTIL_H__ #define __UTIL_H__ static void swapf(fpreal *a, fpreal *b) { fpreal t = *a; *a = *b; *b = t; } #endif /* * PROPRIETARY INFORMATION. This software is proprietary to * Side Effects Software Inc., and is not to be reproduced, * transmitted, or disclosed in any way without written permission. * * Produced by: * Side Effects Software Inc * 123 Front Street West, Suite 1401 * Toronto, Ontario * Canada M5J 2M2 * 416-504-9876 * * NAME: matrix.h ( CE Library, OpenCL) * * COMMENTS: */ #ifndef __MATRIX_H__ #define __MATRIX_H__ // #include \"typedefines.h\" // #include \"util.h\" #define PRINTF(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%g\\n\", v) #define PRINTVEC3(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%g %g %g\\n\", v.x, v.y, v.z) #define PRINTVEC3I(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%d %d %d\\n\", v.x, v.y, v.z) #define PRINTMAT3(m) \\ printf(\"%s:\\n\", #m); \\ printf(\"%g %g %g\\n\", m[0].s0, m[0].s1, m[0].s2); \\ printf(\"%g %g %g\\n\", m[1].s0, m[1].s1, m[1].s2); \\ printf(\"%g %g %g\\n\", m[2].s0, m[2].s1, m[2].s2) #define PRINTMAT4(m) \\ printf(\"%s:\\n\", #m); \\ printf(\"%g %g %g %g\\n\", m.s0, m.s1, m.s2, m.s3); \\ printf(\"%g %g %g %g\\n\", m.s4, m.s5, m.s6, m.s7); \\ printf(\"%g %g %g %g\\n\", m.s8, m.s9, m.sa, m.sb); \\ printf(\"%g %g %g %g\\n\", m.sc, m.sd, m.se, m.sf) // A 3x3 matrix in row-major order (to match UT_Matrix3) // NOTE: fpreal3 is 4 floats, so this is size 12 typedef fpreal3 mat3[3]; // A 3x2 matrix in row-major order typedef fpreal2 mat32[3]; // A 2x2 matrix in row-major order, stored in a single fpreal4 typedef fpreal4 mat2; // A 4x4 matrix in row-major order, stored in a single fpreal16 typedef fpreal16 mat4; // Return the sum of entries of the vector v. static fpreal vec3sum(const fpreal3 v) { return v.x + v.y + v.z; } // Return the product of entries of the vector v. static fpreal vec3prod(const fpreal3 v) { return v.x * v.y * v.z; } // Create a 2x2 matrix with columns of the specified vectors. static mat2 mat2fromcols(const fpreal2 c0, const fpreal2 c1) { return (mat2)(c0.s0, c1.s0, c0.s1, c1.s1); } // Transpose a 2x2 matrix. static mat2 transpose2(const mat2 a) { return (mat2)(a.even, a.odd); } // Multiply A * B for 2x2 matrices. static mat2 mat2mul(const mat2 a, const mat2 b) { return (mat2)(dot(a.lo, b.even), dot(a.lo, b.odd), dot(a.hi, b.even), dot(a.hi, b.odd)); } // Multiply b * A where b is a 2-vector and A is a 2x2 matrix. // This multiplication order matches VEX. static fpreal2 mat2vecmul(const mat2 a, const fpreal2 b) { mat2 aT = transpose2(a); return (fpreal2)(dot(aT.lo, b), dot(aT.hi, b)); } // Return the square of the L2-norm of a 2x2 matrix. static fpreal squaredNorm2(const mat2 a) { return dot(a.lo, a.lo) + dot(a.hi, a.hi); } // Add 3x3 matrix A to matrix B and store the result in matrix C. static void mat3add(const mat3 a, const mat3 b, mat3 c) { c[0] = a[0] + b[0]; c[1] = a[1] + b[1]; c[2] = a[2] + b[2]; } // Subtract 3x3 matrix A from matrix B and store the result in C. static void mat3sub(const mat3 a, const mat3 b, mat3 c) { c[0] = a[0] - b[0]; c[1] = a[1] - b[1]; c[2] = a[2] - b[2]; } // Set 3x3 matrix A to zero. static void mat3zero(mat3 a) { a[0] = (fpreal3)(0.0f); a[1] = (fpreal3)(0.0f); a[2] = (fpreal3)(0.0f); } // Set 3x3 matrix A to the identity. static void mat3identity(mat3 a) { a[0] = (fpreal3)(1.0f, 0.0f, 0.0f); a[1] = (fpreal3)(0.0f, 1.0f, 0.0f); a[2] = (fpreal3)(0.0f, 0.0f, 1.0f); } // Copy 3x3 matrix A to matrix B. static void mat3copy(const mat3 a, mat3 b) { b[0] = a[0]; b[1] = a[1]; b[2] = a[2]; } // Load a 3x3 matrix from memory at the specified index. // The matrix should be row-major as stored in geometry // attributes. static void mat3load(size_t idx, const global float *a, mat3 m) { idx *= 3; m[0] = vload3f(idx, a); m[1] = vload3f(idx + 1, a); m[2] = vload3f(idx + 2, a); } // Store a 3x3 matrix to memory at the specified index. // The matrix should be row-major as stored in geometry // attributes. void mat3store(mat3 in, int idx, global fpreal *data) { idx *= 3; vstore3(in[0], idx, data); vstore3(in[1], idx + 1, data); vstore3(in[2], idx + 2, data); } // Create a 3x3 matrix with columns of the specified vectors. static void mat3fromcols(const fpreal3 c0, const fpreal3 c1, const fpreal3 c2, mat3 m) { m[0] = (fpreal3)(c0.s0, c1.s0, c2.s0); m[1] = (fpreal3)(c0.s1, c1.s1, c2.s1); m[2] = (fpreal3)(c0.s2, c1.s2, c2.s2); } // Transpose a 3x3 matrix. static void transpose3(const mat3 a, mat3 b) { mat3fromcols(a[0], a[1], a[2], b); } // Multiply A * B and store in C for 3x3 matrices. static void mat3mul(const mat3 a, const mat3 b, mat3 c) { mat3 bT; transpose3(b, bT); c[0] = (fpreal3)(dot(a[0],bT[0]), dot(a[0],bT[1]), dot(a[0],bT[2])); c[1] = (fpreal3)(dot(a[1],bT[0]), dot(a[1],bT[1]), dot(a[1],bT[2])); c[2] = (fpreal3)(dot(a[2],bT[0]), dot(a[2],bT[1]), dot(a[2],bT[2])); } // Multiply b * A where b is a 3-vector and A is a 3x3 matrix. // This multiplication order matches VEX. static fpreal3 mat3vecmul(const mat3 a, const fpreal3 b) { mat3 aT; transpose3(a, aT); return (fpreal3)(dot(aT[0], b), dot(aT[1], b), dot(aT[2], b)); } // Multiply b * A^T where b is a 3-vector and A is a 3x3 matrix. // This multiplication order matches VEX. static fpreal3 mat3Tvecmul(const mat3 a, const fpreal3 b) { return (fpreal3)(dot(a[0], b), dot(a[1], b), dot(a[2], b)); } // Multiply b * A where b is a 3-vector and A is a 3x3 matrix, // but discard the third component. // This multiplication order matches VEX. static fpreal2 mat3vec2mul(const mat3 a, const fpreal3 b) { mat3 aT; transpose3(a, aT); return (fpreal2)(dot(aT[0], b), dot(aT[1], b)); } // Multiply b * A^T where b is a 3-vector and A is a 3x3 matrix, // but discard the third component. // This multiplication order matches VEX. static fpreal2 mat3Tvec2mul(const mat3 a, const fpreal3 b) { return (fpreal2)(dot(a[0], b), dot(a[1], b)); } // Store the 3x3 matrix that is the outer product of the input // a and b vectors in C. static void outerprod3(const fpreal3 a, const fpreal3 b, mat3 c) { c[0] = a.x * b; c[1] = a.y * b; c[2] = a.z * b; } // Compute C = s * A + t * B, where s, t are scalars and A, B are 3x3 matrices. static void mat3lcombine(const fpreal s, const mat3 a, const fpreal t, const mat3 b, mat3 c) { c[0] = s * a[0] + t * b[0]; c[1] = s * a[1] + t * b[1]; c[2] = s * a[2] + t * b[2]; } // Return the square of the L2-norm of a 3x3 matrix. static fpreal squaredNorm3(const mat3 a) { return dot(a[0], a[0]) + dot(a[1], a[1]) + dot(a[2], a[2]); } // Return the determinant of the supplied 3x3 matrix. static fpreal det3(const mat3 a) { fpreal d = a[0].s0 * (a[1].s1 * a[2].s2 - a[1].s2 * a[2].s1); d -= a[0].s1 * (a[1].s0 * a[2].s2 - a[1].s2 * a[2].s0); d += a[0].s2 * (a[1].s0 * a[2].s1 - a[1].s1 * a[2].s0); return d; } // Return diagonal vector of the supplied 3x3 matrix. static fpreal3 diag3(const mat3 a) { return (fpreal3)(a[0].s0, a[1].s1, a[2].s2); } // Set a to the 3x3 diagonal matrix defined by the entries of the vector diag. static void mat3diag(const fpreal3 diag, mat3 a) { mat3zero(a); a[0].x = diag.x; a[1].y = diag.y; a[2].z = diag.z; } // Return the trace of the supplied 3x3 matrix. static fpreal trace3(const mat3 m) { return vec3sum(diag3(m)); } // Set 4x4 matrix A to the identity. static void mat4identity(mat4 *a) { (*a).lo.lo = (fpreal4)(1.0f, 0.0f, 0.0f, 0.0f); (*a).lo.hi = (fpreal4)(0.0f, 1.0f, 0.0f, 0.0f); (*a).hi.lo = (fpreal4)(0.0f, 0.0f, 1.0f, 0.0f); (*a).hi.hi = (fpreal4)(0.0f, 0.0f, 0.0f, 1.0f); } // Multiply b * A where b is a 2-vector and A is a 4x4 matrix. // This multiplication order matches VEX. static fpreal2 mat4vec2mul(const mat4 a, const fpreal2 b) { return b.x * a.lo.lo.xy + b.y * a.lo.hi.xy + a.hi.hi.xy; } // Multiply b * A where b is a 3-vector and A is a 4x3 matrix, // assuming a fourth component of the vector to be 0, i.e. // the typical transformation of a 3d vector by a matrix. // This multiplication order matches VEX. static fpreal3 mat43vec3mul(const mat4 a, const fpreal3 b) { fpreal4 result = b.x * a.lo.lo + b.y * a.lo.hi + b.z * a.hi.lo; return (fpreal3)(result.x, result.y, result.z); } // Multiply b * A where b is a 3-vector and A is a 4x4 matrix, // assuming a fourth component of the vector to be 1, i.e. // the typical transformation of a 3d point by a matrix. // This multiplication order matches VEX.static fpreal3 static fpreal3 mat4vec3mul(const mat4 a, const fpreal3 b) { fpreal4 result = b.x * a.lo.lo + b.y * a.lo.hi + b.z * a.hi.lo + a.hi.hi; return (fpreal3)(result.x, result.y, result.z); } // Multiply b * A where b is a 3-vector and A is a 4x4 matrix. // This multiplication order matches VEX. static fpreal4 mat4vecmul(const mat4 a, const fpreal4 b) { fpreal4 result = b.x * a.lo.lo + b.y * a.lo.hi + b.z * a.hi.lo + b.w * a.hi.hi; return result; } // UT_Matrix4::solveColumn // cp: pivot_col and pivot_row // c1, c2, c3: other columns and rows static void mat4solvecol(fpreal (*matx)[4][4], int cp) { fpreal pivot_value_inverse; int c1, c2, c3; switch (cp) { case 0: c1 = 1; c2 = 2; c3 = 3; break; case 1: c1 = 0; c2 = 2; c3 = 3; break; case 2: c1 = 0; c2 = 1; c3 = 3; break; case 3: c1 = 0; c2 = 1; c3 = 2; break; } // Here we will find the inverse of the pivot, set the pivot to 1, // and multiply the row which contains the pivot by the pivot // inverse. This might seem a little weird. The algorithm does it // this way so that it can gradually replace the input matrix // with its inverse. pivot_value_inverse = 1.0F/(*matx)[cp][cp]; (*matx)[cp][cp] = pivot_value_inverse; (*matx)[cp][c1] *= pivot_value_inverse; (*matx)[cp][c2] *= pivot_value_inverse; (*matx)[cp][c3] *= pivot_value_inverse; // Now we subtract multiples of the pivot row from the other // rows in the matrix. This would be more familiar if the pivot // itself hadn't been set to 1 before the pivot row was multiplied // by the inverse (see above). (*matx)[c1][c1] -= (*matx)[cp][c1]*(*matx)[c1][cp]; (*matx)[c1][c2] -= (*matx)[cp][c2]*(*matx)[c1][cp]; (*matx)[c1][c3] -= (*matx)[cp][c3]*(*matx)[c1][cp]; (*matx)[c2][c1] -= (*matx)[cp][c1]*(*matx)[c2][cp]; (*matx)[c2][c2] -= (*matx)[cp][c2]*(*matx)[c2][cp]; (*matx)[c2][c3] -= (*matx)[cp][c3]*(*matx)[c2][cp]; (*matx)[c3][c1] -= (*matx)[cp][c1]*(*matx)[c3][cp]; (*matx)[c3][c2] -= (*matx)[cp][c2]*(*matx)[c3][cp]; (*matx)[c3][c3] -= (*matx)[cp][c3]*(*matx)[c3][cp]; (*matx)[c1][cp] *= -pivot_value_inverse; (*matx)[c2][cp] *= -pivot_value_inverse; (*matx)[c3][cp] *= -pivot_value_inverse; } // UT_Matrix4::invert // Linear equation solution by Gauss-Jordan elimination. static int mat4invert(fpreal16 *m) { fpreal tol = 0.0; fpreal (*matx)[4][4] = (fpreal (*)[4][4]) m; int indexcol[4], indexrow[4]; int pivot_row, pivot_col; // Check for the very common case of trivial column 3. const bool is_trivial_col3 = ((*matx)[0][3] == 0) && ((*matx)[1][3] == 0) && ((*matx)[2][3] == 0) && ((*matx)[3][3] == 1); // We will need to keep track of which columns we have already found // pivots in. For this we use what is essentially a set of flags in the // array \"pivoted_columns_flags\". We initialize them to 0 here. bool pivoted_columns_flags[4] = {false, false, false, false}; // In order to invert an n*n matrix, we will have to find n pivots, and // for each pivot reduce each row. We will keep track of which pivot and // set of reductions we are working on with \"reduction\" for (int reduction = 0; reduction < 4; reduction++) { fpreal pivot_value = 0; // This is the outer loop of the search for a pivot element // This loop finds the pivot element by choosing the element of the // matrix which has the largest absolute value of all elements of the // array not in columns/rows that contain a previously used pivot. for (int row = 0; row < 4; row++) { // if there hasn't already been a pivot in this row if ( !pivoted_columns_flags[row] ) { // if there hasn't already been a pivot in column 0 if ( !pivoted_columns_flags[0] ) { const fpreal abs_element_value = fabs((*matx)[row][0]); if ( abs_element_value > pivot_value ) { pivot_value = abs_element_value; pivot_row = row; pivot_col = 0; } } // if there hasn't already been a pivot in column 1 if ( !pivoted_columns_flags[1] ) { const fpreal abs_element_value = fabs((*matx)[row][1]); if ( abs_element_value > pivot_value ) { pivot_value = abs_element_value; pivot_row = row; pivot_col = 1; } } // if there hasn't already been a pivot in column 2 if ( !pivoted_columns_flags[2] ) { const fpreal abs_element_value = fabs((*matx)[row][2]); if ( abs_element_value > pivot_value ) { pivot_value = abs_element_value; pivot_row = row; pivot_col = 2; } } // if there hasn't already been a pivot in column 3 if ( !pivoted_columns_flags[3] ) { const fpreal abs_element_value = fabs((*matx)[row][3]); if ( abs_element_value > pivot_value ) { pivot_value = abs_element_value; pivot_row = row; pivot_col = 3; } } } } // Odd check here if the matrix is filled with nan's or infinities // Verify that the pivot we found is not 0 if (pivot_value <= tol) { return 1; } // Now we have found the pivot element for the current reduction. // This element of the matrix is the largest element of all elements // not in rows and columns previously used for other pivots. // Record that we have found a pivot in the current column pivoted_columns_flags[pivot_col] = true; indexrow[reduction] = pivot_row; indexcol[reduction] = pivot_col; // The pivot must be on the diagonal before we can use it. If the // pivot we found wasn't already on the diagonal, we swap rows to // put it there now. if ( pivot_row != pivot_col ) { swapf(&(*matx)[pivot_row][0], &(*matx)[pivot_col][0]); swapf(&(*matx)[pivot_row][1], &(*matx)[pivot_col][1]); swapf(&(*matx)[pivot_row][2], &(*matx)[pivot_col][2]); swapf(&(*matx)[pivot_row][3], &(*matx)[pivot_col][3]); } // Note that from here on, the pivot is on the diagonal, and thus // has the same row index as column index. In particular, while // we may have swapped the row the pivot is in, we have not changed // the column. Thus, the pivot location will be referred to using // pivot_col only. switch (pivot_col) { case 0: mat4solvecol(matx, 0); break; case 1: mat4solvecol(matx, 1); break; case 2: mat4solvecol(matx, 2); break; case 3: mat4solvecol(matx, 3); break; } } // Finally, we \"unscramble\" the matrix, which was scrambled by // row swapping. This will produce the actual inverse of the matrix. for (int reduction = 3; reduction >= 0; reduction--) { int irow = indexrow[reduction]; int icol = indexcol[reduction]; if ( irow != icol ) { swapf(&(*matx)[0][irow], &(*matx)[0][icol]); swapf(&(*matx)[1][irow], &(*matx)[1][icol]); swapf(&(*matx)[2][irow], &(*matx)[2][icol]); swapf(&(*matx)[3][irow], &(*matx)[3][icol]); } } if (is_trivial_col3) { // Force column 3 to be exact if input column 3 was exactly trivial. (*matx)[0][3] = 0; (*matx)[1][3] = 0; (*matx)[2][3] = 0; (*matx)[3][3] = 1; } return 0; } static fpreal mat2det(const mat2 m) { return m.x * m.w - m.y * m.z; } static fpreal mat2inv(const mat2 m, mat2 *minvout) { fpreal det = mat2det(m); if (det == 0) return 0; *minvout = (mat2)( m.w, -m.y, -m.z, m.x ) / det; return det; } static fpreal mat3inv(const mat3 m, mat3 minvout) { fpreal det = det3(m); if (det == 0) return 0; // Inverse[r][c] = Det(of m excluding r,c) / Det(m) minvout[0] = (fpreal3)( mat2det((mat2)(m[1].yz, m[2].yz)), mat2det((mat2)(m[1].xz, m[2].xz)), mat2det((mat2)(m[1].xy, m[2].xy)) ) / det; minvout[1] = (fpreal3)( mat2det((mat2)(m[0].yz, m[2].yz)), mat2det((mat2)(m[0].xz, m[2].xz)), mat2det((mat2)(m[0].xy, m[2].xy)) ) / det; minvout[2] = (fpreal3)( mat2det((mat2)(m[0].yz, m[1].yz)), mat2det((mat2)(m[0].xz, m[1].xz)), mat2det((mat2)(m[0].xy, m[1].xy)) ) / det; return det; } static void mat3scale(mat3 mout, const mat3 m, fpreal scale) { mout[0] = m[0] * scale; mout[1] = m[1] * scale; mout[2] = m[2] * scale; } static void mat3lincomb2(mat3 mout, const mat3 m1, fpreal scale1, const mat3 m2, fpreal scale2) { mout[0] = m1[0] * scale1 + m2[0] * scale2; mout[1] = m1[1] * scale1 + m2[1] * scale2; mout[2] = m1[2] * scale1 + m2[2] * scale2; } // Rotates the incoming positions with the given angle in degrees. // It's more efficient to make a rotation matrix if you're going to rotate multiple matrices by the same angle static fpreal2 rotate2D(fpreal2 pos, fpreal angle) { angle = -angle * M_PI_F/180.0f; fpreal ca; fpreal sa = sincos(angle, &ca); mat2 rot = (mat2)(ca, sa, -sa, ca); return mat2vecmul(rot, pos); } #ifndef NO_DOUBLE_SUPPORT // Double versions of subset of the above functions // (mainly for shapematching ATM). typedef double3 mat3d[3]; static void mat3fromcolsd(const double3 c0, const double3 c1, const double3 c2, mat3d m) { m[0] = (double3)(c0.s0, c1.s0, c2.s0); m[1] = (double3)(c0.s1, c1.s1, c2.s1); m[2] = (double3)(c0.s2, c1.s2, c2.s2); } static void transpose3d(const mat3d a, mat3d b) { mat3fromcolsd(a[0], a[1], a[2], b); } #endif #endif #ifndef __IMX_H__ #define __IMX_H__ /****************************************************************************** * VERBOSITY OPTIONS ******************************************************************************/ // By defining certain symbols before including this header, different error // reporting options can be enabled. These options are listed in the table // below. // SYMBOL || EFFECT // CHECK_RANGE || Report out-of-range indexing of buffers // CHECK_STORAGE_TYPE_READ || Reports attempts to read floating point // || values from integer layers or integer values // || from floating point layers. // CHECK_STORAGE_TYPE_WRITE || Reports attempts to write floating point // || values to integer layers or integer values // || to floating point layers. // CHECK_STORAGE_TYPE_CON || Report if IMX_Layer storage type is not equal // || to the (compile-time constant) storage argument // CHECK_CHANNEL_COUNT_CON || Report if IMX_Layer channels is not equal // || to the (compile-time constant) channels argument // Note that the checks are done only when the respective symbol is defined, so // these should only be used for validation and debugging purposes. /****************************************************************************** * STRUCTURES ******************************************************************************/ // Scale-translate transform. typedef float4 STXform; // Border type for a layer. typedef enum { IMX_CONSTANT, IMX_CLAMP, IMX_MIRROR, IMX_WRAP } BorderType; typedef enum { IMX_TYPEINFO_NONE, IMX_TYPEINFO_COLOR, IMX_TYPEINFO_POSITION, IMX_TYPEINFO_VECTOR, IMX_TYPEINFO_NORMAL, IMX_TYPEINFO_OFFSETNORMAL, IMX_TYPEINFO_TEXTURE_COORD, IMX_TYPEINFO_ID, IMX_TYPEINFO_MASK, IMX_TYPEINFO_SDF, IMX_TYPEINFO_HEIGHT } TypeInfoType; // Type of data stored in a layer. typedef enum { INT8, INT16, INT32, FLOAT16, FLOAT32, // dummy values used to indicate IMX_Buffer::isConstant(): CONSTANT_INT8, CONSTANT_INT16, CONSTANT_INT32, CONSTANT_FLOAT16, CONSTANT_FLOAT32 } StorageType; // A structure containing metadata for a layer. typedef struct { float16 image_to_world; float16 world_to_image; STXform buffer_to_image; STXform image_to_buffer; STXform buffer_to_pixel; float4 default_f; int4 default_i; int2 resolution; int channels; int stride_x, stride_y; BorderType border; // Typeinfo is a hint and should only affect computation in the rarest // of situations. TypeInfoType typeinfo; StorageType storage; } IMX_Stat; // A structure encapsulating a layer. typedef struct { global void* restrict data; global IMX_Stat* restrict stat; } IMX_Layer; /// multiply v by scale+translate xform static float2 applySTXform(STXform, float2 v); static float2 applySTXformInverse(STXform, float2 v); /// Space transfomrations; static float2 bufferToImage(global const IMX_Stat* restrict, float2 xy); static float2 imageToBuffer(global const IMX_Stat* restrict, float2 xy); static float2 bufferToPixel(global const IMX_Stat* restrict, float2 xy); static float2 pixelToBuffer(global const IMX_Stat* restrict, float2 xy); static float2 bufferToTexture(global const IMX_Stat* restrict, float2 xy); static float2 textureToBuffer(global const IMX_Stat* restrict, float2 xy); static float3 imageToWorld(global const IMX_Stat* restridct, float2 xy); static float3 image3ToWorld(global const IMX_Stat* restridct, float3 xy); static float2 worldToImage(global const IMX_Stat* restridct, float3 xyz); static float3 worldToImage3(global const IMX_Stat* restridct, float3 xyz); // The remaining functions are for implementing @ substitutions: // // int @ix, @iy, @ixy // output buffer coordinate // int @xres // output buffer width // int @yres // output buffer height // int2 @res // output buffer (width,height) // int2 @tilesize // tile dimensions passed to CE_Snippet::execute() // // Cur location: .image .pixel .texture suffixes specify space, image default // @P supports .world as well. // float2 @P // image coordinate of output pixel // float2 @dPdx // derivative of @P per @ix // float2 @dPdy // derivative of @P per @iy // float2 @dPdxy // (@dPdx.x,@dPdy.y) rectangle for area // // sampling // // 'name' is replaced with the name of a layer binding: // void* @name.data // raw buffer data // IMX_Stat* @name.stat // int @name.xres // @name's buffer width // int @name.yres // @name's buffer height // float2 @name.res // @name's (width,height) // BorderType @name.border // border type, compile-time constant // StorageType @name.storage // data type, compile-time constant // int @name.channels // # of channels, compile-time constant // int @name.tuplesize // # of channels, compile-time constant // // Space transforms: // float2 @name.imageToBuffer(float2) // float2 @name.bufferToImage(float2) // float2 @name.pixelToBuffer(float2) // float2 @name.bufferToPixel(float2) // float2 @name.textureToBuffer(float2) // float2 @name.bufferToTexture(float2) // float3 @name.imageToWorld(float2) // float3 @name.image3ToWorld(float3) // float2 @name.worldToImage(float3) // float3 @name.worldToImage3(float3) // // bool @name.bound // same as #ifdef HAS_name // // T @name.bufferIndex(int2) // value of buffer pixel, does tiling/borders // T @name.bufferSample(float2) // bilinear interpolated (nearest for int) // T @name.imageNearest(float2) // bufferIndex(rint(imageToBuffer(xy)) // T @name.imageSample(float2) // bufferSample(imageToBuffer(xy)) // T @name.textureNearest(float2) // bufferIndex(rint(textureToBuffer(xy)) // T @name.textureSample(float2) // bufferSample(textureToBuffer(xy)) // T @name // @name.imageSample(@P) // void @name.set(T v) // same as @name.setIndex((int2)(@ix,@iy), v) // void @name.setIndex(int2, T v) // store value of buffer pixel, no test for out of range! // // Where T is not int: // T @name.dCdx(float2) // derivative of @name.imageSample() per @ix // T @name.dCdx // @name.dCdx(@P) // T @name.dCdy(float2) // derivative of @name.imageSample() per @iy // T @name.dCdy // @name.dCdy(@P) // #include \"imx_internal.h\" #endif #ifndef __IMX_INTERNAL_H__ #define __IMX_INTERNAL_H__ // #include typedef float float1; typedef int int1; /// Converts image coordinates to linear index. static int _linearIndex(global const IMX_Stat* restrict stat, int2 xy) { #ifdef CHECK_RANGE if (xy.x < 0 || xy.x >= stat->resolution.x || xy.y < 0 || xy.y >= stat->resolution.y) printf(\"Error: converting an invalid 2D index at %v2d to linear;\" \"resolution was %v2d.\\n\", xy, stat->resolution); #endif return xy.x * stat->stride_x + xy.y * stat->stride_y; } /// Splits the given coordinates into integer and fractional parts. static void _splitCoordinates(float2 xy, int2* ix_p, float2* fx_p) { float2 f; *fx_p = fract(xy, &f); *ix_p = convert_int2_sat(f); } /// Wraps the given coordinates for the specified resolution. static int2 _wrapCoordinates(int2 xy, int2 res) { int2 p = xy % res; return select(p, p + res, p < 0); } static int2 _mirrorCoordinates(int2 xy, int2 res) { int2 res2 = res * 2; int2 p = _wrapCoordinates(xy, res2); return select(p, res2 - p - 1, p >= res); } /// Mirrors the given coordinates for the specified resolution. mirrored0 and /// mirrored1 will have the mirrored versions of x and x+1, respectively. static void _mirrorCoordinates2(int2 xy, int2 res, int2* mirrored0, int2* mirrored1) { int2 res2 = res * 2; int2 p = _wrapCoordinates(xy, res2); *mirrored0 = select(p, res2 - p - 1, p >= res); p = _wrapCoordinates(xy + 1, res2); *mirrored1 = select(p, res2 - p - 1, p >= res); } static bool _outside(int2 xy, int2 res) { return any(xy < 0) || any(xy >= res); } #ifdef CHECK_STORAGE_TYPE_CON __constant char * _getStorageName(StorageType storage) { switch (storage) { case INT8: return \"INT8\"; case INT16: return \"INT16\"; case INT32: return \"INT32\"; case FLOAT16: return \"FLOAT16\"; case FLOAT32: return \"FLOAT32\"; } } #define _CHECK_STORAGE(what) \\ if (storage != layer->stat->storage) \\ printf(\"Error: %s(%s), layer is %s\\n\", what, \\ _getStorageName(storage), _getStorageName(layer->stat->storage)); #else #define _CHECK_STORAGE(what) #endif #ifdef CHECK_CHANNEL_COUNT_CON #define _CHECK_CHANNEL(what) \\ if (channels != layer->stat->channels) \\ printf(\"Error: %s(channels=%d), layer is %d channels\\n\", \\ what, channels, layer->stat->channels); #else #define _CHECK_CHANNEL(what) #endif #ifdef CHECK_RANGE #define _CHECK_RANGE(what) \\ if (index < 0 || index >= stat->resolution.y * stat->stride_y) \\ printf(\"Error: %s index %d out of range\\n\", what, index); #else #define _CHECK_RANGE(what) #endif #define CHECK_STAT(what) _CHECK_STORAGE(what) _CHECK_CHANNEL(what) _CHECK_RANGE(what) #ifdef CHECK_STORAGE_TYPE_WRITE #define WRITE_ERROR_I() printf(\"Error: writing integer values to a floating point layer.\\n\"); return #define WRITE_ERROR_F() printf(\"Error: writing floating point values to an integer layer.\\n\"); return #else #define WRITE_ERROR_I() return #define WRITE_ERROR_F() return #endif #ifdef CHECK_STORAGE_TYPE_READ #define READ_ERROR_I() printf(\"Error: reading integer values from a floating point layer.\\n\"); return layer->stat->default_i #define READ_ERROR_F() printf(\"Error: reading floating point values from an integer layer.\\n\"); return layer->stat->default_f #else #define READ_ERROR_I() return layer->stat->default_i #define READ_ERROR_F() return layer->stat->default_f #endif static void _setIndexLinI1a(IMX_Layer* layer, int index, int v, StorageType storage) { switch (storage) { case INT8: ((global char*) layer->data)[index] = (char) v; return; case INT16: ((global short*) layer->data)[index] = (short) v; return; case INT32: ((global int*) layer->data)[index] = v; return; case FLOAT16: vstore_half_rte((float)v, index, (global half*)layer->data); break; case FLOAT32: ((global float*)layer->data)[index] = v; break; default: WRITE_ERROR_I(); } } static void _setIndexLinF1a(IMX_Layer* layer, int index, float v, StorageType storage) { switch (storage) { case FLOAT16: vstore_half_rte(v, index, (global half*) layer->data); break; case FLOAT32: ((global float*) layer->data)[index] = v; break; default: _setIndexLinI1a(layer, index, convert_int_sat_rtn(v+0.5f), storage); } } static void _setIndexLinF2a(IMX_Layer* layer, int index, float2 v, StorageType storage) { switch (storage) { case FLOAT16: vstore_half2_rte(v, index, (global half*) layer->data); break; case FLOAT32: vstore2(v, index, (global float*) layer->data); break; default: WRITE_ERROR_F(); } } static void _setIndexLinF3a(IMX_Layer* layer, int index, float3 v, StorageType storage) { switch (storage) { case FLOAT16: vstore_half3_rte(v.xyz, index, (global half*) layer->data); break; case FLOAT32: vstore3(v.xyz, index, (global float*) layer->data); break; default: WRITE_ERROR_F(); } } static void _setIndexLinF4(IMX_Layer* layer, int index, float4 v, StorageType storage, int channels) { CHECK_STAT(\"setIndexF4\"); switch (channels) { case 1: _setIndexLinF1a(layer, index, v.x, storage); break; case 2: _setIndexLinF2a(layer, index, v.xy, storage); break; case 3: _setIndexLinF3a(layer, index, v.xyz, storage); break; default: switch (storage) { case FLOAT16: vstore_half4_rte(v, index, (global half*) layer->data); break; case FLOAT32: vstore4(v, index, (global float*) layer->data); break; default: WRITE_ERROR_F(); } break; } } static void _setIndexLinI1(IMX_Layer* layer, int index, int v, StorageType storage, int channels) { CHECK_STAT(\"setIndexI1\"); if (channels == 1) _setIndexLinI1a(layer, index, v, storage); else _setIndexLinF4(layer, index, v, storage, channels); } static void _setIndexLinF1(IMX_Layer* layer, int index, float v, StorageType storage, int channels) { CHECK_STAT(\"setIndexF1\"); if (channels == 1) _setIndexLinF1a(layer, index, v, storage); else _setIndexLinF4(layer, index, v, storage, channels); } static void _setIndexLinF2(IMX_Layer* layer, int index, float2 v, StorageType storage, int channels) { CHECK_STAT(\"setIndexF2\"); if (channels == 2) _setIndexLinF2a(layer, index, v, storage); else _setIndexLinF4(layer, index, (float4)(v,0.0f,1.0f), storage, channels); } static void _setIndexLinF3(IMX_Layer* layer, int index, float3 v, StorageType storage, int channels) { CHECK_STAT(\"setIndexF3\"); if (channels == 3) _setIndexLinF3a(layer, index, v, storage); else _setIndexLinF4(layer, index, (float4)(v,1.0f), storage, channels); } //////////////////////////////////////////////////////////////////////////////// static int _bufferIndexLinI1(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexI1\"); switch (storage) { case INT8: return ((global char*) layer->data)[index * channels]; case INT16: return ((global short*) layer->data)[index * channels]; case INT32: return ((global int*) layer->data)[index * channels]; case CONSTANT_INT8: return *((global char*) layer->data); case CONSTANT_INT16: return *((global short*) layer->data); case CONSTANT_INT32: return *((global int*) layer->data); default: READ_ERROR_I().x; } } static float _bufferIndexLinF1(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexF1\"); switch (storage) { case FLOAT16: return vload_half(index*channels, (global half*) layer->data); case FLOAT32: return ((global float*) layer->data)[index*channels]; case CONSTANT_FLOAT16: return vload_half(0, (global half*) layer->data); case CONSTANT_FLOAT32: return ((global float*) layer->data)[0]; default: return _bufferIndexLinI1(layer, index, storage, channels); }; } static float2 _bufferIndexLinF2(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexF2\"); switch (channels) { case 1: return _bufferIndexLinF1(layer, index, storage, channels); default: switch (storage) { case FLOAT16: return vload_half2(0, (global half*) layer->data + index * channels); case FLOAT32: return vload2(0, (global float*) layer->data + index * channels); case CONSTANT_FLOAT16: return vload_half2(0, (global half*) layer->data); case CONSTANT_FLOAT32: return vload2(0, (global float*) layer->data); default: READ_ERROR_F().xy; } } } static float3 _bufferIndexLinF3(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexF3\"); switch (channels) { case 1: return _bufferIndexLinF1(layer, index, storage, channels); case 2: return (float3)(_bufferIndexLinF2(layer, index, storage, channels), 0.0f); default: switch (storage) { case FLOAT16: return vload_half3(0, (global half*) layer->data + index * channels); case FLOAT32: return vload3(0, (global float*) layer->data + index * channels); case CONSTANT_FLOAT16: return vload_half3(0, (global half*) layer->data); case CONSTANT_FLOAT32: return vload3(0, (global float*) layer->data); default: READ_ERROR_F().xyz; } } } static float4 _bufferIndexLinF4(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexF4\"); switch (channels) { case 1: return _bufferIndexLinF1(layer, index, storage, channels); case 2: return (float4)(_bufferIndexLinF2(layer, index, storage, channels), 0.0f, 1.0f); case 3: return (float4)(_bufferIndexLinF3(layer, index, storage, channels), 1.0f); default: switch (storage) { case FLOAT16: return vload_half4(index, (global half*) layer->data); case FLOAT32: return vload4(index, (global float*) layer->data); case CONSTANT_FLOAT16: return vload_half4(0, (global half*) layer->data); case CONSTANT_FLOAT32: return vload4(0, (global float*) layer->data); default: READ_ERROR_F(); } } } //////////////////////////////////////////////////////////////////////////////// #define _IMPLEMENT_I(DIM) \\ \\ static int ## DIM \\ bufferIndexI ## DIM (const IMX_Layer* layer, int2 xy, \\ BorderType border, StorageType storage, \\ int channels) \\ { \\ int2 res = layer->stat->resolution; \\ if (xy.x < 0 || xy.x >= res.x || xy.y < 0 || xy.y >= res.y) \\ { \\ switch (border) \\ { \\ case (IMX_CONSTANT): \\ return 0.0f; \\ case (IMX_CLAMP): \\ xy = clamp(xy, (int2)(0), res - 1); \\ break; \\ case (IMX_MIRROR): \\ xy = _mirrorCoordinates(xy, res); \\ break; \\ case (IMX_WRAP): default: \\ xy = _wrapCoordinates(xy, res); \\ break; \\ } \\ } \\ return _bufferIndexLinI ## DIM ( \\ layer, _linearIndex(layer->stat, xy), storage, channels); \\ } \\ \\ static int ## DIM \\ bufferSampleI ## DIM (const IMX_Layer* layer, float2 xy, \\ BorderType border, StorageType storage, \\ int channels) \\ { \\ int2 c = convert_int2_sat_rtn(xy+0.5f); \\ return bufferIndexI ## DIM (layer, c, border, storage, channels);\\ } \\ \\ static void \\ _setIndexI ## DIM(IMX_Layer *layer, int2 xy, int ## DIM val, StorageType storage, int channels) \\ { \\ int2 res = layer->stat->resolution; \\ if (xy.x < 0 || xy.x >= res.x || xy.y < 0 || xy.y >= res.y) \\ return; \\ _setIndexLinI ## DIM(layer, _linearIndex(layer->stat, xy), val, storage, channels); \\ } \\ /**/ _IMPLEMENT_I(1) #undef _IMPLEMENT_I #define _IMPLEMENT_F(DIM) \\ \\ static float ## DIM \\ _bufferSampleF ## DIM ## _CN(const IMX_Layer* layer, float2 xy, \\ StorageType storage, int channels) \\ { \\ int2 ix; \\ float2 fx; \\ _splitCoordinates(xy, &ix, &fx); \\ global const IMX_Stat* restrict stat = layer->stat; \\ int2 res = stat->resolution; \\ float ## DIM k = 0.0f; \\ float ## DIM v00 = _outside(ix, res) ? k : _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix), storage, channels); \\ ix.x++; \\ float ## DIM v10 = _outside(ix, res) ? k : _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix), storage, channels); \\ ix.y++; \\ float ## DIM v11 = _outside(ix, res) ? k : _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix), storage, channels); \\ ix.x--; \\ float ## DIM v01 = _outside(ix, res) ? k : _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix), storage, channels); \\ return mix(mix(v00, v10, fx.x), mix(v01, v11, fx.x), fx.y); \\ } \\ \\ static float ## DIM \\ _bufferSampleF ## DIM ## _CL(const IMX_Layer* layer, float2 xy, \\ StorageType storage, int channels) \\ { \\ int2 ix; \\ float2 fx; \\ _splitCoordinates(xy, &ix, &fx); \\ global const IMX_Stat* restrict stat = layer->stat; \\ int2 res1 = stat->resolution - 1; \\ int2 ix0 = clamp(ix, (int2)(0), res1); \\ int2 ix1 = clamp(ix+1, (int2)(0), res1); \\ float ## DIM v00 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix0), storage, channels); \\ float ## DIM v10 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix1.x, ix0.y)), storage, channels); \\ float ## DIM v01 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix0.x, ix1.y)), storage, channels); \\ float ## DIM v11 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix1), storage, channels); \\ return mix(mix(v00, v10, fx.x), mix(v01, v11, fx.x), fx.y); \\ } \\ \\ static float ## DIM \\ _bufferSampleF ## DIM ## _MR(const IMX_Layer* layer, float2 xy, \\ StorageType storage, int channels) \\ { \\ int2 ix; \\ float2 fx; \\ _splitCoordinates(xy, &ix, &fx); \\ global const IMX_Stat* restrict stat = layer->stat; \\ int2 ix0, ix1; \\ _mirrorCoordinates2(ix, stat->resolution, &ix0, &ix1); \\ float ## DIM v00 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix0), storage, channels); \\ float ## DIM v10 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix1.x, ix0.y)), storage, channels); \\ float ## DIM v01 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix0.x, ix1.y)), storage, channels); \\ float ## DIM v11 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix1), storage, channels); \\ return mix(mix(v00, v10, fx.x), mix(v01, v11, fx.x), fx.y); \\ } \\ \\ static float ## DIM \\ _bufferSampleF ## DIM ## _WR(const IMX_Layer* layer, float2 xy, \\ StorageType storage, int channels) \\ { \\ int2 ix; \\ float2 fx; \\ _splitCoordinates(xy, &ix, &fx); \\ global const IMX_Stat* restrict stat = layer->stat; \\ int2 ix0 = _wrapCoordinates(ix, stat->resolution); \\ int2 ix1 = _wrapCoordinates(ix + 1, stat->resolution); \\ float ## DIM v00 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix0), storage, channels); \\ float ## DIM v10 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix1.x, ix0.y)), storage, channels); \\ float ## DIM v01 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix0.x, ix1.y)), storage, channels); \\ float ## DIM v11 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix1), storage, channels); \\ return mix(mix(v00, v10, fx.x), mix(v01, v11, fx.x), fx.y); \\ } \\ \\ static float ## DIM \\ bufferSampleF ## DIM (const IMX_Layer* layer, float2 xy, \\ BorderType border, StorageType storage, \\ int channels) \\ { \\ switch (border) \\ { \\ case (IMX_CONSTANT): \\ return _bufferSampleF ## DIM ## _CN( \\ layer, xy, storage, channels); \\ case (IMX_CLAMP): \\ return _bufferSampleF ## DIM ## _CL( \\ layer, xy, storage, channels); \\ case (IMX_MIRROR): \\ return _bufferSampleF ## DIM ## _MR( \\ layer, xy, storage, channels); \\ case (IMX_WRAP): default: \\ return _bufferSampleF ## DIM ## _WR( \\ layer, xy, storage, channels); \\ } \\ } \\ \\ static float ## DIM \\ bufferIndexF ## DIM (const IMX_Layer* layer, int2 xy, \\ BorderType border, StorageType storage, \\ int channels) \\ { \\ int2 res = layer->stat->resolution; \\ if (xy.x < 0 || xy.x >= res.x || xy.y < 0 || xy.y >= res.y) \\ { \\ switch (border) \\ { \\ case (IMX_CONSTANT): \\ return 0.0f; \\ case (IMX_CLAMP): \\ xy = clamp(xy, (int2)(0), res - 1); \\ break; \\ case (IMX_MIRROR): \\ xy = _mirrorCoordinates(xy, res); \\ break; \\ case (IMX_WRAP): default: \\ xy = _wrapCoordinates(xy, res); \\ break; \\ } \\ } \\ return _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(layer->stat, xy), storage, channels); \\ } \\ \\ static void \\ _setIndexF ## DIM(IMX_Layer *layer, int2 xy, float ## DIM val, StorageType storage, int channels) \\ { \\ int2 res = layer->stat->resolution; \\ if (xy.x < 0 || xy.x >= res.x || xy.y < 0 || xy.y >= res.y) \\ return; \\ _setIndexLinF ## DIM(layer, _linearIndex(layer->stat, xy), val, storage, channels); \\ } \\ /**/ _IMPLEMENT_F(1) _IMPLEMENT_F(2) _IMPLEMENT_F(3) _IMPLEMENT_F(4) #undef _IMPLEMENT_F static float2 applySTXform(STXform xform, float2 v) { return v * xform.lo + xform.hi; } static float2 applySTXformInverse(STXform xform, float2 v) { return (v - xform.hi) / xform.lo; } static float2 bufferToImage(global const IMX_Stat* restrict stat, float2 v) { return applySTXform(stat->buffer_to_image, v); } static float2 imageToBuffer(global const IMX_Stat* restrict stat, float2 v) { return applySTXform(stat->image_to_buffer, v); } static float2 bufferToPixel(global const IMX_Stat* restrict stat, float2 v) { return applySTXform(stat->buffer_to_pixel, v); } static float2 pixelToBuffer(global const IMX_Stat* restrict stat, float2 v) { return applySTXformInverse(stat->buffer_to_pixel, v); } static float2 bufferToTexture(global const IMX_Stat* restrict stat, float2 v) { return (v + 0.5f) / (float2)(stat->resolution.x, stat->resolution.y); } static float2 textureToBuffer(global const IMX_Stat* restrict stat, float2 v) { return v * ((float2)(stat->resolution.x, stat->resolution.y)) - 0.5f; } static float3 imageToWorld(global const IMX_Stat* restrict stat, float2 xy) { float4 xyzw = 0; xyzw.xy = xy; xyzw.w = 1; xyzw = mat4vecmul(stat->image_to_world, xyzw); xyzw.xyz /= xyzw.w; return xyzw.xyz; } static float3 image3ToWorld(global const IMX_Stat* restrict stat, float3 xyz) { float4 xyzw = 0; xyzw.xyz = xyz; xyzw.w = 1; xyzw = mat4vecmul(stat->image_to_world, xyzw); xyzw.xyz /= xyzw.w; return xyzw.xyz; } static float2 worldToImage(global const IMX_Stat* restrict stat, float3 xyz) { float4 xyzw = 0; xyzw.xyz = xyz; xyzw.w = 1; xyzw = mat4vecmul(stat->world_to_image, xyzw); xyzw.xy /= xyzw.w; return xyzw.xy; } static float3 worldToImage3(global const IMX_Stat* restrict stat, float3 xyz) { float4 xyzw = 0; xyzw.xyz = xyz; xyzw.w = 1; xyzw = mat4vecmul(stat->world_to_image, xyzw); xyzw.xyz /= xyzw.w; return xyzw.xyz; } static float4 dCdxF4(const IMX_Layer* layer, float2 ixy, BorderType border, StorageType storage, int channels, const IMX_Layer* dst) { float2 xy = imageToBuffer(layer->stat, ixy); float d = (dst->stat->buffer_to_image.x * layer->stat->image_to_buffer.x) / 2; float4 a = bufferSampleF4(layer, (float2)(xy.x + d, xy.y), border, storage, channels); float4 b = bufferSampleF4(layer, (float2)(xy.x - d, xy.y), border, storage, channels); return a - b; } static float4 dCdxF4aligned(const IMX_Layer* layer, int2 xy, BorderType border, StorageType storage, int channels) { float4 a = bufferIndexF4(layer, (int2)(xy.x+1, xy.y), border, storage, channels); float4 b = bufferIndexF4(layer, (int2)(xy.x-1, xy.y), border, storage, channels); return (a-b) * 0.5f; } static float4 dCdyF4(const IMX_Layer* layer, float2 ixy, BorderType border, StorageType storage, int channels, const IMX_Layer* dst) { float2 xy = imageToBuffer(layer->stat, ixy); float d = (dst->stat->buffer_to_image.y * layer->stat->image_to_buffer.y) / 2; float4 a = bufferSampleF4(layer, (float2)(xy.x, xy.y + d), border, storage, channels); float4 b = bufferSampleF4(layer, (float2)(xy.x, xy.y - d), border, storage, channels); return a - b; } static float4 dCdyF4aligned(const IMX_Layer* layer, int2 xy, BorderType border, StorageType storage, int channels) { float4 a = bufferIndexF4(layer, (int2)(xy.x, xy.y+1), border, storage, channels); float4 b = bufferIndexF4(layer, (int2)(xy.x, xy.y-1), border, storage, channels); return (a-b) * 0.5f; } #endif #ifndef __IMX_FILTER_H__ #define __IMX_FILTER_H__ // Only a single filter can be used in a snippet. To choose filter: // // Either define one of the following: // FILTER_POINT // FILTER_BILINEAR // FILTER_BOX (floating-point width box, sometimes called a 'tent') // FILTER_TRIANGLE // FILTER_CUBIC (bicubic interpolation if scale==1) // FILTER_MITCHELL (non-interpolating cubic) // FILTER_BSPLINE (smooth non-interpolating cubic) // Or define these symbols, this example is equivalent to FILTER_TRIANGLE: // #define FILTER_SIZE 2 // static __constant float samples[FILTER_SIZE] = { 1, 0 }; // #define FILTER samples // #define FILTER_SUPPORT 1 // // The following @-substitutions can then be used to sample areas, for float1-4 bindings // F @name.bufferSampleRect(float2 center, float2 size) -> area in buffer coordinates // F @name.bufferSampleRectClip(float2 center, float2 size) -> area in buffer coordinates // F @name.imageSampleRect(float2 center, float2 size) -> area in image coordinates // F @name.imageSampleRectClip(float2 center, float2 size) -> area in image coordinates // #include \"imx_filter_internal.h\" #endif #if (!defined(FILTER) || !defined(FILTER_SIZE) || !defined(FILTER_SUPPORT)) && \\ !defined(FILTER_POINT) && !defined(FILTER_BILINEAR) && \\ !defined(FILTER_BOX) && !defined(FILTER_TRIANGLE) && \\ !defined(FILTER_CUBIC) && !defined(FILTER_MITCHELL) && \\ !defined(FILTER_BSPLINE) #define FILTER_POINT #endif #if defined(FILTER) && defined(FILTER_SIZE) && defined(FILTER_SUPPORT) // this is so snippet can define it's own filter before including this #elif defined(FILTER_POINT) static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { // Make .5 round toward -infinity so a translate by .5 does not throw away every other pixel return bufferIndexF4(layer, convert_int2_sat_rtn(xy + 0.5f), border, storage, channels); } #elif defined(FILTER_BILINEAR) static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { return bufferSampleF4(layer, xy, border, storage, channels); } #elif defined(FILTER_BOX) static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { xy = clamp(xy, -1e8f, 1e8f); dxy = clamp(dxy, 1.0f, 67.0f); float2 r = (dxy + 1.0f) / 2; int2 ia; float2 fa; _splitCoordinates(r - xy, &ia, &fa); ia = -ia; int2 ib; float2 fb; _splitCoordinates(xy + r, &ib, &fb); float4 sum = 0; int2 ixy; float w = fa.y; for (ixy.y = ia.y; ixy.y <= ib.y;) { ixy.x = ia.x; float4 sum1 = fa.x * bufferIndexF4(layer, ixy, border, storage, channels); for (ixy.x++; ixy.x < ib.x; ixy.x++) sum1 += bufferIndexF4(layer, ixy, border, storage, channels); sum1 += fb.x * bufferIndexF4(layer, ixy, border, storage, channels); sum += w * sum1; w = (++ixy.y) < ib.y ? 1.0f : fb.y; } return sum / (dxy.x * dxy.y); } #elif defined(FILTER_TRIANGLE) static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { float2 r = clamp(dxy, 1.0f, 1.0e8f); int2 ia = convert_int2_sat_rtp(xy - r); int2 ib = convert_int2_sat_rtp(xy + r); float4 sum = 0; float div = 0; int2 ixy; int2 inc = (ib - ia) / 61 + 1; for (ixy.y = ia.y; ixy.y < ib.y; ixy.y += inc.y) { float4 sum1 = 0; float div1 = 0; for (ixy.x = ia.x; ixy.x < ib.x; ixy.x += inc.x) { float w = 1 - fabs(ixy.x - xy.x) / r.x; sum1 += w * bufferIndexF4(layer, ixy, border, storage, channels); div1 += w; } float w = 1 - fabs(ixy.y - xy.y) / r.y; sum += w * sum1; div += w * div1; } return sum / div; } #elif defined(FILTER_CUBIC) #define FILTER_SIZE 25 static __constant float Cubic[FILTER_SIZE] = { // mitchell(25, 0, 0.5) 6, 5.9010415, 5.625, 5.203125, 4.6666665, 4.046875, 3.375, 2.6822917, 2, 1.359375, 0.7916667, 0.328125, 0, -0.21006945, -0.3472222, -0.421875, -0.44444445, -0.4253472, -0.375, -0.30381945, -0.22222222, -0.140625, -0.06944445, -0.019097222, 0}; #define FILTER Cubic #define FILTER_SUPPORT 2 #elif defined(FILTER_MITCHELL) #define FILTER_SIZE 25 static __constant float Mitchell[FILTER_SIZE] = { // mitchell(25, 1/3.0, 1/3.0) 5.3333335, 5.2540507, 5.0324073, 4.6927085, 4.259259, 3.7563658, 3.2083333, 2.6394675, 2.074074, 1.5364584, 1.050926, 0.6417824, 0.33333334, 0.116705246, -0.038580246, -0.140625, -0.19753087, -0.21739969, -0.20833333, -0.17843364, -0.13580246, -0.088541664, -0.044753086, -0.01253858, 0}; //-1.7763568e-15}; #define FILTER Mitchell #define FILTER_SUPPORT 2 #elif defined(FILTER_BSPLINE) #define FILTER_SIZE 25 static __constant float BSpline[FILTER_SIZE] = { // mitchell(25, 1, 0) 4, 3.9600694, 3.8472223, 3.671875, 3.4444444, 3.1753473, 2.875, 2.5538194, 2.2222223, 1.890625, 1.5694444, 1.2690972, 1, 0.7702546, 0.5787037, 0.421875, 0.2962963, 0.19849537, 0.125, 0.07233796, 0.037037037, 0.015625, 0.0046296297, 0.0005787037, 0}; #define FILTER BSpline #define FILTER_SUPPORT 2 #endif #if defined(FILTER) static float sampleLookup(constant float * in, float pos) { float flr; float t = fract(pos, &flr); int flooridx = convert_int(flr); int ceilidx = flooridx+1; ceilidx = min(ceilidx, FILTER_SIZE-1); return mix(in[flooridx], in[ceilidx], t); } static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { float2 r = min(max(dxy, 1.0f) * FILTER_SUPPORT, 1.0e8f); int2 ia = convert_int2_sat_rtp(xy - r); int2 ib = convert_int2_sat_rtp(xy + r); float2 k = (FILTER_SIZE - 1) / r; float4 sum = 0; float div = 0; int2 ixy; int2 inc = (ib - ia) / 61 + 1; for (ixy.y = ia.y; ixy.y < ib.y; ixy.y += inc.y) { float4 sum1 = 0; float div1 = 0; for (ixy.x = ia.x; ixy.x < ib.x; ixy.x += inc.x) { float w = sampleLookup(FILTER, fabs(ixy.x - xy.x) * k.x); sum1 += w * bufferIndexF4(layer, ixy, border, storage, channels); div1 += w; } float w = sampleLookup(FILTER, fabs(ixy.y - xy.y) * k.y); sum += w * sum1; div += w * div1; } return sum / div; } #endif // Intersects the incoming sampling window with the layer's footprint and // returns the filtered value in that rectangle. (Thus, this should never read // outside pixels.) static float4 bufferSampleRectClipF4(const IMX_Layer* layer, float2 xy, float2 dxy, StorageType storage, int channels) { #if defined(FILTER_POINT) return bufferSampleRectF4(layer, xy, dxy, IMX_CONSTANT, storage, channels); #else float2 wh = convert_float2(layer->stat->resolution); dxy *= 0.5f; float2 xy0 = max(xy - dxy, -0.5f); float2 xy1 = min(xy + dxy, wh - 0.5f); if (any(xy0 >= xy1)) return 0.0f; return bufferSampleRectF4(layer, (xy1 + xy0) * 0.5f, xy1 - xy0, IMX_CLAMP, storage, channels); #endif } static float4 constImageSampleRectClip(float2 xy, float2 dxy, float4 defval) { // Clip to image space; if there is any intersection, return defval; // otherwise, return 0 since we're fully outside the image. float2 xy0 = max(xy - dxy, -1.0f); float2 xy1 = min(xy + dxy, 1.0f); return any(xy0 >= xy1) ? 0.0f : defval; } // convert derivatives (or a parallelogram) to nearest ortho rectangle static float2 wh_from_dP(float2 dPdx, float2 dPdy) { return hypot(dPdx, dPdy); } /* Python to generate the filters def mitchell(n, B, C): print(\"[%d] = {\"%n, end=''); for i in range(0,n): if i: print(\",\", end='') if not(i%8): print(\"\\n \", end='') x = (2.0*i)/(n-1) if (x < 1): v = ((12-9*B-6*C)*x-18+12*B+6*C)*x*x+6-2*B; else: v = (((-B-6*C)*x+6*B+30*C)*x-12*B-48*C)*x+8*B+24*C; print(\" %.6g\"%v, end='') print(\"};\") mitchell(25, 1/3.0, 1/3.0) */ #define AT_elemnum _bound_idx #define AT_ix _bound_gidx #define AT_iy _bound_gidy #define AT_ixy (int2)(_bound_gidx, _bound_gidy) #define AT_res (_RUNOVER_LAYER.stat->resolution) #define AT_xres (_RUNOVER_LAYER.stat->resolution.x) #define AT_yres (_RUNOVER_LAYER.stat->resolution.y) #define AT_P_image _bound_P_image #define AT_P_pixel _bound_P_pixel #define AT_P_texture _bound_P_texture #define AT_P_world (imageToWorld(_RUNOVER_LAYER.stat, _bound_P_image)) #define AT_P AT_P_image #define AT_dPdx_image ((float2)(_RUNOVER_LAYER.stat->buffer_to_image.x,0)) #define AT_dPdx_pixel ((float2)(_RUNOVER_LAYER.stat->buffer_to_pixel.x,0)) #define AT_dPdx_texture ((float2)(1.0f/(float)_RUNOVER_LAYER.stat->resolution.x,0)) #define AT_dPdx AT_dPdx_image #define AT_dPdy_image ((float2)(0, _RUNOVER_LAYER.stat->buffer_to_image.y)) #define AT_dPdy_pixel ((float2)(0, _RUNOVER_LAYER.stat->buffer_to_pixel.y)) #define AT_dPdy_texture ((float2)(0, 1.0f/(float)_RUNOVER_LAYER.stat->resolution.y)) #define AT_dPdy AT_dPdy_image #define AT_dPdxy_image (_RUNOVER_LAYER.stat->buffer_to_image.xy) #define AT_dPdxy_pixel (_RUNOVER_LAYER.stat->buffer_to_pixel.xy) #define AT_dPdxy_texture ((float2)(1.0f/(float)_RUNOVER_LAYER.stat->resolution.x,1.0f/(float)_RUNOVER_LAYER.stat->resolution.y)) #define AT_dPdxy AT_dPdxy_image #define AT_tilesize _bound_tilesize #ifdef HAS_src #define AT_src_data _bound_src #else #define AT_src_data 0 #endif #ifdef HAS_src #define AT_src_bound 1 #else #define AT_src_bound 0 #endif #ifdef HAS_src #define AT_src_stat ((global IMX_Stat * restrict) _bound_src_stat_void) #else #define AT_src_stat 0 #endif #ifdef HAS_src #define AT_src_layer &_bound_src_layer #else #define AT_src_layer 0 #endif #ifdef HAS_src #define AT_src_border _bound_src_border #else #define AT_src_border IMX_WRAP #endif #ifdef HAS_src #define AT_src_storage _bound_src_storage #else #define AT_src_storage FLOAT32 #endif #ifdef HAS_src #define AT_src_channels _bound_src_channels #else #define AT_src_channels 4 #endif #ifdef HAS_src #define AT_src_tuplesize _bound_src_channels #else #define AT_src_tuplesize 4 #endif #ifdef HAS_src #define AT_src_xres _bound_src_layer.stat->resolution.x #else #define AT_src_xres 1 #endif #ifdef HAS_src #define AT_src_yres _bound_src_layer.stat->resolution.y #else #define AT_src_yres 1 #endif #ifdef HAS_src #define AT_src_res convert_float2(_bound_src_layer.stat->resolution) #else #define AT_src_res (float2)(1) #endif #define CONSTANT1(s) CONSTANT_ ## s #define CONSTANT_(s) CONSTANT1(s) #ifdef CONSTANT_src #define src_args2 CONSTANT_(_bound_src_storage), _bound_src_channels #else #define src_args2 _bound_src_storage, _bound_src_channels #endif #define src_args3 _bound_src_border, src_args2 #ifdef HAS_src #define AT_src_bufferIndex(_xy_) bufferIndexF1(&_bound_src_layer, _xy_, src_args3) #else #define AT_src_bufferIndex(_xy_) _bound_src #endif #ifdef HAS_src #define AT_src_bufferSample(_xy_) bufferSampleF1(&_bound_src_layer, _xy_, src_args3) #else #define AT_src_bufferSample(_xy_) _bound_src #endif #ifdef HAS_src #define AT_src_imageNearest(_xy_) bufferIndexF1(&_bound_src_layer, convert_int2_sat_rtn(imageToBuffer(AT_src_stat, _xy_) + 0.5f), src_args3) #else #define AT_src_imageNearest(_xy_) _bound_src #endif #ifdef HAS_src #define AT_src_imageSample(_xy_) bufferSampleF1(&_bound_src_layer, imageToBuffer(AT_src_stat, _xy_), src_args3) #else #define AT_src_imageSample(_xy_) _bound_src #endif #ifdef HAS_src #define AT_src_textureNearest(_xy_) bufferIndexF1(&_bound_src_layer, convert_int2_sat_rtn(textureToBuffer(AT_src_stat, _xy_) + 0.5f), src_args3) #else #define AT_src_textureNearest(_xy_) _bound_src #endif #ifdef HAS_src #define AT_src_textureSample(_xy_) bufferSampleF1(&_bound_src_layer, textureToBuffer(AT_src_stat, _xy_), src_args3) #else #define AT_src_textureSample(_xy_) _bound_src #endif #ifdef HAS_src #define AT_src_1(_xy_) bufferSampleF1(&_bound_src_layer, imageToBuffer(AT_src_stat, _xy_), src_args3) #else #define AT_src_1(_xy_) _bound_src #endif #ifdef HAS_src #ifdef ALIGNED_src #define AT_src _bufferIndexLinF1(&_bound_src_layer, _bound_idx, src_args2) #else #define AT_src bufferSampleF1(&_bound_src_layer, imageToBuffer(AT_src_stat, _bound_P_image), src_args3) #endif #else #define AT_src _bound_src #endif #ifdef HAS_src #ifdef ALIGNED_src #define AT_src_dCdx dCdxF4aligned(&_bound_src_layer, (int2)(_bound_gidx, _bound_gidy), src_args3).x #else #define AT_src_dCdx dCdxF4(&_bound_src_layer, _bound_P_image, src_args3, &_RUNOVER_LAYER).x #endif #else #define AT_src_dCdx 0.0f #endif #ifdef HAS_src #define AT_src_dCdx_1(_xy_) dCdxF4(&_bound_src_layer, _xy_, src_args3, &_RUNOVER_LAYER).x #else #define AT_src_dCdx_1(_xy_) 0.0f #endif #ifdef HAS_src #ifdef ALIGNED_src #define AT_src_dCdy dCdyF4aligned(&_bound_src_layer, (int2)(_bound_gidx, _bound_gidy), src_args3).x #else #define AT_src_dCdy dCdyF4(&_bound_src_layer, _bound_P_image, src_args3, &_RUNOVER_LAYER).x #endif #else #define AT_src_dCdy 0.0f #endif #ifdef HAS_src #define AT_src_dCdy_1(_xy_) dCdyF4(&_bound_src_layer, _xy_, src_args3, &_RUNOVER_LAYER).x #else #define AT_src_dCdy_1(_xy_) 0.0f #endif #ifdef HAS_src #define AT_src_bufferSampleRect(_xy_, _dxy_) bufferSampleRectF4(&_bound_src_layer, _xy_, _dxy_, src_args3).x #else #define AT_src_bufferSampleRect(_xy_, _dxy_) _bound_src #endif #ifdef HAS_src #define AT_src_bufferSampleRectClip(_xy_, _dxy_) bufferSampleRectClipF4(&_bound_src_layer, _xy_, _dxy_, src_args2).x #else #define AT_src_bufferSampleRectClip(_xy_, _dxy_) constImageSampleRectClip(bufferToImage(AT_src_stat, _xy_), _dxy_ * (0.5f / (float2)(AT_src_stat->resolution.x, AT_src_stat->resolution.y)), _bound_src).x #endif #ifdef HAS_src #define AT_src_imageSampleRect(_xy_, _dxy_) AT_src_bufferSampleRect(imageToBuffer(AT_src_stat, _xy_), AT_src_stat->image_to_buffer.lo * (_dxy_)) #else #define AT_src_imageSampleRect(_xy_, _dxy_) _bound_src #endif #ifdef HAS_src #define AT_src_imageSampleRectClip(_xy_, _dxy_) AT_src_bufferSampleRectClip(imageToBuffer(AT_src_stat, _xy_), AT_src_stat->image_to_buffer.lo * (_dxy_)) #else #define AT_src_imageSampleRectClip(_xy_, _dxy_) constImageSampleRectClip(_xy_, _dxy_, _bound_src).x #endif #ifdef HAS_src #define AT_src_textureSampleRect(_xy_, _dxy_) AT_src_bufferSampleRect(textureToBuffer(AT_src_stat, _xy_), (float2)(AT_src_stat->resolution.x, AT_src_stat->resolution.y) * (_dxy_)) #else #define AT_src_textureSampleRect(_xy_, _dxy_) _bound_src #endif #ifdef HAS_src #define AT_src_textureSampleRectClip(_xy_, _dxy_) AT_src_bufferSampleRectClip(textureToBuffer(AT_src_stat, _xy_), (float2)(AT_src_stat->resolution.x, AT_src_stat->resolution.y) * (_dxy_)) #else #define AT_src_textureSampleRectClip(_xy_, _dxy_) constImageSampleRectClip(bufferToImage(AT_src_stat, textureToBuffer(AT_src_stat, _xy_)), _dxy_ * ((float2)(AT_src_stat->resolution.x, AT_src_stat->resolution.y)) * AT_src_stat->buffer_to_image.lo, _bound_src).x #endif #ifdef HAS_src #define AT_src_bufferToImage(_xy_) (bufferToImage(AT_src_stat, _xy_)) #else #define AT_src_bufferToImage(_xy_) (_xy_) #endif #ifdef HAS_src #define AT_src_imageToBuffer(_xy_) (imageToBuffer(AT_src_stat, _xy_)) #else #define AT_src_imageToBuffer(_xy_) (_xy_) #endif #ifdef HAS_src #define AT_src_bufferToPixel(_xy_) (bufferToPixel(AT_src_stat, _xy_)) #else #define AT_src_bufferToPixel(_xy_) (_xy_) #endif #ifdef HAS_src #define AT_src_pixelToBuffer(_xy_) (pixelToBuffer(AT_src_stat, _xy_)) #else #define AT_src_pixelToBuffer(_xy_) (_xy_) #endif #ifdef HAS_src #define AT_src_bufferToTexture(_xy_) (bufferToTexture(AT_src_stat, _xy_)) #else #define AT_src_bufferToTexture(_xy_) (_xy_) #endif #ifdef HAS_src #define AT_src_textureToBuffer(_xy_) (textureToBuffer(AT_src_stat, _xy_)) #else #define AT_src_textureToBuffer(_xy_) (_xy_) #endif #ifdef HAS_src #define AT_src_imageToWorld(_xy_) (imageToWorld(AT_src_stat, _xy_)) #else #define AT_src_imageToWorld(_xy_) ((float3)((_xy_).x, (_xy_).y, 0)) #endif #ifdef HAS_src #define AT_src_image3ToWorld(_xyz_) (image3ToWorld(AT_src_stat, _xyz_)) #else #define AT_src_image3ToWorld(_xyz_) (_xyz_) #endif #ifdef HAS_src #define AT_src_worldToImage(_xyz_) (worldToImage(AT_src_stat, _xyz_)) #else #define AT_src_worldToImage(_xyz_) ((_xyz_).xy) #endif #ifdef HAS_src #define AT_src_worldToImage3(_xyz_) (worldToImage3(AT_src_stat, _xyz_)) #else #define AT_src_worldToImage3(_xyz_) (_xyz_) #endif #define AT_dst_data _bound_dst #define AT_dst_bound 1 #define AT_dst_stat ((global IMX_Stat * restrict) _bound_dst_stat_void) #define AT_dst_layer &_bound_dst_layer #define AT_dst_border _bound_dst_border #define AT_dst_storage _bound_dst_storage #define AT_dst_channels _bound_dst_channels #define AT_dst_tuplesize _bound_dst_channels #define AT_dst_xres _bound_dst_layer.stat->resolution.x #define AT_dst_yres _bound_dst_layer.stat->resolution.y #define AT_dst_res convert_float2(_bound_dst_layer.stat->resolution) #define AT_dst_set(_val_) _setIndexLinF4(&_bound_dst_layer, _bound_idx, _val_, _bound_dst_storage, _bound_dst_channels) #define AT_dst_setIndex(_xy_, _val_) _setIndexF4(&_bound_dst_layer, _xy_, _val_, _bound_dst_storage, _bound_dst_channels) #define AT_dst_bufferToImage(_xy_) (bufferToImage(AT_dst_stat, _xy_)) #define AT_dst_imageToBuffer(_xy_) (imageToBuffer(AT_dst_stat, _xy_)) #define AT_dst_bufferToPixel(_xy_) (bufferToPixel(AT_dst_stat, _xy_)) #define AT_dst_pixelToBuffer(_xy_) (pixelToBuffer(AT_dst_stat, _xy_)) #define AT_dst_bufferToTexture(_xy_) (bufferToTexture(AT_dst_stat, _xy_)) #define AT_dst_textureToBuffer(_xy_) (textureToBuffer(AT_dst_stat, _xy_)) #define AT_dst_imageToWorld(_xy_) (imageToWorld(AT_dst_stat, _xy_)) #define AT_dst_image3ToWorld(_xyz_) (image3ToWorld(AT_dst_stat, _xyz_)) #define AT_dst_worldToImage(_xyz_) (worldToImage(AT_dst_stat, _xyz_)) #define AT_dst_worldToImage3(_xyz_) (worldToImage3(AT_dst_stat, _xyz_)) #define AT_count_data _bound_count #define AT_count_bound 1 #define AT_count_stat ((global IMX_Stat * restrict) _bound_count_stat_void) #define AT_count_layer &_bound_count_layer #define AT_count_border _bound_count_border #define AT_count_storage _bound_count_storage #define AT_count_channels _bound_count_channels #define AT_count_tuplesize _bound_count_channels #define AT_count_xres _bound_count_layer.stat->resolution.x #define AT_count_yres _bound_count_layer.stat->resolution.y #define AT_count_res convert_float2(_bound_count_layer.stat->resolution) #ifdef CONSTANT_count #define count_args2 CONSTANT_(_bound_count_storage), _bound_count_channels #else #define count_args2 _bound_count_storage, _bound_count_channels #endif #define count_args3 _bound_count_border, count_args2 #define AT_count_bufferIndex(_xy_) bufferIndexI1(&_bound_count_layer, _xy_, count_args3) #define AT_count_bufferSample(_xy_) bufferSampleI1(&_bound_count_layer, _xy_, count_args3) #define AT_count_imageNearest(_xy_) bufferIndexI1(&_bound_count_layer, convert_int2_sat_rtn(imageToBuffer(AT_count_stat, _xy_) + 0.5f), count_args3) #define AT_count_imageSample(_xy_) bufferSampleI1(&_bound_count_layer, imageToBuffer(AT_count_stat, _xy_), count_args3) #define AT_count_textureNearest(_xy_) bufferIndexI1(&_bound_count_layer, convert_int2_sat_rtn(textureToBuffer(AT_count_stat, _xy_) + 0.5f), count_args3) #define AT_count_textureSample(_xy_) bufferSampleI1(&_bound_count_layer, textureToBuffer(AT_count_stat, _xy_), count_args3) #define AT_count_1(_xy_) bufferSampleI1(&_bound_count_layer, imageToBuffer(AT_count_stat, _xy_), count_args3) #ifdef ALIGNED_count #define AT_count _bufferIndexLinI1(&_bound_count_layer, _bound_idx, count_args2) #else #define AT_count bufferSampleI1(&_bound_count_layer, imageToBuffer(AT_count_stat, _bound_P_image), count_args3) #endif #define AT_count_set(_val_) _setIndexLinI1(&_bound_count_layer, _bound_idx, _val_, _bound_count_storage, _bound_count_channels) #define AT_count_setIndex(_xy_, _val_) _setIndexI1(&_bound_count_layer, _xy_, _val_, _bound_count_storage, _bound_count_channels) #define AT_count_bufferToImage(_xy_) (bufferToImage(AT_count_stat, _xy_)) #define AT_count_imageToBuffer(_xy_) (imageToBuffer(AT_count_stat, _xy_)) #define AT_count_bufferToPixel(_xy_) (bufferToPixel(AT_count_stat, _xy_)) #define AT_count_pixelToBuffer(_xy_) (pixelToBuffer(AT_count_stat, _xy_)) #define AT_count_bufferToTexture(_xy_) (bufferToTexture(AT_count_stat, _xy_)) #define AT_count_textureToBuffer(_xy_) (textureToBuffer(AT_count_stat, _xy_)) #define AT_count_imageToWorld(_xy_) (imageToWorld(AT_count_stat, _xy_)) #define AT_count_image3ToWorld(_xyz_) (image3ToWorld(AT_count_stat, _xyz_)) #define AT_count_worldToImage(_xyz_) (worldToImage(AT_count_stat, _xyz_)) #define AT_count_worldToImage3(_xyz_) (worldToImage3(AT_count_stat, _xyz_)) #line 1 kernel void generickernel( int2 _bound_tilesize, #ifdef HAS_src global void * restrict _bound_src_stat_void, global void * restrict _bound_src, #else float _bound_src, #endif global void * restrict _bound_dst_stat_void, global void * restrict _bound_dst, global void * restrict _bound_count_stat_void, global void * restrict _bound_count ) { #ifdef HAS_src IMX_Layer _bound_src_layer = {_bound_src, _bound_src_stat_void}; #endif IMX_Layer _bound_dst_layer = {_bound_dst, _bound_dst_stat_void}; IMX_Layer _bound_count_layer = {_bound_count, _bound_count_stat_void}; int _bound_gidx = get_global_id(0) * _bound_tilesize.x; int _bound_gidy = get_global_id(1) * _bound_tilesize.y; if (_bound_gidx >= _RUNOVER_LAYER.stat->resolution.x) return; if (_bound_gidy >= _RUNOVER_LAYER.stat->resolution.y) return; int _bound_idx = _linearIndex(_RUNOVER_LAYER.stat, (int2)(_bound_gidx, _bound_gidy)); float2 _bound_P_image = bufferToImage(_RUNOVER_LAYER.stat, (float2)(_bound_gidx, _bound_gidy)); float2 _bound_P_texture = bufferToTexture(_RUNOVER_LAYER.stat, (float2)(_bound_gidx, _bound_gidy)); float2 _bound_P_pixel = bufferToPixel(_RUNOVER_LAYER.stat, (float2)(_bound_gidx, _bound_gidy)); #line 9 if (AT_src >= 1.0f) { int coord = get_global_id(1)*AT_xres; } AT_dst_set(AT_src); } " ) input1_name [ 0 locks=0 ] ( src ) input1_type [ 0 locks=0 ] ( "float" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) output2_name [ 0 locks=0 ] ( count ) output2_type [ 0 locks=0 ] ( "int" ) output2_metadata [ 0 locks=0 ] ( "first" ) output2_precision [ 0 locks=0 ] ( "node" ) output2_typeinfo [ 0 locks=0 ] ( "node" ) output2_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8d06751bd830a49ffe65hdaroot/vertical_count.userdata ___Version___20.5.410HouLC1033600b8c06751bd8305c10926ahdaroot/place_index_integer.inittype = opencl matchesdef = 1 HouLC1033600b8d06751bd830625703a5hdaroot/place_index_integer.defcomment "" position 14.7427 -6.41549 connectornextid 4 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 3 "output1" } inputsNamed3 { 0 (__dot4) "" 1 "input1" 1 (__dot5) "" 1 "input2" 2 shift_count 1 1 "input3" } inputs { 0 (__dot4) 0 1 1 (__dot5) 1 1 2 shift_count 0 1 } stat { create 1730888379 modify 1731666110 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8c06751bd830c8915dd8hdaroot/place_index_integer.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer src read float opt val=0 #bind layer count read int val=0 #bind layer shift read int val=0 #bind layer dst write float #bind layer out_count read write int @KERNEL { int shift_val = 0; int count_addr = @ixy.y*@xres; int crr_count = *((__global int *)(@count.data) + count_addr); // Current count if (crr_count > 0) { int crr_shift = *((__global int *)(@shift.data) + count_addr); // Current count int min_val, crr_val, min_val_idx; for (int i = 0; i < crr_count; i++) *((__global int *)(@out_count.data) + count_addr + i) = *((__global int *)(@count.data) + count_addr + i + 1); for (int i = 0; i < crr_count; i++) { min_val = @xres; min_val_idx = -1; for (int j = i; j < crr_count; j++) { crr_val = *((__global int *)(@out_count.data) + count_addr + j); if (crr_val < min_val) { min_val = crr_val; min_val_idx = j; } } if (min_val_idx != -1) { *((__global float *)(@dst.data) + count_addr + min_val) = crr_shift + i + 1; if (min_val_idx != i) *((__global int *)(@out_count.data) + count_addr + min_val_idx) = *((__global int *)(@out_count.data) + count_addr + i); } } } } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 0 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 3 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 2 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( src ) input1_type [ 0 locks=0 ] ( "float" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( count ) input2_type [ 0 locks=0 ] ( "int" ) input2_optional [ 0 locks=0 ] ( "off" ) input3_name [ 0 locks=0 ] ( shift ) input3_type [ 0 locks=0 ] ( "int" ) input3_optional [ 0 locks=0 ] ( "off" ) output2_name [ 0 locks=0 ] ( out_count ) output2_type [ 0 locks=0 ] ( "int" ) output2_metadata [ 0 locks=0 ] ( "first" ) output2_precision [ 0 locks=0 ] ( "node" ) output2_typeinfo [ 0 locks=0 ] ( "node" ) output2_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8806751bd830001663b1hdaroot/place_index_integer.userdata ___Version___20.5.410HouLC1033600bb406751bd830fd8c0333hdaroot/shift_count.inittype = opencl matchesdef = 1 HouLC1033600bb506751bd830d699595ehdaroot/shift_count.defcomment "" position 12.056 -4.01384 connectornextid 4 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" 3 "output2" } inputsNamed3 { 0 vertical_count 2 1 "input1" 2 total_count_layer 0 1 "input2" } inputs { 0 vertical_count 1 1 1 total_count_layer 0 1 } stat { create 1730888832 modify 1731666110 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb406751bd830c0bccdc5hdaroot/shift_count.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer count read int val=0 #bind layer in_total_count read int val=0 #bind layer shift write int #bind layer total_count write int @KERNEL { int shift_val = 0; int shift_addr = 0; int crr_count = 0; for (int y = 0; y < @yres; y++) { crr_count = *((__global int *)(@count.data) + shift_addr); // Current count *((__global int *)(@shift.data) + shift_addr) = shift_val; shift_val += crr_count; shift_addr += @xres; } @total_count.set(shift_val); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 0 0 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 2 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 2 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=1 ] ( "/* * PROPRIETARY INFORMATION. This software is proprietary to * Side Effects Software Inc., and is not to be reproduced, * transmitted, or disclosed in any way without written permission. * * Produced by: * Side Effects Software Inc * 123 Front Street West, Suite 1401 * Toronto, Ontario * Canada M5J 2M2 * 416-504-9876 * * NAME: interpolate.h ( CE Library, OpenCL) * * COMMENTS: */ #ifndef __INTERPOLATE_H__ #define __INTERPOLATE_H__ // #pragma OPENCL EXTENSION cl_amd_printf : enable /*#ifdef cl_amd_printf #define CHECKNAN(f) if (isnan(f)) { printf(\"%s is NAN, x = %g, y = %g, z = %g\\n\",#f, x, y, z);} #define CHECKNAN2D(f) if (isnan(f)) { printf(\"%s is NAN, x = %g, y = %g\\n\",#f, x, y);} #else*/ #define CHECKNAN(f) #define CHECKNAN2D(f) // #endif #define CLAMPOFFSET 1e-4f // While mix is limited to 0..1, it is tempting to just use a clamp // on t; but you can get cancellation at t == 1 that stops the result // from being b. Selecting on t == 0 will also stop any NANs from // leaking across, which matches the theory that a mix with 0 should // able to be short-circuited with an if (t == 0) a, so the fact the // second component is nan should not affect the result in this case. #define _SAFE_MIX(a, b, t) \\ select( select( mix(a, b, t), a, t <= 0 ), b, t >= 1 ) static float safe_mix1(float a, float b, float t) { return _SAFE_MIX(a, b, t); } static float2 safe_mix2(float2 a, float2 b, float2 t) { return _SAFE_MIX(a, b, t); } static float3 safe_mix3(float3 a, float3 b, float3 t) { return _SAFE_MIX(a, b, t); } static float4 safe_mix4(float4 a, float4 b, float4 t) { return _SAFE_MIX(a, b, t); } #undef _SAFE_MIX static float lerp(float v1, float v2, float t) { return v1 + (v2 - v1)*t; } static float fit01(float t, float v1, float v2) { return mix(v1, v2, clamp(t, 0.0f, 1.0f)); } static float fitTo01(float val, float omin, float omax) { float d = omax - omin; if (fabs(d) < 1e-8f) return 0.5f; if (omin < omax) { if (val < omin) return 0; if (val > omax) return 1; } else { if (val < omax) return 1; if (val > omin) return 0; } return (val - omin) / d; } // in is an array size long of values to be interpolated within the // [0, 1] interval. // pos==0 => in[0] // pos==1 => in[size-1] static float lerpConstant( constant float * in, int size, float pos ) { int m = size - 1; float flr; float t = fract(clamp(pos, 0.0f, 1.0f) * m, &flr); int flooridx = convert_int(flr); int ceilidx = min(flooridx+1, m); return mix(in[flooridx], in[ceilidx], t); } static float3 lerpConstant3( constant float * in, int size, float pos ) { int m = size - 1; float flr; float t = fract(clamp(pos, 0.0f, 1.0f) * m, &flr); int flooridx = convert_int(flr); int ceilidx = min(flooridx+1, m); float3 v1 = vload3(flooridx, in); float3 v2 = vload3(ceilidx, in); return mix(v1, v2, t); } static float centerFromFace(__global const float *a, size_t idx, uint axisstride) { return 0.5f * (a[idx] + a[idx + axisstride]); } static float faceFromCenter(__global const float *a, size_t idx, uint axisstride) { return 0.5f * (a[idx - axisstride] + a[idx]); } static float cornerFromCenter(__global const float *a, size_t idx, uint ystride, uint zstride) { return 0.125f * (a[idx] + a[idx - 1] + a[idx - ystride] + a[idx - zstride] + a[idx - 1 - ystride] + a[idx - 1 - zstride] + a[idx - ystride - zstride] + a[idx - 1 - ystride - zstride]); } static float cornerFromCenter2d(__global const float *a, size_t idx, uint xstride, uint ystride) { return 0.25f * (a[idx] + a[idx - xstride] + a[idx - ystride] + a[idx - xstride - ystride]); } // Calc central difference derivative of cell-centered grid // at a center cell at idx. static float dudxAligned(__global const float *u, const uint idx, const uint xstride, const float inv2dx) { return inv2dx * (u[idx + xstride] - u[idx - xstride]); } // Calc central difference derivative of face-sampled grid // at a center cell at idx. This works for all the off-axes directions // other than the one the face-sampled grid represents. E.g. you can // take the dy-derivative of the x-velocity field. static float dudxAlignedFace(__global const float *u, const uint idx, const uint ustride, const uint xstride, float inv4dx) { return inv4dx * ((u[idx + xstride] + u[idx + ustride + xstride]) - (u[idx - xstride] + u[idx + ustride - xstride])); } // Calc central difference derivative of face-sampled grid // at a center cell at idx. This only works for the derivative along // the axis the face-centered grid represents, e.g. you can only take // the dx-derivative of the x-velocity field. static float dudxFaceAtCenter(__global const float *u, const uint idx, const uint xstride, float invdx) { return invdx * (u[idx + xstride] - u[idx]); } static float dudxCenterAtFace(__global const float *u, const uint idx, const uint xstride, float invdx) { return invdx * (u[idx] - u[idx - xstride]); } // Calc central difference derivative of center-sampled grid at a corner cell // at idx, by first averaging along relevant faces (invdx should incorporate // the averaging factor). axis_stride is stride along the differentiation axis, // and the other strides are along the remaining axes. static float dudxCenterAtCorner(__global const float *u, const uint idx, const uint axis_stride, const uint off_stride1, const uint off_stride2, float inv4dx) { return inv4dx * ((u[idx] + u[idx - off_stride1] + u[idx - off_stride2] + u[idx - off_stride1 - off_stride2]) - (u[idx - axis_stride] + u[idx - off_stride1 - axis_stride] + u[idx - off_stride2 - axis_stride] + u[idx - off_stride1 - off_stride2 - axis_stride])); } static float dudxCenterAtCorner2d(__global const float *u, const uint idx, const uint axis_stride, const uint off_stride, float inv2dx) { return inv2dx * ((u[idx] + u[idx - off_stride]) - (u[idx - axis_stride] + u[idx - off_stride - axis_stride])); } static void bilinear_interp(float x, float y, __global const float *p, size_t idx, __global float *phin, __global float *minphi, __global float *maxphi, uint offset, uint xstride, uint ystride) { // clamp to boundaries x = clamp(x, -1.0f, get_global_size(0) - CLAMPOFFSET); y = clamp(y, -1.0f, get_global_size(1) - CLAMPOFFSET); const int gi = (int)floor(x); const int gj = (int)floor(y); // get fractional part const float sx = x - gi; const float sy = y - gj; size_t srcidx = offset + gi * xstride + gj * ystride; const float i00 = p[srcidx]; const float i10 = p[srcidx + xstride]; const float i01 = p[srcidx + ystride]; const float i11 = p[srcidx + xstride + ystride]; CHECKNAN2D(i00) CHECKNAN2D(i10) CHECKNAN2D(i01) CHECKNAN2D(i11) const float val = (i00 * (1-sx) + i10 * (sx)) * (1-sy) + (i01 * (1-sx) + i11 * (sx)) * ( sy); phin[idx] = val; if (minphi) minphi[idx] = fmin(fmin(fmin(i00, i01), i10), i11); if (maxphi) maxphi[idx] = fmax(fmax(fmax(i00, i01), i10), i11); } static float bilinear_interp_val(float x, float y, __global const float *p, uint offset, uint xstride, uint ystride, uint offx, uint offy) { // clamp to boundaries x = clamp(x, -1.0f, get_global_size(0) - CLAMPOFFSET - offx); y = clamp(y, -1.0f, get_global_size(1) - CLAMPOFFSET - offy); const int gi = (int)floor(x); const int gj = (int)floor(y); // get fractional part const float sx = x - gi; const float sy = y - gj; size_t srcidx = offset + gi * xstride + gj * ystride; const float i00 = p[srcidx]; const float i10 = p[srcidx + xstride]; const float i01 = p[srcidx + ystride]; const float i11 = p[srcidx + xstride + ystride]; return (i00 * (1-sx) + i10 * (sx)) * (1-sy) + (i01 * (1-sx) + i11 * (sx)) * ( sy); } static void trilinear_interp(float x, float y, float z, __global const float *p, size_t idx, __global float *phin, __global float *minphi, __global float *maxphi, uint offset, uint ystride, uint zstride) { x = clamp(x, -1.0f, get_global_size(0) - CLAMPOFFSET); y = clamp(y, -1.0f, get_global_size(1) - CLAMPOFFSET); z = clamp(z, -1.0f, get_global_size(2) - CLAMPOFFSET); const int gi = (int)floor(x); const int gj = (int)floor(y); const int gk = (int)floor(z); const float sx = x - gi; const float sy = y - gj; const float sz = z - gk; size_t srcidx = offset + gi + gj * ystride + gk * zstride; const float i000 = p[srcidx]; const float i100 = p[srcidx + 1]; const float i010 = p[srcidx + ystride]; const float i110 = p[srcidx + 1 + ystride]; const float i001 = p[srcidx + zstride]; const float i101 = p[srcidx + 1 + zstride]; const float i011 = p[srcidx + ystride + zstride]; const float i111 = p[srcidx + 1 + ystride + zstride]; CHECKNAN(i000) CHECKNAN(i100) CHECKNAN(i010) CHECKNAN(i110) CHECKNAN(i001) CHECKNAN(i101) CHECKNAN(i011) CHECKNAN(i111) const float val = ((i000 * (1 - sx) + i100 * (sx)) * (1 - sy) + (i010 * (1 - sx) + i110 * (sx)) * ( sy)) * (1 - sz) + ((i001 * (1 - sx) + i101 * (sx)) * (1 - sy) + (i011 * (1 - sx) + i111 * (sx)) * ( sy)) * ( sz); phin[idx] = val; if (minphi) minphi[idx] = fmin(fmin(fmin(fmin(fmin(fmin(fmin(i000, i001), i010), i011), i100), i101), i110), i111); if (maxphi) maxphi[idx] = fmax(fmax(fmax(fmax(fmax(fmax(fmax(i000, i001), i010), i011), i100), i101), i110), i111); } static float trilinear_interp_val(float x, float y, float z, __global const float *p, uint offset, uint ystride, uint zstride, uint offx, uint offy, uint offz ) { x = clamp(x, -1.0f, get_global_size(0) - CLAMPOFFSET - offx); y = clamp(y, -1.0f, get_global_size(1) - CLAMPOFFSET - offy); z = clamp(z, -1.0f, get_global_size(2) - CLAMPOFFSET - offz); const int gi = (int)floor(x); const int gj = (int)floor(y); const int gk = (int)floor(z); const float sx = x - gi; const float sy = y - gj; const float sz = z - gk; size_t srcidx = offset + gi + gj * ystride + gk * zstride; const float i000 = p[srcidx]; const float i100 = p[srcidx + 1]; const float i010 = p[srcidx + ystride]; const float i110 = p[srcidx + 1 + ystride]; const float i001 = p[srcidx + zstride]; const float i101 = p[srcidx + 1 + zstride]; const float i011 = p[srcidx + ystride + zstride]; const float i111 = p[srcidx + 1 + ystride + zstride]; return ((i000 * (1 - sx) + i100 * (sx)) * (1 - sy) + (i010 * (1 - sx) + i110 * (sx)) * ( sy)) * (1 - sz) + ((i001 * (1 - sx) + i101 * (sx)) * (1 - sy) + (i011 * (1 - sx) + i111 * (sx)) * ( sy)) * ( sz); } static float bilinear_interp_vol(float2 pos, __global const float *p, uint offset, uint xstride, uint ystride, uint resx, uint resy) { float x = clamp(pos.x-0.5f, (float)0, (float)(resx-1)); float y = clamp(pos.y-0.5f, (float)0, (float)(resy-1)); const int gi = (int)floor(x); const int gj = (int)floor(y); // In case our clamp is exactly res#-1 const int dx = select((int)xstride, (int)0, gi == resx-1); const int dy = select((int)ystride, (int)0, gj == resy-1); const float sx = x - gi; const float sy = y - gj; size_t srcidx = offset + gi * xstride + gj * ystride; const float i000 = p[srcidx]; const float i100 = p[srcidx + dx]; const float i010 = p[srcidx + dy]; const float i110 = p[srcidx + dx + dy]; return mix( mix(i000, i100, sx), mix(i010, i110, sx), sy); } static float trilinear_interp_vol(float3 pos, __global const float *p, uint offset, uint xstride, uint ystride, uint zstride, uint resx, uint resy, uint resz) { float x = clamp(pos.x-0.5f, (float)0, (float)(resx-1)); float y = clamp(pos.y-0.5f, (float)0, (float)(resy-1)); float z = clamp(pos.z-0.5f, (float)0, (float)(resz-1)); const int gi = (int)floor(x); const int gj = (int)floor(y); const int gk = (int)floor(z); // In case our clamp is exactly res#-1 const int dx = select((int)xstride, (int)0, gi == resx-1); const int dy = select((int)ystride, (int)0, gj == resy-1); const int dz = select((int)zstride, (int)0, gk == resz-1); const float sx = x - gi; const float sy = y - gj; const float sz = z - gk; size_t srcidx = offset + gi * xstride + gj * ystride + gk * zstride; const float i000 = p[srcidx]; const float i100 = p[srcidx + dx]; const float i010 = p[srcidx + dy]; const float i110 = p[srcidx + dx + dy]; const float i001 = p[srcidx + dz]; const float i101 = p[srcidx + dx + dz]; const float i011 = p[srcidx + dy + dz]; const float i111 = p[srcidx + dx + dy + dz]; return mix( mix( mix(i000, i100, sx), mix(i010, i110, sx), sy), mix( mix(i001, i101, sx), mix(i011, i111, sx), sy), sz); } static float4 linesegInterpolationWeights(float u) { return (float4)(1 - u, u, 0, 0); } // From GEOtriInterpolationWeights, but static float4 triInterpolationWeights(float u, float v) { // Triangle - use barycentric coordinates // This is a hack to make sure we are given proper // barycentric u, v coordinates. That is, we require // u+v <= 1, and if that's not the case we hack it so // u = 1-u, v = 1-v, thus ensuring u+v <= 1. (This // assumes that u, v are each between 0 and 1) // This is used for when evaluateInteriorPoint is // called from POP_GenVar for birthing from a surface. // // Note we actually flip on the u+v = 1 axis instead // of what is described above so slightly outside points // do not teleport to opposite locations. float uv = 1 - u - v; // Assume valid uv's. #if 0 if (uv < 0) { u += uv; v += uv; uv = -uv; } #endif return (float4) (uv, u, v, 0); } // From GEOquadInterpolationWeights static float4 quadInterpolationWeights(float u, float v) { float u1 = 1 - u; float v1 = 1 - v; return (float4)(u1 * v1, u1 * v, u * v, u * v1); } // From GEO_PrimTetrahedron::remapTetCoords static float4 tetInterpolationWeights(float u, float v, float w) { float uvw = 1 - u - v - w; // Assume valid uv's. #if 0 if (uvw < 0) { // Mirror in u + v == 1 plane, reducing from 6 tetrahedra to 3, // i.e. a right triangular prism, whose right-angle edge is // along the w axis. if (u + v > 1) { float bary = 1 - u - v; u += bary; v += bary; uvw -= 2 * bary; } // Mirror the far tetrahedron (shares no face with the tet to keep) // into the middle tetrahedron (shares one face with the tet to keep) if (u + w > 1) { // Weight of point at (1,0,1), since 1+1-1 = 1 float weight = (u + w - 1); // Subtract component of (1,0,1), which only changes u and w u -= weight;//*1 //v -= weight*0; w -= weight;//*1 // Add component of (0,1,0), which only changes v //u += weight*0; v += weight;//*1 //w += weight*0; // Update uvw uvw += weight; } // Mirror the remaining outside tetrahedron into the tet to keep if (uvw < 0) { // Weight of point at (0,1,1), since -(1-0-1-1) = 1 float weight = -uvw; // Subtract component of (0,1,1), which only changes v and w //u -= weight*0 v -= weight;//*1 w -= weight;//*1 // Add component of (0,0,0), which requires no change // Update uvw uvw = -uvw; //equivalent to uvw += 2*weight; } } #endif return (float4)(uvw, u, v, w); } void computeSubdCurveCoeffsAndIndices( float u, int n, bool closed, float4 *coeffs_ptr, int4 *indices_ptr) { const float16 theSubDFirstBasis = { 1.0, -1.0, 0.0, 1.0/6.0, 0.0, 1.0, 0.0, -1.0/3.0, 0.0, 0.0, 0.0, 1.0/6.0, 0.0, 0.0, 0.0, 0.0 }; const float16 theOpenBasis = { 1.0/6.0, -0.5, 0.5, -1.0/6.0, 2.0/3.0, 0.0, -1.0, 0.5, 1.0/6.0, 0.5, 0.5, -0.5, 0.0, 0.0, 0.0, 1.0/6.0 }; float4 coeffs = 0.0; int4 indices = 0.0; // UT_ASSERT_P(n >= 1); // Special cases for n <= 2 if (n == 1) { indices.x = -1; indices.y = 0; indices.z = -1; indices.w = -1; coeffs.x = 0; coeffs.y = 1; coeffs.z = 0; coeffs.w = 0; *coeffs_ptr = coeffs; *indices_ptr = indices; } else if (n == 2) { if (closed) { u *= 2; if (u > 1) u = 2-u; } indices.x = -1; indices.y = 0; indices.z = 1; indices.w = -1; coeffs.x = 0.0; coeffs.y = 1.0 - u; coeffs.z = u; coeffs.w = 0.0; } const float16 *basis = &theOpenBasis; const float16 *midbasis = &theOpenBasis; int nedges = n - !closed; u *= nedges; int i = floor(u); i = clamp(i, 0, nedges-1); float t = u - i; float16 temp; if (i == 0) { if (closed) { indices.x = n-1; indices.y = 0; indices.z = 1; indices.w = 2; } else { basis = &theSubDFirstBasis; indices.x = 0; indices.y = 1; indices.z = 2; indices.w = -1; } } else if (i >= n-2) { if (closed) { if (i == n-2) { indices.x = n-3; indices.y = n-2; indices.z = n-1; indices.w = 0; } else { // UT_ASSERT_P(i == n-1); indices.x = n-2; indices.y = n-1; indices.z = 0; indices.w = 1; } } else { basis = &theSubDFirstBasis; indices.x = -1; indices.y = n-3; indices.z = n-2; indices.w = n-1; temp.lo.lo = (*basis).hi.hi; temp.lo.hi = (*basis).hi.lo; temp.hi.lo = (*basis).lo.hi; temp.hi.hi = (*basis).lo.lo; basis = &temp; t = 1-t; } } else { indices.x = i-1; indices.y = i; indices.z = i+1; indices.w = i+2; } float t2 = t*t; float4 tpow = {1.0f, t, t2, t2*t}; (*coeffs_ptr).x = dot(tpow, (*basis).lo.lo); (*coeffs_ptr).y = dot(tpow, (*basis).lo.hi); (*coeffs_ptr).z = dot(tpow, (*basis).hi.lo); (*coeffs_ptr).w = dot(tpow, (*basis).hi.hi); *indices_ptr = indices; } float3 evaluateCubicCoeffs_vload3(float4 coeffs, int4 indices, global float *values) { float3 res = 0; if (indices.x >= 0) res += coeffs.x * vload3(indices.x, values); if (indices.y >= 0) res += coeffs.y * vload3(indices.y, values); if (indices.z >= 0) res += coeffs.z * vload3(indices.z, values); if (indices.w >= 0) res += coeffs.w * vload3(indices.w, values); return res; } float3 evaluateCubicCoeffs_3(float4 coeffs, int4 indices, float3 *values) { float3 res = 0; if (indices.x >= 0) res += coeffs.x * values[indices.x]; if (indices.y >= 0) res += coeffs.y * values[indices.y]; if (indices.z >= 0) res += coeffs.z * values[indices.z]; if (indices.w >= 0) res += coeffs.w * values[indices.w]; return res; } #endif /* * PROPRIETARY INFORMATION. This software is proprietary to * Side Effects Software Inc., and is not to be reproduced, * transmitted, or disclosed in any way without written permission. * * Produced by: * Side Effects Software Inc * 123 Front Street West, Suite 1401 * Toronto, Ontario * Canada M5J 2M2 * 416-504-9876 * * NAME: typedefines.h ( CE Library, OpenCL) * * COMMENTS: OpenCL type definitions */ #ifndef __TYPE_DEFINE_H__ #define __TYPE_DEFINE_H__ // The OpenCL SOP/DOP might define // these before compilation for 32-/64-bit support, // so only define them if not already defined. #ifndef fpreal // The USE_DOUBLE flag is used by the older OpenCL-enabled // DOPs that make up the Pyro solver. #ifdef USE_DOUBLE #pragma OPENCL EXTENSION cl_khr_fp64: enable #define fpreal double #define fpreal2 double2 #define fpreal3 double3 #define fpreal4 double4 #define fpreal8 double8 #define fpreal16 double16 #define FPREAL_PREC 64 // We also want to define exint as long in this case. #define USE_LONG #else #define fpreal float #define fpreal2 float2 #define fpreal3 float3 #define fpreal4 float4 #define fpreal8 float8 #define fpreal16 float16 #define FPREAL_PREC 32 #endif #endif #if FPREAL_PREC==64 // Load a 64-bit fpreal2 from a float2 buffer. static fpreal2 vload2f(size_t i, const global float *b) { i *= 2; return (fpreal2)(b[i], b[i + 1]); } // Load a 64-bit fpreal3 from a float3 buffer. static fpreal3 vload3f(size_t i, const global float *b) { i *= 3; return (fpreal3)(b[i], b[i+1], b[i+2]); } // Load a 64-bit fpreal4 from a float4 buffer. static fpreal4 vload4f(size_t i, const global float *b) { i *= 4; return (fpreal4)(b[i], b[i+1], b[i+2], b[i+3]); } // Store a 64-bit fpreal3 into a float3 buffer. static void vstore3f(fpreal3 a, size_t i, global float *b) { vstore3((float3)(a.x, a.y, a.z), i, b); } // Store a 64-bit fpreal4 into a float4 buffer. static void vstore4f(fpreal4 a, size_t i, global float *b) { vstore4((float4)(a.x, a.y, a.z, a.w), i, b); } #else // Load a 32-bit fpreal2 from a float2 buffer (no-op). #define vload2f vload2 // Load a 32-bit fpreal3 from a float3 buffer (no-op). #define vload3f vload3 // Load a 32-bit fpreal4 from a float4 buffer (no-op). #define vload4f vload4 // Store a 32-bit fpreal3 into a float3 buffer (no-op). #define vstore3f vstore3 // Store a 32-bit fpreal4 into a float4 buffer (no-op). #define vstore4f vstore4 #endif // The OpenCL SOP/DOP might define // these before compilation for 32-/64-bit support, // so only define them if not already defined. #ifndef exint #ifdef USE_LONG #define exint long #define exint2 long2 #define exint3 long3 #define exint4 long4 #else #define exint int #define exint2 int2 #define exint3 int3 #define exint4 int4 #endif #endif #endif /* * PROPRIETARY INFORMATION. This software is proprietary to * Side Effects Software Inc., and is not to be reproduced, * transmitted, or disclosed in any way without written permission. * * Produced by: * Side Effects Software Inc * 123 Front Street West, Suite 1401 * Toronto, Ontario * Canada M5J 2M2 * 416-504-9876 * * NAME: util.h ( CE Library, OpenCL) * * COMMENTS: */ #ifndef __UTIL_H__ #define __UTIL_H__ static void swapf(fpreal *a, fpreal *b) { fpreal t = *a; *a = *b; *b = t; } #endif /* * PROPRIETARY INFORMATION. This software is proprietary to * Side Effects Software Inc., and is not to be reproduced, * transmitted, or disclosed in any way without written permission. * * Produced by: * Side Effects Software Inc * 123 Front Street West, Suite 1401 * Toronto, Ontario * Canada M5J 2M2 * 416-504-9876 * * NAME: matrix.h ( CE Library, OpenCL) * * COMMENTS: */ #ifndef __MATRIX_H__ #define __MATRIX_H__ // #include \"typedefines.h\" // #include \"util.h\" #define PRINTI(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%d\\n\", v) #define PRINTU(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%u\\n\", v) #define PRINTLI(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%lld\\n\", v) #define PRINTLU(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%llu\\n\", v) #define PRINTF(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%g\\n\", v) #define PRINTVEC3(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%g %g %g\\n\", v.x, v.y, v.z) #define PRINTVEC3I(v) \\ printf(\"%s:\\n\", #v); \\ printf(\"%d %d %d\\n\", v.x, v.y, v.z) #define PRINTMAT3(m) \\ printf(\"%s:\\n\", #m); \\ printf(\"%g %g %g\\n\", m[0].s0, m[0].s1, m[0].s2); \\ printf(\"%g %g %g\\n\", m[1].s0, m[1].s1, m[1].s2); \\ printf(\"%g %g %g\\n\", m[2].s0, m[2].s1, m[2].s2) #define PRINTMAT4(m) \\ printf(\"%s:\\n\", #m); \\ printf(\"%g %g %g %g\\n\", m.s0, m.s1, m.s2, m.s3); \\ printf(\"%g %g %g %g\\n\", m.s4, m.s5, m.s6, m.s7); \\ printf(\"%g %g %g %g\\n\", m.s8, m.s9, m.sa, m.sb); \\ printf(\"%g %g %g %g\\n\", m.sc, m.sd, m.se, m.sf) // A 3x3 matrix in row-major order (to match UT_Matrix3) // NOTE: fpreal3 is 4 floats, so this is size 12 typedef fpreal3 mat3[3]; // A 3x2 matrix in row-major order typedef fpreal2 mat32[3]; // A 2x2 matrix in row-major order, stored in a single fpreal4 typedef fpreal4 mat2; // A 4x4 matrix in row-major order, stored in a single fpreal16 typedef fpreal16 mat4; // Return the sum of entries of the vector v. static fpreal vec3sum(const fpreal3 v) { return v.x + v.y + v.z; } // Return the product of entries of the vector v. static fpreal vec3prod(const fpreal3 v) { return v.x * v.y * v.z; } // Create a 2x2 matrix with columns of the specified vectors. static mat2 mat2fromcols(const fpreal2 c0, const fpreal2 c1) { return (mat2)(c0.s0, c1.s0, c0.s1, c1.s1); } // Transpose a 2x2 matrix. static mat2 transpose2(const mat2 a) { return (mat2)(a.even, a.odd); } // Multiply A * B for 2x2 matrices. static mat2 mat2mul(const mat2 a, const mat2 b) { return (mat2)(dot(a.lo, b.even), dot(a.lo, b.odd), dot(a.hi, b.even), dot(a.hi, b.odd)); } // Multiply b * A where b is a 2-vector and A is a 2x2 matrix. // This multiplication order matches VEX. static fpreal2 mat2vecmul(const mat2 a, const fpreal2 b) { mat2 aT = transpose2(a); return (fpreal2)(dot(aT.lo, b), dot(aT.hi, b)); } // Return the square of the L2-norm of a 2x2 matrix. static fpreal squaredNorm2(const mat2 a) { return dot(a.lo, a.lo) + dot(a.hi, a.hi); } // Add 3x3 matrix A to matrix B and store the result in matrix C. static void mat3add(const mat3 a, const mat3 b, mat3 c) { c[0] = a[0] + b[0]; c[1] = a[1] + b[1]; c[2] = a[2] + b[2]; } // Subtract 3x3 matrix A from matrix B and store the result in C. static void mat3sub(const mat3 a, const mat3 b, mat3 c) { c[0] = a[0] - b[0]; c[1] = a[1] - b[1]; c[2] = a[2] - b[2]; } // Set 3x3 matrix A to zero. static void mat3zero(mat3 a) { a[0] = (fpreal3)(0.0f); a[1] = (fpreal3)(0.0f); a[2] = (fpreal3)(0.0f); } // Set 3x3 matrix A to the identity. static void mat3identity(mat3 a) { a[0] = (fpreal3)(1.0f, 0.0f, 0.0f); a[1] = (fpreal3)(0.0f, 1.0f, 0.0f); a[2] = (fpreal3)(0.0f, 0.0f, 1.0f); } // Copy 3x3 matrix A to matrix B. static void mat3copy(const mat3 a, mat3 b) { b[0] = a[0]; b[1] = a[1]; b[2] = a[2]; } // Load a 3x3 matrix from memory at the specified index. // The matrix should be row-major as stored in geometry // attributes. static void mat3load(size_t idx, const global float *a, mat3 m) { idx *= 3; m[0] = vload3f(idx, a); m[1] = vload3f(idx + 1, a); m[2] = vload3f(idx + 2, a); } // Store a 3x3 matrix to memory at the specified index. // The matrix should be row-major as stored in geometry // attributes. void mat3store(mat3 in, int idx, global fpreal *data) { idx *= 3; vstore3(in[0], idx, data); vstore3(in[1], idx + 1, data); vstore3(in[2], idx + 2, data); } // Create a 3x3 matrix with columns of the specified vectors. static void mat3fromcols(const fpreal3 c0, const fpreal3 c1, const fpreal3 c2, mat3 m) { m[0] = (fpreal3)(c0.s0, c1.s0, c2.s0); m[1] = (fpreal3)(c0.s1, c1.s1, c2.s1); m[2] = (fpreal3)(c0.s2, c1.s2, c2.s2); } // Transpose a 3x3 matrix. static void transpose3(const mat3 a, mat3 b) { mat3fromcols(a[0], a[1], a[2], b); } // Multiply A * B and store in C for 3x3 matrices. static void mat3mul(const mat3 a, const mat3 b, mat3 c) { mat3 bT; transpose3(b, bT); c[0] = (fpreal3)(dot(a[0],bT[0]), dot(a[0],bT[1]), dot(a[0],bT[2])); c[1] = (fpreal3)(dot(a[1],bT[0]), dot(a[1],bT[1]), dot(a[1],bT[2])); c[2] = (fpreal3)(dot(a[2],bT[0]), dot(a[2],bT[1]), dot(a[2],bT[2])); } // Multiply b * A where b is a 3-vector and A is a 3x3 matrix. // This multiplication order matches VEX. static fpreal3 mat3vecmul(const mat3 a, const fpreal3 b) { mat3 aT; transpose3(a, aT); return (fpreal3)(dot(aT[0], b), dot(aT[1], b), dot(aT[2], b)); } // Multiply b * A^T where b is a 3-vector and A is a 3x3 matrix. // This multiplication order matches VEX. static fpreal3 mat3Tvecmul(const mat3 a, const fpreal3 b) { return (fpreal3)(dot(a[0], b), dot(a[1], b), dot(a[2], b)); } // Multiply b * A where b is a 3-vector and A is a 3x3 matrix, // but discard the third component. // This multiplication order matches VEX. static fpreal2 mat3vec2mul(const mat3 a, const fpreal3 b) { mat3 aT; transpose3(a, aT); return (fpreal2)(dot(aT[0], b), dot(aT[1], b)); } // Multiply b * A^T where b is a 3-vector and A is a 3x3 matrix, // but discard the third component. // This multiplication order matches VEX. static fpreal2 mat3Tvec2mul(const mat3 a, const fpreal3 b) { return (fpreal2)(dot(a[0], b), dot(a[1], b)); } // Store the 3x3 matrix that is the outer product of the input // a and b vectors in C. static void outerprod3(const fpreal3 a, const fpreal3 b, mat3 c) { c[0] = a.x * b; c[1] = a.y * b; c[2] = a.z * b; } // Compute C = s * A + t * B, where s, t are scalars and A, B are 3x3 matrices. static void mat3lcombine(const fpreal s, const mat3 a, const fpreal t, const mat3 b, mat3 c) { c[0] = s * a[0] + t * b[0]; c[1] = s * a[1] + t * b[1]; c[2] = s * a[2] + t * b[2]; } // Return the square of the L2-norm of a 3x3 matrix. static fpreal squaredNorm3(const mat3 a) { return dot(a[0], a[0]) + dot(a[1], a[1]) + dot(a[2], a[2]); } // Return the determinant of the supplied 3x3 matrix. static fpreal det3(const mat3 a) { fpreal d = a[0].s0 * (a[1].s1 * a[2].s2 - a[1].s2 * a[2].s1); d -= a[0].s1 * (a[1].s0 * a[2].s2 - a[1].s2 * a[2].s0); d += a[0].s2 * (a[1].s0 * a[2].s1 - a[1].s1 * a[2].s0); return d; } // Return diagonal vector of the supplied 3x3 matrix. static fpreal3 diag3(const mat3 a) { return (fpreal3)(a[0].s0, a[1].s1, a[2].s2); } // Set a to the 3x3 diagonal matrix defined by the entries of the vector diag. static void mat3diag(const fpreal3 diag, mat3 a) { mat3zero(a); a[0].x = diag.x; a[1].y = diag.y; a[2].z = diag.z; } // Return the trace of the supplied 3x3 matrix. static fpreal trace3(const mat3 m) { return vec3sum(diag3(m)); } // Set 4x4 matrix A to the identity. static void mat4identity(mat4 *a) { (*a).lo.lo = (fpreal4)(1.0f, 0.0f, 0.0f, 0.0f); (*a).lo.hi = (fpreal4)(0.0f, 1.0f, 0.0f, 0.0f); (*a).hi.lo = (fpreal4)(0.0f, 0.0f, 1.0f, 0.0f); (*a).hi.hi = (fpreal4)(0.0f, 0.0f, 0.0f, 1.0f); } // Multiply b * A where b is a 2-vector and A is a 4x4 matrix. // This multiplication order matches VEX. static fpreal2 mat4vec2mul(const mat4 a, const fpreal2 b) { return b.x * a.lo.lo.xy + b.y * a.lo.hi.xy + a.hi.hi.xy; } // Multiply b * A where b is a 3-vector and A is a 4x3 matrix, // assuming a fourth component of the vector to be 0, i.e. // the typical transformation of a 3d vector by a matrix. // This multiplication order matches VEX. static fpreal3 mat43vec3mul(const mat4 a, const fpreal3 b) { fpreal4 result = b.x * a.lo.lo + b.y * a.lo.hi + b.z * a.hi.lo; return (fpreal3)(result.x, result.y, result.z); } // Multiply b * A where b is a 3-vector and A is a 4x4 matrix, // assuming a fourth component of the vector to be 1, i.e. // the typical transformation of a 3d point by a matrix. // This multiplication order matches VEX.static fpreal3 static fpreal3 mat4vec3mul(const mat4 a, const fpreal3 b) { fpreal4 result = b.x * a.lo.lo + b.y * a.lo.hi + b.z * a.hi.lo + a.hi.hi; return (fpreal3)(result.x, result.y, result.z); } // Multiply b * A where b is a 3-vector and A is a 4x4 matrix. // This multiplication order matches VEX. static fpreal4 mat4vecmul(const mat4 a, const fpreal4 b) { fpreal4 result = b.x * a.lo.lo + b.y * a.lo.hi + b.z * a.hi.lo + b.w * a.hi.hi; return result; } // UT_Matrix4::solveColumn // cp: pivot_col and pivot_row // c1, c2, c3: other columns and rows static void mat4solvecol(fpreal (*matx)[4][4], int cp) { fpreal pivot_value_inverse; int c1, c2, c3; switch (cp) { case 0: c1 = 1; c2 = 2; c3 = 3; break; case 1: c1 = 0; c2 = 2; c3 = 3; break; case 2: c1 = 0; c2 = 1; c3 = 3; break; case 3: c1 = 0; c2 = 1; c3 = 2; break; } // Here we will find the inverse of the pivot, set the pivot to 1, // and multiply the row which contains the pivot by the pivot // inverse. This might seem a little weird. The algorithm does it // this way so that it can gradually replace the input matrix // with its inverse. pivot_value_inverse = 1.0F/(*matx)[cp][cp]; (*matx)[cp][cp] = pivot_value_inverse; (*matx)[cp][c1] *= pivot_value_inverse; (*matx)[cp][c2] *= pivot_value_inverse; (*matx)[cp][c3] *= pivot_value_inverse; // Now we subtract multiples of the pivot row from the other // rows in the matrix. This would be more familiar if the pivot // itself hadn't been set to 1 before the pivot row was multiplied // by the inverse (see above). (*matx)[c1][c1] -= (*matx)[cp][c1]*(*matx)[c1][cp]; (*matx)[c1][c2] -= (*matx)[cp][c2]*(*matx)[c1][cp]; (*matx)[c1][c3] -= (*matx)[cp][c3]*(*matx)[c1][cp]; (*matx)[c2][c1] -= (*matx)[cp][c1]*(*matx)[c2][cp]; (*matx)[c2][c2] -= (*matx)[cp][c2]*(*matx)[c2][cp]; (*matx)[c2][c3] -= (*matx)[cp][c3]*(*matx)[c2][cp]; (*matx)[c3][c1] -= (*matx)[cp][c1]*(*matx)[c3][cp]; (*matx)[c3][c2] -= (*matx)[cp][c2]*(*matx)[c3][cp]; (*matx)[c3][c3] -= (*matx)[cp][c3]*(*matx)[c3][cp]; (*matx)[c1][cp] *= -pivot_value_inverse; (*matx)[c2][cp] *= -pivot_value_inverse; (*matx)[c3][cp] *= -pivot_value_inverse; } // UT_Matrix4::invert // Linear equation solution by Gauss-Jordan elimination. static int mat4invert(fpreal16 *m) { fpreal tol = 0.0; fpreal (*matx)[4][4] = (fpreal (*)[4][4]) m; int indexcol[4], indexrow[4]; int pivot_row, pivot_col; // Check for the very common case of trivial column 3. const bool is_trivial_col3 = ((*matx)[0][3] == 0) && ((*matx)[1][3] == 0) && ((*matx)[2][3] == 0) && ((*matx)[3][3] == 1); // We will need to keep track of which columns we have already found // pivots in. For this we use what is essentially a set of flags in the // array \"pivoted_columns_flags\". We initialize them to 0 here. bool pivoted_columns_flags[4] = {false, false, false, false}; // In order to invert an n*n matrix, we will have to find n pivots, and // for each pivot reduce each row. We will keep track of which pivot and // set of reductions we are working on with \"reduction\" for (int reduction = 0; reduction < 4; reduction++) { fpreal pivot_value = 0; // This is the outer loop of the search for a pivot element // This loop finds the pivot element by choosing the element of the // matrix which has the largest absolute value of all elements of the // array not in columns/rows that contain a previously used pivot. for (int row = 0; row < 4; row++) { // if there hasn't already been a pivot in this row if ( !pivoted_columns_flags[row] ) { // if there hasn't already been a pivot in column 0 if ( !pivoted_columns_flags[0] ) { const fpreal abs_element_value = fabs((*matx)[row][0]); if ( abs_element_value > pivot_value ) { pivot_value = abs_element_value; pivot_row = row; pivot_col = 0; } } // if there hasn't already been a pivot in column 1 if ( !pivoted_columns_flags[1] ) { const fpreal abs_element_value = fabs((*matx)[row][1]); if ( abs_element_value > pivot_value ) { pivot_value = abs_element_value; pivot_row = row; pivot_col = 1; } } // if there hasn't already been a pivot in column 2 if ( !pivoted_columns_flags[2] ) { const fpreal abs_element_value = fabs((*matx)[row][2]); if ( abs_element_value > pivot_value ) { pivot_value = abs_element_value; pivot_row = row; pivot_col = 2; } } // if there hasn't already been a pivot in column 3 if ( !pivoted_columns_flags[3] ) { const fpreal abs_element_value = fabs((*matx)[row][3]); if ( abs_element_value > pivot_value ) { pivot_value = abs_element_value; pivot_row = row; pivot_col = 3; } } } } // Odd check here if the matrix is filled with nan's or infinities // Verify that the pivot we found is not 0 if (pivot_value <= tol) { return 1; } // Now we have found the pivot element for the current reduction. // This element of the matrix is the largest element of all elements // not in rows and columns previously used for other pivots. // Record that we have found a pivot in the current column pivoted_columns_flags[pivot_col] = true; indexrow[reduction] = pivot_row; indexcol[reduction] = pivot_col; // The pivot must be on the diagonal before we can use it. If the // pivot we found wasn't already on the diagonal, we swap rows to // put it there now. if ( pivot_row != pivot_col ) { swapf(&(*matx)[pivot_row][0], &(*matx)[pivot_col][0]); swapf(&(*matx)[pivot_row][1], &(*matx)[pivot_col][1]); swapf(&(*matx)[pivot_row][2], &(*matx)[pivot_col][2]); swapf(&(*matx)[pivot_row][3], &(*matx)[pivot_col][3]); } // Note that from here on, the pivot is on the diagonal, and thus // has the same row index as column index. In particular, while // we may have swapped the row the pivot is in, we have not changed // the column. Thus, the pivot location will be referred to using // pivot_col only. switch (pivot_col) { case 0: mat4solvecol(matx, 0); break; case 1: mat4solvecol(matx, 1); break; case 2: mat4solvecol(matx, 2); break; case 3: mat4solvecol(matx, 3); break; } } // Finally, we \"unscramble\" the matrix, which was scrambled by // row swapping. This will produce the actual inverse of the matrix. for (int reduction = 3; reduction >= 0; reduction--) { int irow = indexrow[reduction]; int icol = indexcol[reduction]; if ( irow != icol ) { swapf(&(*matx)[0][irow], &(*matx)[0][icol]); swapf(&(*matx)[1][irow], &(*matx)[1][icol]); swapf(&(*matx)[2][irow], &(*matx)[2][icol]); swapf(&(*matx)[3][irow], &(*matx)[3][icol]); } } if (is_trivial_col3) { // Force column 3 to be exact if input column 3 was exactly trivial. (*matx)[0][3] = 0; (*matx)[1][3] = 0; (*matx)[2][3] = 0; (*matx)[3][3] = 1; } return 0; } static fpreal mat2det(const mat2 m) { return m.x * m.w - m.y * m.z; } static fpreal mat2inv(const mat2 m, mat2 *minvout) { fpreal det = mat2det(m); if (det == 0) return 0; *minvout = (mat2)( m.w, -m.y, -m.z, m.x ) / det; return det; } static fpreal mat3inv(const mat3 m, mat3 minvout) { fpreal det = det3(m); if (det == 0) return 0; // Inverse[r][c] = Det(of m excluding r,c) / Det(m) minvout[0] = (fpreal3)( mat2det((mat2)(m[1].yz, m[2].yz)), mat2det((mat2)(m[1].xz, m[2].xz)), mat2det((mat2)(m[1].xy, m[2].xy)) ) / det; minvout[1] = (fpreal3)( mat2det((mat2)(m[0].yz, m[2].yz)), mat2det((mat2)(m[0].xz, m[2].xz)), mat2det((mat2)(m[0].xy, m[2].xy)) ) / det; minvout[2] = (fpreal3)( mat2det((mat2)(m[0].yz, m[1].yz)), mat2det((mat2)(m[0].xz, m[1].xz)), mat2det((mat2)(m[0].xy, m[1].xy)) ) / det; return det; } static void mat3scale(mat3 mout, const mat3 m, fpreal scale) { mout[0] = m[0] * scale; mout[1] = m[1] * scale; mout[2] = m[2] * scale; } static void mat3lincomb2(mat3 mout, const mat3 m1, fpreal scale1, const mat3 m2, fpreal scale2) { mout[0] = m1[0] * scale1 + m2[0] * scale2; mout[1] = m1[1] * scale1 + m2[1] * scale2; mout[2] = m1[2] * scale1 + m2[2] * scale2; } // Rotates the incoming positions with the given angle in degrees. // It's more efficient to make a rotation matrix if you're going to rotate multiple matrices by the same angle static fpreal2 rotate2D(fpreal2 pos, fpreal angle) { angle = -angle * M_PI_F/180.0f; fpreal ca; fpreal sa = sincos(angle, &ca); mat2 rot = (mat2)(ca, sa, -sa, ca); return mat2vecmul(rot, pos); } #ifndef NO_DOUBLE_SUPPORT // Double versions of subset of the above functions // (mainly for shapematching ATM). typedef double3 mat3d[3]; static void mat3fromcolsd(const double3 c0, const double3 c1, const double3 c2, mat3d m) { m[0] = (double3)(c0.s0, c1.s0, c2.s0); m[1] = (double3)(c0.s1, c1.s1, c2.s1); m[2] = (double3)(c0.s2, c1.s2, c2.s2); } static void transpose3d(const mat3d a, mat3d b) { mat3fromcolsd(a[0], a[1], a[2], b); } #endif #endif #ifndef __IMX_H__ #define __IMX_H__ /****************************************************************************** * VERBOSITY OPTIONS ******************************************************************************/ // By defining certain symbols before including this header, different error // reporting options can be enabled. These options are listed in the table // below. // SYMBOL || EFFECT // CHECK_RANGE || Report out-of-range indexing of buffers // CHECK_STORAGE_TYPE_READ || Reports attempts to read floating point // || values from integer layers or integer values // || from floating point layers. // CHECK_STORAGE_TYPE_WRITE || Reports attempts to write floating point // || values to integer layers or integer values // || to floating point layers. // CHECK_STORAGE_TYPE_CON || Report if IMX_Layer storage type is not equal // || to the (compile-time constant) storage argument // CHECK_CHANNEL_COUNT_CON || Report if IMX_Layer channels is not equal // || to the (compile-time constant) channels argument // Note that the checks are done only when the respective symbol is defined, so // these should only be used for validation and debugging purposes. /****************************************************************************** * STRUCTURES ******************************************************************************/ // Scale-translate transform. typedef float4 STXform; // Border type for a layer. typedef enum { IMX_CONSTANT, IMX_CLAMP, IMX_MIRROR, IMX_WRAP } BorderType; typedef enum { IMX_TYPEINFO_NONE, IMX_TYPEINFO_COLOR, IMX_TYPEINFO_POSITION, IMX_TYPEINFO_VECTOR, IMX_TYPEINFO_NORMAL, IMX_TYPEINFO_OFFSETNORMAL, IMX_TYPEINFO_TEXTURE_COORD, IMX_TYPEINFO_ID, IMX_TYPEINFO_MASK, IMX_TYPEINFO_SDF, IMX_TYPEINFO_HEIGHT } TypeInfoType; // Type of data stored in a layer. typedef enum { INT8, INT16, INT32, FLOAT16, FLOAT32, // dummy values used to indicate IMX_Buffer::isConstant(): CONSTANT_INT8, CONSTANT_INT16, CONSTANT_INT32, CONSTANT_FLOAT16, CONSTANT_FLOAT32 } StorageType; // A structure containing metadata for a layer. typedef struct { float16 image_to_world; float16 world_to_image; STXform buffer_to_image; STXform image_to_buffer; STXform buffer_to_pixel; float4 default_f; int4 default_i; int2 resolution; int channels; int stride_x, stride_y; BorderType border; // Typeinfo is a hint and should only affect computation in the rarest // of situations. TypeInfoType typeinfo; StorageType storage; } IMX_Stat; // A structure encapsulating a layer. typedef struct { global void* restrict data; global IMX_Stat* restrict stat; } IMX_Layer; /// multiply v by scale+translate xform static float2 applySTXform(STXform, float2 v); static float2 applySTXformInverse(STXform, float2 v); /// Space transfomrations; static float2 bufferToImage(global const IMX_Stat* restrict, float2 xy); static float2 imageToBuffer(global const IMX_Stat* restrict, float2 xy); static float2 bufferToPixel(global const IMX_Stat* restrict, float2 xy); static float2 pixelToBuffer(global const IMX_Stat* restrict, float2 xy); static float2 bufferToTexture(global const IMX_Stat* restrict, float2 xy); static float2 textureToBuffer(global const IMX_Stat* restrict, float2 xy); static float3 imageToWorld(global const IMX_Stat* restridct, float2 xy); static float3 image3ToWorld(global const IMX_Stat* restridct, float3 xy); static float2 worldToImage(global const IMX_Stat* restridct, float3 xyz); static float3 worldToImage3(global const IMX_Stat* restridct, float3 xyz); // The remaining functions are for implementing @ substitutions: // // int @ix, @iy, @ixy // output buffer coordinate // int @xres // output buffer width // int @yres // output buffer height // int2 @res // output buffer (width,height) // int2 @tilesize // tile dimensions passed to CE_Snippet::execute() // // Cur location: .image .pixel .texture suffixes specify space, image default // @P supports .world as well. // float2 @P // image coordinate of output pixel // float2 @dPdx // derivative of @P per @ix // float2 @dPdy // derivative of @P per @iy // float2 @dPdxy // (@dPdx.x,@dPdy.y) rectangle for area // // sampling // // 'name' is replaced with the name of a layer binding: // void* @name.data // raw buffer data // IMX_Stat* @name.stat // int @name.xres // @name's buffer width // int @name.yres // @name's buffer height // float2 @name.res // @name's (width,height) // BorderType @name.border // border type, compile-time constant // StorageType @name.storage // data type, compile-time constant // int @name.channels // # of channels, compile-time constant // int @name.tuplesize // # of channels, compile-time constant // // Space transforms: // float2 @name.imageToBuffer(float2) // float2 @name.bufferToImage(float2) // float2 @name.pixelToBuffer(float2) // float2 @name.bufferToPixel(float2) // float2 @name.textureToBuffer(float2) // float2 @name.bufferToTexture(float2) // float3 @name.imageToWorld(float2) // float3 @name.image3ToWorld(float3) // float2 @name.worldToImage(float3) // float3 @name.worldToImage3(float3) // // bool @name.bound // same as #ifdef HAS_name // // T @name.bufferIndex(int2) // value of buffer pixel, does tiling/borders // T @name.bufferSample(float2) // bilinear interpolated (nearest for int) // T @name.imageNearest(float2) // bufferIndex(rint(imageToBuffer(xy)) // T @name.imageSample(float2) // bufferSample(imageToBuffer(xy)) // T @name.textureNearest(float2) // bufferIndex(rint(textureToBuffer(xy)) // T @name.textureSample(float2) // bufferSample(textureToBuffer(xy)) // T @name // @name.imageSample(@P) // void @name.set(T v) // same as @name.setIndex((int2)(@ix,@iy), v) // void @name.setIndex(int2, T v) // store value of buffer pixel, no test for out of range! // // Where T is not int: // T @name.dCdx(float2) // derivative of @name.imageSample() per @ix // T @name.dCdx // @name.dCdx(@P) // T @name.dCdy(float2) // derivative of @name.imageSample() per @iy // T @name.dCdy // @name.dCdy(@P) // #include \"imx_internal.h\" #endif #ifndef __IMX_INTERNAL_H__ #define __IMX_INTERNAL_H__ // #include typedef float float1; typedef int int1; /// Converts image coordinates to linear index. static int _linearIndex(global const IMX_Stat* restrict stat, int2 xy) { #ifdef CHECK_RANGE if (xy.x < 0 || xy.x >= stat->resolution.x || xy.y < 0 || xy.y >= stat->resolution.y) printf(\"Error: converting an invalid 2D index at %v2d to linear;\" \"resolution was %v2d.\\n\", xy, stat->resolution); #endif return xy.x * stat->stride_x + xy.y * stat->stride_y; } /// Splits the given coordinates into integer and fractional parts. static void _splitCoordinates(float2 xy, int2* ix_p, float2* fx_p) { float2 f; *fx_p = fract(xy, &f); *ix_p = convert_int2_sat(f); } /// Wraps the given coordinates for the specified resolution. static int2 _wrapCoordinates(int2 xy, int2 res) { int2 p = xy % res; return select(p, p + res, p < 0); } static int2 _mirrorCoordinates(int2 xy, int2 res) { int2 res2 = res * 2; int2 p = _wrapCoordinates(xy, res2); return select(p, res2 - p - 1, p >= res); } /// Mirrors the given coordinates for the specified resolution. mirrored0 and /// mirrored1 will have the mirrored versions of x and x+1, respectively. static void _mirrorCoordinates2(int2 xy, int2 res, int2* mirrored0, int2* mirrored1) { int2 res2 = res * 2; int2 p = _wrapCoordinates(xy, res2); *mirrored0 = select(p, res2 - p - 1, p >= res); p = _wrapCoordinates(xy + 1, res2); *mirrored1 = select(p, res2 - p - 1, p >= res); } static bool _outside(int2 xy, int2 res) { return any(xy < 0) || any(xy >= res); } #ifdef CHECK_STORAGE_TYPE_CON __constant char * _getStorageName(StorageType storage) { switch (storage) { case INT8: return \"INT8\"; case INT16: return \"INT16\"; case INT32: return \"INT32\"; case FLOAT16: return \"FLOAT16\"; case FLOAT32: return \"FLOAT32\"; } } #define _CHECK_STORAGE(what) \\ if (storage != layer->stat->storage) \\ printf(\"Error: %s(%s), layer is %s\\n\", what, \\ _getStorageName(storage), _getStorageName(layer->stat->storage)); #else #define _CHECK_STORAGE(what) #endif #ifdef CHECK_CHANNEL_COUNT_CON #define _CHECK_CHANNEL(what) \\ if (channels != layer->stat->channels) \\ printf(\"Error: %s(channels=%d), layer is %d channels\\n\", \\ what, channels, layer->stat->channels); #else #define _CHECK_CHANNEL(what) #endif #ifdef CHECK_RANGE #define _CHECK_RANGE(what) \\ if (index < 0 || index >= stat->resolution.y * stat->stride_y) \\ printf(\"Error: %s index %d out of range\\n\", what, index); #else #define _CHECK_RANGE(what) #endif #define CHECK_STAT(what) _CHECK_STORAGE(what) _CHECK_CHANNEL(what) _CHECK_RANGE(what) #ifdef CHECK_STORAGE_TYPE_WRITE #define WRITE_ERROR_I() printf(\"Error: writing integer values to a floating point layer.\\n\"); return #define WRITE_ERROR_F() printf(\"Error: writing floating point values to an integer layer.\\n\"); return #else #define WRITE_ERROR_I() return #define WRITE_ERROR_F() return #endif #ifdef CHECK_STORAGE_TYPE_READ #define READ_ERROR_I() printf(\"Error: reading integer values from a floating point layer.\\n\"); return layer->stat->default_i #define READ_ERROR_F() printf(\"Error: reading floating point values from an integer layer.\\n\"); return layer->stat->default_f #else #define READ_ERROR_I() return layer->stat->default_i #define READ_ERROR_F() return layer->stat->default_f #endif static void _setIndexLinI1a(IMX_Layer* layer, int index, int v, StorageType storage) { switch (storage) { case INT8: ((global char*) layer->data)[index] = (char) v; return; case INT16: ((global short*) layer->data)[index] = (short) v; return; case INT32: ((global int*) layer->data)[index] = v; return; case FLOAT16: vstore_half_rte((float)v, index, (global half*)layer->data); break; case FLOAT32: ((global float*)layer->data)[index] = v; break; default: WRITE_ERROR_I(); } } static void _setIndexLinF1a(IMX_Layer* layer, int index, float v, StorageType storage) { switch (storage) { case FLOAT16: vstore_half_rte(v, index, (global half*) layer->data); break; case FLOAT32: ((global float*) layer->data)[index] = v; break; default: _setIndexLinI1a(layer, index, convert_int_sat_rtn(v+0.5f), storage); } } static void _setIndexLinF2a(IMX_Layer* layer, int index, float2 v, StorageType storage) { switch (storage) { case FLOAT16: vstore_half2_rte(v, index, (global half*) layer->data); break; case FLOAT32: vstore2(v, index, (global float*) layer->data); break; default: WRITE_ERROR_F(); } } static void _setIndexLinF3a(IMX_Layer* layer, int index, float3 v, StorageType storage) { switch (storage) { case FLOAT16: vstore_half3_rte(v.xyz, index, (global half*) layer->data); break; case FLOAT32: vstore3(v.xyz, index, (global float*) layer->data); break; default: WRITE_ERROR_F(); } } static void _setIndexLinF4(IMX_Layer* layer, int index, float4 v, StorageType storage, int channels) { CHECK_STAT(\"setIndexF4\"); switch (channels) { case 1: _setIndexLinF1a(layer, index, v.x, storage); break; case 2: _setIndexLinF2a(layer, index, v.xy, storage); break; case 3: _setIndexLinF3a(layer, index, v.xyz, storage); break; default: switch (storage) { case FLOAT16: vstore_half4_rte(v, index, (global half*) layer->data); break; case FLOAT32: vstore4(v, index, (global float*) layer->data); break; default: WRITE_ERROR_F(); } break; } } static void _setIndexLinI1(IMX_Layer* layer, int index, int v, StorageType storage, int channels) { CHECK_STAT(\"setIndexI1\"); if (channels == 1) _setIndexLinI1a(layer, index, v, storage); else _setIndexLinF4(layer, index, v, storage, channels); } static void _setIndexLinF1(IMX_Layer* layer, int index, float v, StorageType storage, int channels) { CHECK_STAT(\"setIndexF1\"); if (channels == 1) _setIndexLinF1a(layer, index, v, storage); else _setIndexLinF4(layer, index, v, storage, channels); } static void _setIndexLinF2(IMX_Layer* layer, int index, float2 v, StorageType storage, int channels) { CHECK_STAT(\"setIndexF2\"); if (channels == 2) _setIndexLinF2a(layer, index, v, storage); else _setIndexLinF4(layer, index, (float4)(v,0.0f,1.0f), storage, channels); } static void _setIndexLinF3(IMX_Layer* layer, int index, float3 v, StorageType storage, int channels) { CHECK_STAT(\"setIndexF3\"); if (channels == 3) _setIndexLinF3a(layer, index, v, storage); else _setIndexLinF4(layer, index, (float4)(v,1.0f), storage, channels); } //////////////////////////////////////////////////////////////////////////////// static int _bufferIndexLinI1(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexI1\"); switch (storage) { case INT8: return ((global char*) layer->data)[index * channels]; case INT16: return ((global short*) layer->data)[index * channels]; case INT32: return ((global int*) layer->data)[index * channels]; case CONSTANT_INT8: return *((global char*) layer->data); case CONSTANT_INT16: return *((global short*) layer->data); case CONSTANT_INT32: return *((global int*) layer->data); default: READ_ERROR_I().x; } } static float _bufferIndexLinF1(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexF1\"); switch (storage) { case FLOAT16: return vload_half(index*channels, (global half*) layer->data); case FLOAT32: return ((global float*) layer->data)[index*channels]; case CONSTANT_FLOAT16: return vload_half(0, (global half*) layer->data); case CONSTANT_FLOAT32: return ((global float*) layer->data)[0]; default: return _bufferIndexLinI1(layer, index, storage, channels); }; } static float2 _bufferIndexLinF2(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexF2\"); switch (channels) { case 1: return _bufferIndexLinF1(layer, index, storage, channels); default: switch (storage) { case FLOAT16: return vload_half2(0, (global half*) layer->data + index * channels); case FLOAT32: return vload2(0, (global float*) layer->data + index * channels); case CONSTANT_FLOAT16: return vload_half2(0, (global half*) layer->data); case CONSTANT_FLOAT32: return vload2(0, (global float*) layer->data); default: READ_ERROR_F().xy; } } } static float3 _bufferIndexLinF3(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexF3\"); switch (channels) { case 1: return _bufferIndexLinF1(layer, index, storage, channels); case 2: return (float3)(_bufferIndexLinF2(layer, index, storage, channels), 0.0f); default: switch (storage) { case FLOAT16: return vload_half3(0, (global half*) layer->data + index * channels); case FLOAT32: return vload3(0, (global float*) layer->data + index * channels); case CONSTANT_FLOAT16: return vload_half3(0, (global half*) layer->data); case CONSTANT_FLOAT32: return vload3(0, (global float*) layer->data); default: READ_ERROR_F().xyz; } } } static float4 _bufferIndexLinF4(const IMX_Layer* layer, int index, StorageType storage, int channels) { CHECK_STAT(\"bufferIndexF4\"); switch (channels) { case 1: return _bufferIndexLinF1(layer, index, storage, channels); case 2: return (float4)(_bufferIndexLinF2(layer, index, storage, channels), 0.0f, 1.0f); case 3: return (float4)(_bufferIndexLinF3(layer, index, storage, channels), 1.0f); default: switch (storage) { case FLOAT16: return vload_half4(index, (global half*) layer->data); case FLOAT32: return vload4(index, (global float*) layer->data); case CONSTANT_FLOAT16: return vload_half4(0, (global half*) layer->data); case CONSTANT_FLOAT32: return vload4(0, (global float*) layer->data); default: READ_ERROR_F(); } } } //////////////////////////////////////////////////////////////////////////////// #define _IMPLEMENT_I(DIM) \\ \\ static int ## DIM \\ bufferIndexI ## DIM (const IMX_Layer* layer, int2 xy, \\ BorderType border, StorageType storage, \\ int channels) \\ { \\ int2 res = layer->stat->resolution; \\ if (xy.x < 0 || xy.x >= res.x || xy.y < 0 || xy.y >= res.y) \\ { \\ switch (border) \\ { \\ case (IMX_CONSTANT): \\ return 0.0f; \\ case (IMX_CLAMP): \\ xy = clamp(xy, (int2)(0), res - 1); \\ break; \\ case (IMX_MIRROR): \\ xy = _mirrorCoordinates(xy, res); \\ break; \\ case (IMX_WRAP): default: \\ xy = _wrapCoordinates(xy, res); \\ break; \\ } \\ } \\ return _bufferIndexLinI ## DIM ( \\ layer, _linearIndex(layer->stat, xy), storage, channels); \\ } \\ \\ static int ## DIM \\ bufferSampleI ## DIM (const IMX_Layer* layer, float2 xy, \\ BorderType border, StorageType storage, \\ int channels) \\ { \\ int2 c = convert_int2_sat_rtn(xy+0.5f); \\ return bufferIndexI ## DIM (layer, c, border, storage, channels);\\ } \\ \\ static void \\ _setIndexI ## DIM(IMX_Layer *layer, int2 xy, int ## DIM val, StorageType storage, int channels) \\ { \\ int2 res = layer->stat->resolution; \\ if (xy.x < 0 || xy.x >= res.x || xy.y < 0 || xy.y >= res.y) \\ return; \\ _setIndexLinI ## DIM(layer, _linearIndex(layer->stat, xy), val, storage, channels); \\ } \\ /**/ _IMPLEMENT_I(1) #undef _IMPLEMENT_I #define _IMPLEMENT_F(DIM) \\ \\ static float ## DIM \\ _bufferSampleF ## DIM ## _CN(const IMX_Layer* layer, float2 xy, \\ StorageType storage, int channels) \\ { \\ int2 ix; \\ float2 fx; \\ _splitCoordinates(xy, &ix, &fx); \\ global const IMX_Stat* restrict stat = layer->stat; \\ int2 res = stat->resolution; \\ float ## DIM k = 0.0f; \\ float ## DIM v00 = _outside(ix, res) ? k : _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix), storage, channels); \\ ix.x++; \\ float ## DIM v10 = _outside(ix, res) ? k : _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix), storage, channels); \\ ix.y++; \\ float ## DIM v11 = _outside(ix, res) ? k : _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix), storage, channels); \\ ix.x--; \\ float ## DIM v01 = _outside(ix, res) ? k : _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix), storage, channels); \\ return mix(mix(v00, v10, fx.x), mix(v01, v11, fx.x), fx.y); \\ } \\ \\ static float ## DIM \\ _bufferSampleF ## DIM ## _CL(const IMX_Layer* layer, float2 xy, \\ StorageType storage, int channels) \\ { \\ int2 ix; \\ float2 fx; \\ _splitCoordinates(xy, &ix, &fx); \\ global const IMX_Stat* restrict stat = layer->stat; \\ int2 res1 = stat->resolution - 1; \\ int2 ix0 = clamp(ix, (int2)(0), res1); \\ int2 ix1 = clamp(ix+1, (int2)(0), res1); \\ float ## DIM v00 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix0), storage, channels); \\ float ## DIM v10 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix1.x, ix0.y)), storage, channels); \\ float ## DIM v01 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix0.x, ix1.y)), storage, channels); \\ float ## DIM v11 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix1), storage, channels); \\ return mix(mix(v00, v10, fx.x), mix(v01, v11, fx.x), fx.y); \\ } \\ \\ static float ## DIM \\ _bufferSampleF ## DIM ## _MR(const IMX_Layer* layer, float2 xy, \\ StorageType storage, int channels) \\ { \\ int2 ix; \\ float2 fx; \\ _splitCoordinates(xy, &ix, &fx); \\ global const IMX_Stat* restrict stat = layer->stat; \\ int2 ix0, ix1; \\ _mirrorCoordinates2(ix, stat->resolution, &ix0, &ix1); \\ float ## DIM v00 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix0), storage, channels); \\ float ## DIM v10 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix1.x, ix0.y)), storage, channels); \\ float ## DIM v01 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix0.x, ix1.y)), storage, channels); \\ float ## DIM v11 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix1), storage, channels); \\ return mix(mix(v00, v10, fx.x), mix(v01, v11, fx.x), fx.y); \\ } \\ \\ static float ## DIM \\ _bufferSampleF ## DIM ## _WR(const IMX_Layer* layer, float2 xy, \\ StorageType storage, int channels) \\ { \\ int2 ix; \\ float2 fx; \\ _splitCoordinates(xy, &ix, &fx); \\ global const IMX_Stat* restrict stat = layer->stat; \\ int2 ix0 = _wrapCoordinates(ix, stat->resolution); \\ int2 ix1 = _wrapCoordinates(ix + 1, stat->resolution); \\ float ## DIM v00 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix0), storage, channels); \\ float ## DIM v10 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix1.x, ix0.y)), storage, channels); \\ float ## DIM v01 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, (int2)(ix0.x, ix1.y)), storage, channels); \\ float ## DIM v11 = _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(stat, ix1), storage, channels); \\ return mix(mix(v00, v10, fx.x), mix(v01, v11, fx.x), fx.y); \\ } \\ \\ static float ## DIM \\ bufferSampleF ## DIM (const IMX_Layer* layer, float2 xy, \\ BorderType border, StorageType storage, \\ int channels) \\ { \\ switch (border) \\ { \\ case (IMX_CONSTANT): \\ return _bufferSampleF ## DIM ## _CN( \\ layer, xy, storage, channels); \\ case (IMX_CLAMP): \\ return _bufferSampleF ## DIM ## _CL( \\ layer, xy, storage, channels); \\ case (IMX_MIRROR): \\ return _bufferSampleF ## DIM ## _MR( \\ layer, xy, storage, channels); \\ case (IMX_WRAP): default: \\ return _bufferSampleF ## DIM ## _WR( \\ layer, xy, storage, channels); \\ } \\ } \\ \\ static float ## DIM \\ bufferIndexF ## DIM (const IMX_Layer* layer, int2 xy, \\ BorderType border, StorageType storage, \\ int channels) \\ { \\ int2 res = layer->stat->resolution; \\ if (xy.x < 0 || xy.x >= res.x || xy.y < 0 || xy.y >= res.y) \\ { \\ switch (border) \\ { \\ case (IMX_CONSTANT): \\ return 0.0f; \\ case (IMX_CLAMP): \\ xy = clamp(xy, (int2)(0), res - 1); \\ break; \\ case (IMX_MIRROR): \\ xy = _mirrorCoordinates(xy, res); \\ break; \\ case (IMX_WRAP): default: \\ xy = _wrapCoordinates(xy, res); \\ break; \\ } \\ } \\ return _bufferIndexLinF ## DIM ( \\ layer, _linearIndex(layer->stat, xy), storage, channels); \\ } \\ \\ static void \\ _setIndexF ## DIM(IMX_Layer *layer, int2 xy, float ## DIM val, StorageType storage, int channels) \\ { \\ int2 res = layer->stat->resolution; \\ if (xy.x < 0 || xy.x >= res.x || xy.y < 0 || xy.y >= res.y) \\ return; \\ _setIndexLinF ## DIM(layer, _linearIndex(layer->stat, xy), val, storage, channels); \\ } \\ /**/ _IMPLEMENT_F(1) _IMPLEMENT_F(2) _IMPLEMENT_F(3) _IMPLEMENT_F(4) #undef _IMPLEMENT_F static float2 applySTXform(STXform xform, float2 v) { return v * xform.lo + xform.hi; } static float2 applySTXformInverse(STXform xform, float2 v) { return (v - xform.hi) / xform.lo; } static float2 bufferToImage(global const IMX_Stat* restrict stat, float2 v) { return applySTXform(stat->buffer_to_image, v); } static float2 imageToBuffer(global const IMX_Stat* restrict stat, float2 v) { return applySTXform(stat->image_to_buffer, v); } static float2 bufferToPixel(global const IMX_Stat* restrict stat, float2 v) { return applySTXform(stat->buffer_to_pixel, v); } static float2 pixelToBuffer(global const IMX_Stat* restrict stat, float2 v) { return applySTXformInverse(stat->buffer_to_pixel, v); } static float2 bufferToTexture(global const IMX_Stat* restrict stat, float2 v) { return (v + 0.5f) / (float2)(stat->resolution.x, stat->resolution.y); } static float2 textureToBuffer(global const IMX_Stat* restrict stat, float2 v) { return v * ((float2)(stat->resolution.x, stat->resolution.y)) - 0.5f; } static float3 imageToWorld(global const IMX_Stat* restrict stat, float2 xy) { float4 xyzw = 0; xyzw.xy = xy; xyzw.w = 1; xyzw = mat4vecmul(stat->image_to_world, xyzw); xyzw.xyz /= xyzw.w; return xyzw.xyz; } static float3 image3ToWorld(global const IMX_Stat* restrict stat, float3 xyz) { float4 xyzw = 0; xyzw.xyz = xyz; xyzw.w = 1; xyzw = mat4vecmul(stat->image_to_world, xyzw); xyzw.xyz /= xyzw.w; return xyzw.xyz; } static float2 worldToImage(global const IMX_Stat* restrict stat, float3 xyz) { float4 xyzw = 0; xyzw.xyz = xyz; xyzw.w = 1; xyzw = mat4vecmul(stat->world_to_image, xyzw); xyzw.xy /= xyzw.w; return xyzw.xy; } static float3 worldToImage3(global const IMX_Stat* restrict stat, float3 xyz) { float4 xyzw = 0; xyzw.xyz = xyz; xyzw.w = 1; xyzw = mat4vecmul(stat->world_to_image, xyzw); xyzw.xyz /= xyzw.w; return xyzw.xyz; } static float4 dCdxF4(const IMX_Layer* layer, float2 ixy, BorderType border, StorageType storage, int channels, const IMX_Layer* dst) { float2 xy = imageToBuffer(layer->stat, ixy); float d = (dst->stat->buffer_to_image.x * layer->stat->image_to_buffer.x) / 2; float4 a = bufferSampleF4(layer, (float2)(xy.x + d, xy.y), border, storage, channels); float4 b = bufferSampleF4(layer, (float2)(xy.x - d, xy.y), border, storage, channels); return a - b; } static float4 dCdxF4aligned(const IMX_Layer* layer, int2 xy, BorderType border, StorageType storage, int channels) { float4 a = bufferIndexF4(layer, (int2)(xy.x+1, xy.y), border, storage, channels); float4 b = bufferIndexF4(layer, (int2)(xy.x-1, xy.y), border, storage, channels); return (a-b) * 0.5f; } static float4 dCdyF4(const IMX_Layer* layer, float2 ixy, BorderType border, StorageType storage, int channels, const IMX_Layer* dst) { float2 xy = imageToBuffer(layer->stat, ixy); float d = (dst->stat->buffer_to_image.y * layer->stat->image_to_buffer.y) / 2; float4 a = bufferSampleF4(layer, (float2)(xy.x, xy.y + d), border, storage, channels); float4 b = bufferSampleF4(layer, (float2)(xy.x, xy.y - d), border, storage, channels); return a - b; } static float4 dCdyF4aligned(const IMX_Layer* layer, int2 xy, BorderType border, StorageType storage, int channels) { float4 a = bufferIndexF4(layer, (int2)(xy.x, xy.y+1), border, storage, channels); float4 b = bufferIndexF4(layer, (int2)(xy.x, xy.y-1), border, storage, channels); return (a-b) * 0.5f; } #endif #ifndef __IMX_FILTER_H__ #define __IMX_FILTER_H__ // Only a single filter can be used in a snippet. To choose filter: // // Either define one of the following: // FILTER_POINT // FILTER_BILINEAR // FILTER_BOX (floating-point width box, sometimes called a 'tent') // FILTER_TRIANGLE // FILTER_CUBIC (bicubic interpolation if scale==1) // FILTER_MITCHELL (non-interpolating cubic) // FILTER_BSPLINE (smooth non-interpolating cubic) // Or define these symbols, this example is equivalent to FILTER_TRIANGLE: // #define FILTER_SIZE 2 // static __constant float samples[FILTER_SIZE] = { 1, 0 }; // #define FILTER samples // #define FILTER_SUPPORT 1 // // The following @-substitutions can then be used to sample areas, for float1-4 bindings // F @name.bufferSampleRect(float2 center, float2 size) -> area in buffer coordinates // F @name.bufferSampleRectClip(float2 center, float2 size) -> area in buffer coordinates // F @name.imageSampleRect(float2 center, float2 size) -> area in image coordinates // F @name.imageSampleRectClip(float2 center, float2 size) -> area in image coordinates // #include \"imx_filter_internal.h\" #endif #if (!defined(FILTER) || !defined(FILTER_SIZE) || !defined(FILTER_SUPPORT)) && \\ !defined(FILTER_POINT) && !defined(FILTER_BILINEAR) && \\ !defined(FILTER_BOX) && !defined(FILTER_TRIANGLE) && \\ !defined(FILTER_CUBIC) && !defined(FILTER_MITCHELL) && \\ !defined(FILTER_BSPLINE) #define FILTER_POINT #endif #if defined(FILTER) && defined(FILTER_SIZE) && defined(FILTER_SUPPORT) // this is so snippet can define it's own filter before including this #elif defined(FILTER_POINT) static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { // Make .5 round toward -infinity so a translate by .5 does not throw away every other pixel return bufferIndexF4(layer, convert_int2_sat_rtn(xy + 0.5f), border, storage, channels); } #elif defined(FILTER_BILINEAR) static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { return bufferSampleF4(layer, xy, border, storage, channels); } #elif defined(FILTER_BOX) static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { xy = clamp(xy, -1e8f, 1e8f); dxy = clamp(dxy, 1.0f, 67.0f); float2 r = (dxy + 1.0f) / 2; int2 ia; float2 fa; _splitCoordinates(r - xy, &ia, &fa); ia = -ia; int2 ib; float2 fb; _splitCoordinates(xy + r, &ib, &fb); float4 sum = 0; int2 ixy; float w = fa.y; for (ixy.y = ia.y; ixy.y <= ib.y;) { ixy.x = ia.x; float4 sum1 = fa.x * bufferIndexF4(layer, ixy, border, storage, channels); for (ixy.x++; ixy.x < ib.x; ixy.x++) sum1 += bufferIndexF4(layer, ixy, border, storage, channels); sum1 += fb.x * bufferIndexF4(layer, ixy, border, storage, channels); sum += w * sum1; w = (++ixy.y) < ib.y ? 1.0f : fb.y; } return sum / (dxy.x * dxy.y); } #elif defined(FILTER_TRIANGLE) static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { float2 r = clamp(dxy, 1.0f, 1.0e8f); int2 ia = convert_int2_sat_rtp(xy - r); int2 ib = convert_int2_sat_rtp(xy + r); float4 sum = 0; float div = 0; int2 ixy; int2 inc = (ib - ia) / 61 + 1; for (ixy.y = ia.y; ixy.y < ib.y; ixy.y += inc.y) { float4 sum1 = 0; float div1 = 0; for (ixy.x = ia.x; ixy.x < ib.x; ixy.x += inc.x) { float w = 1 - fabs(ixy.x - xy.x) / r.x; sum1 += w * bufferIndexF4(layer, ixy, border, storage, channels); div1 += w; } float w = 1 - fabs(ixy.y - xy.y) / r.y; sum += w * sum1; div += w * div1; } return sum / div; } #elif defined(FILTER_CUBIC) #define FILTER_SIZE 25 static __constant float Cubic[FILTER_SIZE] = { // mitchell(25, 0, 0.5) 6, 5.9010415, 5.625, 5.203125, 4.6666665, 4.046875, 3.375, 2.6822917, 2, 1.359375, 0.7916667, 0.328125, 0, -0.21006945, -0.3472222, -0.421875, -0.44444445, -0.4253472, -0.375, -0.30381945, -0.22222222, -0.140625, -0.06944445, -0.019097222, 0}; #define FILTER Cubic #define FILTER_SUPPORT 2 #elif defined(FILTER_MITCHELL) #define FILTER_SIZE 25 static __constant float Mitchell[FILTER_SIZE] = { // mitchell(25, 1/3.0, 1/3.0) 5.3333335, 5.2540507, 5.0324073, 4.6927085, 4.259259, 3.7563658, 3.2083333, 2.6394675, 2.074074, 1.5364584, 1.050926, 0.6417824, 0.33333334, 0.116705246, -0.038580246, -0.140625, -0.19753087, -0.21739969, -0.20833333, -0.17843364, -0.13580246, -0.088541664, -0.044753086, -0.01253858, 0}; //-1.7763568e-15}; #define FILTER Mitchell #define FILTER_SUPPORT 2 #elif defined(FILTER_BSPLINE) #define FILTER_SIZE 25 static __constant float BSpline[FILTER_SIZE] = { // mitchell(25, 1, 0) 4, 3.9600694, 3.8472223, 3.671875, 3.4444444, 3.1753473, 2.875, 2.5538194, 2.2222223, 1.890625, 1.5694444, 1.2690972, 1, 0.7702546, 0.5787037, 0.421875, 0.2962963, 0.19849537, 0.125, 0.07233796, 0.037037037, 0.015625, 0.0046296297, 0.0005787037, 0}; #define FILTER BSpline #define FILTER_SUPPORT 2 #endif #if defined(FILTER) static float sampleLookup(constant float * in, float pos) { float flr; float t = fract(pos, &flr); int flooridx = convert_int(flr); int ceilidx = flooridx+1; ceilidx = min(ceilidx, FILTER_SIZE-1); return mix(in[flooridx], in[ceilidx], t); } static float4 bufferSampleRectF4(const IMX_Layer* layer, float2 xy, float2 dxy, BorderType border, StorageType storage, int channels) { float2 r = min(max(dxy, 1.0f) * FILTER_SUPPORT, 1.0e8f); int2 ia = convert_int2_sat_rtp(xy - r); int2 ib = convert_int2_sat_rtp(xy + r); float2 k = (FILTER_SIZE - 1) / r; float4 sum = 0; float div = 0; int2 ixy; int2 inc = (ib - ia) / 61 + 1; for (ixy.y = ia.y; ixy.y < ib.y; ixy.y += inc.y) { float4 sum1 = 0; float div1 = 0; for (ixy.x = ia.x; ixy.x < ib.x; ixy.x += inc.x) { float w = sampleLookup(FILTER, fabs(ixy.x - xy.x) * k.x); sum1 += w * bufferIndexF4(layer, ixy, border, storage, channels); div1 += w; } float w = sampleLookup(FILTER, fabs(ixy.y - xy.y) * k.y); sum += w * sum1; div += w * div1; } return sum / div; } #endif // Intersects the incoming sampling window with the layer's footprint and // returns the filtered value in that rectangle. (Thus, this should never read // outside pixels.) static float4 bufferSampleRectClipF4(const IMX_Layer* layer, float2 xy, float2 dxy, StorageType storage, int channels) { #if defined(FILTER_POINT) return bufferSampleRectF4(layer, xy, dxy, IMX_CONSTANT, storage, channels); #else float2 wh = convert_float2(layer->stat->resolution); dxy *= 0.5f; float2 xy0 = max(xy - dxy, -0.5f); float2 xy1 = min(xy + dxy, wh - 0.5f); if (any(xy0 >= xy1)) return 0.0f; return bufferSampleRectF4(layer, (xy1 + xy0) * 0.5f, xy1 - xy0, IMX_CLAMP, storage, channels); #endif } static float4 constImageSampleRectClip(float2 xy, float2 dxy, float4 defval) { // Clip to image space; if there is any intersection, return defval; // otherwise, return 0 since we're fully outside the image. float2 xy0 = max(xy - dxy, -1.0f); float2 xy1 = min(xy + dxy, 1.0f); return any(xy0 >= xy1) ? 0.0f : defval; } // convert derivatives (or a parallelogram) to nearest ortho rectangle static float2 wh_from_dP(float2 dPdx, float2 dPdy) { return hypot(dPdx, dPdy); } /* Python to generate the filters def mitchell(n, B, C): print(\"[%d] = {\"%n, end=''); for i in range(0,n): if i: print(\",\", end='') if not(i%8): print(\"\\n \", end='') x = (2.0*i)/(n-1) if (x < 1): v = ((12-9*B-6*C)*x-18+12*B+6*C)*x*x+6-2*B; else: v = (((-B-6*C)*x+6*B+30*C)*x-12*B-48*C)*x+8*B+24*C; print(\" %.6g\"%v, end='') print(\"};\") mitchell(25, 1/3.0, 1/3.0) */ #define AT_elemnum _bound_idx #define AT_ix _bound_gidx #define AT_iy _bound_gidy #define AT_ixy (int2)(_bound_gidx, _bound_gidy) #define AT_res (_RUNOVER_LAYER.stat->resolution) #define AT_xres (_RUNOVER_LAYER.stat->resolution.x) #define AT_yres (_RUNOVER_LAYER.stat->resolution.y) #define AT_P_image _bound_P_image #define AT_P_pixel _bound_P_pixel #define AT_P_texture _bound_P_texture #define AT_P_world (imageToWorld(_RUNOVER_LAYER.stat, _bound_P_image)) #define AT_P AT_P_image #define AT_dPdx_image ((float2)(_RUNOVER_LAYER.stat->buffer_to_image.x,0)) #define AT_dPdx_pixel ((float2)(_RUNOVER_LAYER.stat->buffer_to_pixel.x,0)) #define AT_dPdx_texture ((float2)(1.0f/(float)_RUNOVER_LAYER.stat->resolution.x,0)) #define AT_dPdx AT_dPdx_image #define AT_dPdy_image ((float2)(0, _RUNOVER_LAYER.stat->buffer_to_image.y)) #define AT_dPdy_pixel ((float2)(0, _RUNOVER_LAYER.stat->buffer_to_pixel.y)) #define AT_dPdy_texture ((float2)(0, 1.0f/(float)_RUNOVER_LAYER.stat->resolution.y)) #define AT_dPdy AT_dPdy_image #define AT_dPdxy_image (_RUNOVER_LAYER.stat->buffer_to_image.xy) #define AT_dPdxy_pixel (_RUNOVER_LAYER.stat->buffer_to_pixel.xy) #define AT_dPdxy_texture ((float2)(1.0f/(float)_RUNOVER_LAYER.stat->resolution.x,1.0f/(float)_RUNOVER_LAYER.stat->resolution.y)) #define AT_dPdxy AT_dPdxy_image #define AT_tilesize _bound_tilesize #define AT_count_data _bound_count #define AT_count_bound 1 #define AT_count_stat ((global IMX_Stat * restrict) _bound_count_stat_void) #define AT_count_layer &_bound_count_layer #define AT_count_border _bound_count_border #define AT_count_storage _bound_count_storage #define AT_count_channels _bound_count_channels #define AT_count_tuplesize _bound_count_channels #define AT_count_xres _bound_count_layer.stat->resolution.x #define AT_count_yres _bound_count_layer.stat->resolution.y #define AT_count_res convert_float2(_bound_count_layer.stat->resolution) #define CONSTANT1(s) CONSTANT_ ## s #define CONSTANT_(s) CONSTANT1(s) #ifdef CONSTANT_count #define count_args2 CONSTANT_(_bound_count_storage), _bound_count_channels #else #define count_args2 _bound_count_storage, _bound_count_channels #endif #define count_args3 _bound_count_border, count_args2 #define AT_count_bufferIndex(_xy_) bufferIndexI1(&_bound_count_layer, _xy_, count_args3) #define AT_count_bufferSample(_xy_) bufferSampleI1(&_bound_count_layer, _xy_, count_args3) #define AT_count_imageNearest(_xy_) bufferIndexI1(&_bound_count_layer, convert_int2_sat_rtn(imageToBuffer(AT_count_stat, _xy_) + 0.5f), count_args3) #define AT_count_imageSample(_xy_) bufferSampleI1(&_bound_count_layer, imageToBuffer(AT_count_stat, _xy_), count_args3) #define AT_count_textureNearest(_xy_) bufferIndexI1(&_bound_count_layer, convert_int2_sat_rtn(textureToBuffer(AT_count_stat, _xy_) + 0.5f), count_args3) #define AT_count_textureSample(_xy_) bufferSampleI1(&_bound_count_layer, textureToBuffer(AT_count_stat, _xy_), count_args3) #define AT_count_1(_xy_) bufferSampleI1(&_bound_count_layer, imageToBuffer(AT_count_stat, _xy_), count_args3) #ifdef ALIGNED_count #define AT_count _bufferIndexLinI1(&_bound_count_layer, _bound_idx, count_args2) #else #define AT_count bufferSampleI1(&_bound_count_layer, imageToBuffer(AT_count_stat, _bound_P_image), count_args3) #endif #define AT_count_bufferToImage(_xy_) (bufferToImage(AT_count_stat, _xy_)) #define AT_count_imageToBuffer(_xy_) (imageToBuffer(AT_count_stat, _xy_)) #define AT_count_bufferToPixel(_xy_) (bufferToPixel(AT_count_stat, _xy_)) #define AT_count_pixelToBuffer(_xy_) (pixelToBuffer(AT_count_stat, _xy_)) #define AT_count_bufferToTexture(_xy_) (bufferToTexture(AT_count_stat, _xy_)) #define AT_count_textureToBuffer(_xy_) (textureToBuffer(AT_count_stat, _xy_)) #define AT_count_imageToWorld(_xy_) (imageToWorld(AT_count_stat, _xy_)) #define AT_count_image3ToWorld(_xyz_) (image3ToWorld(AT_count_stat, _xyz_)) #define AT_count_worldToImage(_xyz_) (worldToImage(AT_count_stat, _xyz_)) #define AT_count_worldToImage3(_xyz_) (worldToImage3(AT_count_stat, _xyz_)) #define AT_in_total_count_data _bound_in_total_count #define AT_in_total_count_bound 1 #define AT_in_total_count_stat ((global IMX_Stat * restrict) _bound_in_total_count_stat_void) #define AT_in_total_count_layer &_bound_in_total_count_layer #define AT_in_total_count_border _bound_in_total_count_border #define AT_in_total_count_storage _bound_in_total_count_storage #define AT_in_total_count_channels _bound_in_total_count_channels #define AT_in_total_count_tuplesize _bound_in_total_count_channels #define AT_in_total_count_xres _bound_in_total_count_layer.stat->resolution.x #define AT_in_total_count_yres _bound_in_total_count_layer.stat->resolution.y #define AT_in_total_count_res convert_float2(_bound_in_total_count_layer.stat->resolution) #ifdef CONSTANT_in_total_count #define in_total_count_args2 CONSTANT_(_bound_in_total_count_storage), _bound_in_total_count_channels #else #define in_total_count_args2 _bound_in_total_count_storage, _bound_in_total_count_channels #endif #define in_total_count_args3 _bound_in_total_count_border, in_total_count_args2 #define AT_in_total_count_bufferIndex(_xy_) bufferIndexI1(&_bound_in_total_count_layer, _xy_, in_total_count_args3) #define AT_in_total_count_bufferSample(_xy_) bufferSampleI1(&_bound_in_total_count_layer, _xy_, in_total_count_args3) #define AT_in_total_count_imageNearest(_xy_) bufferIndexI1(&_bound_in_total_count_layer, convert_int2_sat_rtn(imageToBuffer(AT_in_total_count_stat, _xy_) + 0.5f), in_total_count_args3) #define AT_in_total_count_imageSample(_xy_) bufferSampleI1(&_bound_in_total_count_layer, imageToBuffer(AT_in_total_count_stat, _xy_), in_total_count_args3) #define AT_in_total_count_textureNearest(_xy_) bufferIndexI1(&_bound_in_total_count_layer, convert_int2_sat_rtn(textureToBuffer(AT_in_total_count_stat, _xy_) + 0.5f), in_total_count_args3) #define AT_in_total_count_textureSample(_xy_) bufferSampleI1(&_bound_in_total_count_layer, textureToBuffer(AT_in_total_count_stat, _xy_), in_total_count_args3) #define AT_in_total_count_1(_xy_) bufferSampleI1(&_bound_in_total_count_layer, imageToBuffer(AT_in_total_count_stat, _xy_), in_total_count_args3) #ifdef ALIGNED_in_total_count #define AT_in_total_count _bufferIndexLinI1(&_bound_in_total_count_layer, _bound_idx, in_total_count_args2) #else #define AT_in_total_count bufferSampleI1(&_bound_in_total_count_layer, imageToBuffer(AT_in_total_count_stat, _bound_P_image), in_total_count_args3) #endif #define AT_in_total_count_bufferToImage(_xy_) (bufferToImage(AT_in_total_count_stat, _xy_)) #define AT_in_total_count_imageToBuffer(_xy_) (imageToBuffer(AT_in_total_count_stat, _xy_)) #define AT_in_total_count_bufferToPixel(_xy_) (bufferToPixel(AT_in_total_count_stat, _xy_)) #define AT_in_total_count_pixelToBuffer(_xy_) (pixelToBuffer(AT_in_total_count_stat, _xy_)) #define AT_in_total_count_bufferToTexture(_xy_) (bufferToTexture(AT_in_total_count_stat, _xy_)) #define AT_in_total_count_textureToBuffer(_xy_) (textureToBuffer(AT_in_total_count_stat, _xy_)) #define AT_in_total_count_imageToWorld(_xy_) (imageToWorld(AT_in_total_count_stat, _xy_)) #define AT_in_total_count_image3ToWorld(_xyz_) (image3ToWorld(AT_in_total_count_stat, _xyz_)) #define AT_in_total_count_worldToImage(_xyz_) (worldToImage(AT_in_total_count_stat, _xyz_)) #define AT_in_total_count_worldToImage3(_xyz_) (worldToImage3(AT_in_total_count_stat, _xyz_)) #define AT_shift_data _bound_shift #define AT_shift_bound 1 #define AT_shift_stat ((global IMX_Stat * restrict) _bound_shift_stat_void) #define AT_shift_layer &_bound_shift_layer #define AT_shift_border _bound_shift_border #define AT_shift_storage _bound_shift_storage #define AT_shift_channels _bound_shift_channels #define AT_shift_tuplesize _bound_shift_channels #define AT_shift_xres _bound_shift_layer.stat->resolution.x #define AT_shift_yres _bound_shift_layer.stat->resolution.y #define AT_shift_res convert_float2(_bound_shift_layer.stat->resolution) #ifdef CONSTANT_shift #define shift_args2 CONSTANT_(_bound_shift_storage), _bound_shift_channels #else #define shift_args2 _bound_shift_storage, _bound_shift_channels #endif #define shift_args3 _bound_shift_border, shift_args2 #define AT_shift_bufferIndex(_xy_) bufferIndexI1(&_bound_shift_layer, _xy_, shift_args3) #define AT_shift_bufferSample(_xy_) bufferSampleI1(&_bound_shift_layer, _xy_, shift_args3) #define AT_shift_imageNearest(_xy_) bufferIndexI1(&_bound_shift_layer, convert_int2_sat_rtn(imageToBuffer(AT_shift_stat, _xy_) + 0.5f), shift_args3) #define AT_shift_imageSample(_xy_) bufferSampleI1(&_bound_shift_layer, imageToBuffer(AT_shift_stat, _xy_), shift_args3) #define AT_shift_textureNearest(_xy_) bufferIndexI1(&_bound_shift_layer, convert_int2_sat_rtn(textureToBuffer(AT_shift_stat, _xy_) + 0.5f), shift_args3) #define AT_shift_textureSample(_xy_) bufferSampleI1(&_bound_shift_layer, textureToBuffer(AT_shift_stat, _xy_), shift_args3) #define AT_shift_1(_xy_) bufferSampleI1(&_bound_shift_layer, imageToBuffer(AT_shift_stat, _xy_), shift_args3) #ifdef ALIGNED_shift #define AT_shift _bufferIndexLinI1(&_bound_shift_layer, _bound_idx, shift_args2) #else #define AT_shift bufferSampleI1(&_bound_shift_layer, imageToBuffer(AT_shift_stat, _bound_P_image), shift_args3) #endif #define AT_shift_set(_val_) _setIndexLinI1(&_bound_shift_layer, _bound_idx, _val_, _bound_shift_storage, _bound_shift_channels) #define AT_shift_setIndex(_xy_, _val_) _setIndexI1(&_bound_shift_layer, _xy_, _val_, _bound_shift_storage, _bound_shift_channels) #define AT_shift_bufferToImage(_xy_) (bufferToImage(AT_shift_stat, _xy_)) #define AT_shift_imageToBuffer(_xy_) (imageToBuffer(AT_shift_stat, _xy_)) #define AT_shift_bufferToPixel(_xy_) (bufferToPixel(AT_shift_stat, _xy_)) #define AT_shift_pixelToBuffer(_xy_) (pixelToBuffer(AT_shift_stat, _xy_)) #define AT_shift_bufferToTexture(_xy_) (bufferToTexture(AT_shift_stat, _xy_)) #define AT_shift_textureToBuffer(_xy_) (textureToBuffer(AT_shift_stat, _xy_)) #define AT_shift_imageToWorld(_xy_) (imageToWorld(AT_shift_stat, _xy_)) #define AT_shift_image3ToWorld(_xyz_) (image3ToWorld(AT_shift_stat, _xyz_)) #define AT_shift_worldToImage(_xyz_) (worldToImage(AT_shift_stat, _xyz_)) #define AT_shift_worldToImage3(_xyz_) (worldToImage3(AT_shift_stat, _xyz_)) #define AT_total_count_data _bound_total_count #define AT_total_count_bound 1 #define AT_total_count_stat ((global IMX_Stat * restrict) _bound_total_count_stat_void) #define AT_total_count_layer &_bound_total_count_layer #define AT_total_count_border _bound_total_count_border #define AT_total_count_storage _bound_total_count_storage #define AT_total_count_channels _bound_total_count_channels #define AT_total_count_tuplesize _bound_total_count_channels #define AT_total_count_xres _bound_total_count_layer.stat->resolution.x #define AT_total_count_yres _bound_total_count_layer.stat->resolution.y #define AT_total_count_res convert_float2(_bound_total_count_layer.stat->resolution) #ifdef CONSTANT_total_count #define total_count_args2 CONSTANT_(_bound_total_count_storage), _bound_total_count_channels #else #define total_count_args2 _bound_total_count_storage, _bound_total_count_channels #endif #define total_count_args3 _bound_total_count_border, total_count_args2 #define AT_total_count_bufferIndex(_xy_) bufferIndexI1(&_bound_total_count_layer, _xy_, total_count_args3) #define AT_total_count_bufferSample(_xy_) bufferSampleI1(&_bound_total_count_layer, _xy_, total_count_args3) #define AT_total_count_imageNearest(_xy_) bufferIndexI1(&_bound_total_count_layer, convert_int2_sat_rtn(imageToBuffer(AT_total_count_stat, _xy_) + 0.5f), total_count_args3) #define AT_total_count_imageSample(_xy_) bufferSampleI1(&_bound_total_count_layer, imageToBuffer(AT_total_count_stat, _xy_), total_count_args3) #define AT_total_count_textureNearest(_xy_) bufferIndexI1(&_bound_total_count_layer, convert_int2_sat_rtn(textureToBuffer(AT_total_count_stat, _xy_) + 0.5f), total_count_args3) #define AT_total_count_textureSample(_xy_) bufferSampleI1(&_bound_total_count_layer, textureToBuffer(AT_total_count_stat, _xy_), total_count_args3) #define AT_total_count_1(_xy_) bufferSampleI1(&_bound_total_count_layer, imageToBuffer(AT_total_count_stat, _xy_), total_count_args3) #ifdef ALIGNED_total_count #define AT_total_count _bufferIndexLinI1(&_bound_total_count_layer, _bound_idx, total_count_args2) #else #define AT_total_count bufferSampleI1(&_bound_total_count_layer, imageToBuffer(AT_total_count_stat, _bound_P_image), total_count_args3) #endif #define AT_total_count_set(_val_) _setIndexLinI1(&_bound_total_count_layer, _bound_idx, _val_, _bound_total_count_storage, _bound_total_count_channels) #define AT_total_count_setIndex(_xy_, _val_) _setIndexI1(&_bound_total_count_layer, _xy_, _val_, _bound_total_count_storage, _bound_total_count_channels) #define AT_total_count_bufferToImage(_xy_) (bufferToImage(AT_total_count_stat, _xy_)) #define AT_total_count_imageToBuffer(_xy_) (imageToBuffer(AT_total_count_stat, _xy_)) #define AT_total_count_bufferToPixel(_xy_) (bufferToPixel(AT_total_count_stat, _xy_)) #define AT_total_count_pixelToBuffer(_xy_) (pixelToBuffer(AT_total_count_stat, _xy_)) #define AT_total_count_bufferToTexture(_xy_) (bufferToTexture(AT_total_count_stat, _xy_)) #define AT_total_count_textureToBuffer(_xy_) (textureToBuffer(AT_total_count_stat, _xy_)) #define AT_total_count_imageToWorld(_xy_) (imageToWorld(AT_total_count_stat, _xy_)) #define AT_total_count_image3ToWorld(_xyz_) (image3ToWorld(AT_total_count_stat, _xyz_)) #define AT_total_count_worldToImage(_xyz_) (worldToImage(AT_total_count_stat, _xyz_)) #define AT_total_count_worldToImage3(_xyz_) (worldToImage3(AT_total_count_stat, _xyz_)) #line 1 kernel void generickernel( int2 _bound_tilesize, global void * restrict _bound_count_stat_void, global void * restrict _bound_count, global void * restrict _bound_in_total_count_stat_void, global void * restrict _bound_in_total_count, global void * restrict _bound_shift_stat_void, global void * restrict _bound_shift, global void * restrict _bound_total_count_stat_void, global void * restrict _bound_total_count ) { IMX_Layer _bound_count_layer = {_bound_count, _bound_count_stat_void}; IMX_Layer _bound_in_total_count_layer = {_bound_in_total_count, _bound_in_total_count_stat_void}; IMX_Layer _bound_shift_layer = {_bound_shift, _bound_shift_stat_void}; IMX_Layer _bound_total_count_layer = {_bound_total_count, _bound_total_count_stat_void}; int _bound_gidx = get_global_id(0) * _bound_tilesize.x; int _bound_gidy = get_global_id(1) * _bound_tilesize.y; if (_bound_gidx >= _RUNOVER_LAYER.stat->resolution.x) return; if (_bound_gidy >= _RUNOVER_LAYER.stat->resolution.y) return; int _bound_idx = _linearIndex(_RUNOVER_LAYER.stat, (int2)(_bound_gidx, _bound_gidy)); float2 _bound_P_image = bufferToImage(_RUNOVER_LAYER.stat, (float2)(_bound_gidx, _bound_gidy)); float2 _bound_P_texture = bufferToTexture(_RUNOVER_LAYER.stat, (float2)(_bound_gidx, _bound_gidy)); float2 _bound_P_pixel = bufferToPixel(_RUNOVER_LAYER.stat, (float2)(_bound_gidx, _bound_gidy)); #line 11 int shift_val = 0; int shift_addr = 0; int crr_count = 0; for (int y = 0; y < AT_yres; y++) { crr_count = *((__global int *)(AT_count_data) + shift_addr); // Current count *((__global int *)(AT_shift_data) + shift_addr) = shift_val; shift_val += crr_count; shift_addr += AT_xres; } } " ) input1_name [ 0 locks=0 ] ( count ) input1_type [ 0 locks=0 ] ( "int" ) input1_optional [ 0 locks=0 ] ( "on" ) input2_name [ 0 locks=0 ] ( in_total_count ) input2_type [ 0 locks=0 ] ( "int" ) input2_optional [ 0 locks=0 ] ( "off" ) output1_name [ 0 locks=0 ] ( shift ) output1_type [ 0 locks=0 ] ( "int" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) output2_name [ 8 locks=0 ] ( total_count ) output2_type [ 0 locks=0 ] ( "int" ) output2_metadata [ 0 locks=0 ] ( "name" ) output2_precision [ 0 locks=0 ] ( "node" ) output2_typeinfo [ 0 locks=0 ] ( "id" ) output2_metaname [ 0 locks=0 ] ( in_total_count ) } HouLC1033600bb006751bd830d04d7e7fhdaroot/shift_count.userdata ___Version___20.5.410HouLC1033600bb606751bd830e0c1c2aahdaroot/final_compose.inittype = opencl matchesdef = 1 HouLC1033600bb706751bd830d8426314hdaroot/final_compose.defcomment "" position 19.3518 -1.72488 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display on render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 2 "output1" } inputsNamed3 { 0 choose_output 2 1 "input1" 1 (__dot1) "" 1 "input2" } inputs { 0 choose_output 0 1 1 (__dot1) 1 1 } stat { create 1730898419 modify 1731666110 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb606751bd8309a78470ehdaroot/final_compose.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer src float read val=0 #bind layer special_shape_infos float4 read val={0,0,0,0} #bind layer dst float write val=0 @KERNEL { if (@special_shape_infos.w > 0.5f) @dst.set(@src.textureNearest(@special_shape_infos.xy)); else @dst.set(0.0f); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 2 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( src ) input1_type [ 0 locks=0 ] ( "float" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( special_shape_infos ) input2_type [ 0 locks=0 ] ( "float4" ) input2_optional [ 0 locks=0 ] ( "off" ) } HouLC1033600bb206751bd8309d7e189dhdaroot/final_compose.userdata ___Version___20.5.410HouLC1033600bb606751bd830f0c09a47hdaroot/choose_output.inittype = switch matchesdef = 1 HouLC1033600bb706751bd830521d41b5hdaroot/choose_output.defcomment "" position 17.1074 -5.33293 connectornextid 3 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 2 "chosen" } inputsNamed3 { 0 place_index_normalized 3 1 "input1" 1 place_index_integer 3 1 "input2" } inputs { 0 place_index_normalized 0 1 1 place_index_integer 0 1 } stat { create 1730899639 modify 1733159321 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb706751bd830d041f179hdaroot/choose_output.chn{ channel input { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../output\") } } } HouLC1033600bb606751bd830eed81ec8hdaroot/choose_output.parm{ version 0.8 input [ 8 locks=0 ] ( [ input 0 ] ) } HouLC1033600bb206751bd83077ced955hdaroot/choose_output.userdata ___Version___20.5.410HouLC1033600b8906751bd83049f1c611hdaroot/place_index_normalized.inittype = opencl matchesdef = 1 HouLC1033600b8e06751bd830d63086edhdaroot/place_index_normalized.defcomment "" position 14.7427 -3.71384 connectornextid 4 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 3 "output1" } inputsNamed3 { 0 fix_miss_points 1 1 "input1" 1 (__dot6) "" 1 "input2" 2 shift_count 1 1 "input3" } inputs { 0 fix_miss_points 0 1 1 (__dot6) 1 1 2 shift_count 0 1 } stat { create 1730888379 modify 1731666121 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8906751bd8309939a64ehdaroot/place_index_normalized.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer src read float opt val=0 #bind layer count read int val=0 #bind layer shift read int val=0 #bind layer dst write float #bind layer out_count read write int @KERNEL { int shift_val = 0; int count_addr = @ixy.y*@xres; int crr_count = *((__global int *)(@count.data) + count_addr); if (crr_count > 0) { int last_index = (@yres-1)*@xres; float total_count = (float)(*((__global int *)(@count.data) + last_index) + *((__global int *)(@shift.data) + last_index)); int crr_shift = *((__global int *)(@shift.data) + count_addr); int min_val, crr_val, min_val_idx; for (int i = 0; i < crr_count; i++) *((__global int *)(@out_count.data) + count_addr + i) = *((__global int *)(@count.data) + count_addr + i + 1); for (int i = 0; i < crr_count; i++) { min_val = @xres; min_val_idx = -1; for (int j = i; j < crr_count; j++) { crr_val = *((__global int *)(@out_count.data) + count_addr + j); if (crr_val < min_val) { min_val = crr_val; min_val_idx = j; } } if (min_val_idx != -1) { *((__global float *)(@dst.data) + count_addr + min_val) = (crr_shift + i + 1)/total_count; if (min_val_idx != i) *((__global int *)(@out_count.data) + count_addr + min_val_idx) = *((__global int *)(@out_count.data) + count_addr + i); } } } } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 0 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 3 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 2 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( src ) input1_type [ 0 locks=0 ] ( "float" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) input2_name [ 0 locks=0 ] ( count ) input2_type [ 0 locks=0 ] ( "int" ) input2_optional [ 0 locks=0 ] ( "off" ) input3_name [ 0 locks=0 ] ( shift ) input3_type [ 0 locks=0 ] ( "int" ) input3_optional [ 0 locks=0 ] ( "off" ) output2_name [ 0 locks=0 ] ( out_count ) output2_type [ 0 locks=0 ] ( "int" ) output2_metadata [ 0 locks=0 ] ( "first" ) output2_precision [ 0 locks=0 ] ( "node" ) output2_typeinfo [ 0 locks=0 ] ( "node" ) output2_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8506751bd830ff4d214dhdaroot/place_index_normalized.userdata ___Version___20.5.410HouLC1033600bb206751bd8305e21ed9fhdaroot/total_count_layer.inittype = layer matchesdef = 1 HouLC1033600bb306751bd830070b1647hdaroot/total_count_layer.defcomment "" position 10.015 -5.84384 connectornextid 1 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 0 "layer" } inputsNamed3 { } inputs { } stat { create 1731663501 modify 1731666114 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb206751bd8300e804597hdaroot/total_count_layer.parm{ version 0.8 signature [ 0 locks=0 ] ( i ) f1 [ 0 locks=0 ] ( 1 ) f2 [ 0 locks=0 ] ( 1 1 ) f3 [ 0 locks=0 ] ( 1 1 1 ) f4 [ 0 locks=0 ] ( 1 1 1 1 ) i [ 0 locks=0 ] ( 0 ) setres [ 0 locks=0 ] ( "on" ) res [ 0 locks=0 ] ( 1 1 ) resmenu [ 0 locks=0 ] ( "none" ) setpixelaspectratio [ 0 locks=0 ] ( "off" ) pixelaspectratio [ 0 locks=0 ] ( 1 ) folder0 [ 0 locks=0 ] ( 0 ) setpixelpad [ 0 locks=0 ] ( "off" ) pixelpad_h [ 0 locks=0 ] ( 0 0 ) pixelpad_v [ 0 locks=0 ] ( 0 0 ) setprecision [ 0 locks=0 ] ( "off" ) precision [ 0 locks=0 ] ( "b32" ) setborder [ 0 locks=0 ] ( "off" ) border [ 0 locks=0 ] ( "wrap" ) settypeinfo [ 0 locks=0 ] ( "on" ) typeinfo [ 0 locks=0 ] ( "id" ) setpixelscale [ 0 locks=0 ] ( "off" ) pixelscale [ 0 locks=0 ] ( 1 ) } HouLC1033600b8e06751bd830e15c4075hdaroot/total_count_layer.userdata ___Version___20.5.410HouLC1033600bb306751bd830808a97cdhdaroot/__dot1.networkdotinit{ "version":1, "posx":1.58387293395562945, "posy":-2.81885503906438695, "pinned":true, "color":"FROMOUTPUT", "input":"inputs 1 1" } HouLC1033600bb306751bd830c5adaca5hdaroot/__dot2.networkdotinit{ "version":1, "posx":13.5131200976906189, "posy":-8.99135583844940456, "pinned":false, "color":"FROMOUTPUT", "input":"shift_count 1 1" } HouLC1033600bb306751bd830cda8a8f9hdaroot/__dot3.networkdotinit{ "version":1, "posx":21.2728076875425351, "posy":-8.99135583844940278, "pinned":true, "color":"FROMOUTPUT" } HouLC1033600bb306751bd830b17008b0hdaroot/__dot4.networkdotinit{ "version":1, "posx":6.78140932697089482, "posy":-7.51815785452329965, "pinned":false, "color":"FROMOUTPUT", "input":"fix_miss_points 0 1" } HouLC1033600bb306751bd83055098627hdaroot/__dot5.networkdotinit{ "version":1, "posx":9.2741642399551143, "posy":-7.66935807381090751, "pinned":false, "color":"FROMOUTPUT", "input":"vertical_count 1 1" } HouLC1033600bb306751bd8303bb672dahdaroot/__dot6.networkdotinit{ "version":1, "posx":14.1979820680539177, "posy":-1.36562471768542881, "pinned":true, "color":"FROMOUTPUT", "input":"vertical_count 1 1" } HouLC1033600ba306751bd830da6bac4dhdaroot.order11 inputs outputs eval_points fix_miss_points vertical_count place_index_integer shift_count final_compose choose_output place_index_normalized total_count_layer HouLC1033600ba106751bd83019cf124ehdaroot.net1 HouLC1033600bb606751bd830f96ba020LIMITED_COMMERCIAL_FILE!!!INDX DialogScript gM CreateScript fgMInternalFileOptions0gM Contents.gzgMTypePropertiesOptions .gMHelp gM Tools.shelf gM IconImage2hgQExtraFileOptionsAGgMContentsAK)mgQ# Dialog script for quantico::sd_flood_fill_to_position::1.0 automatically generated { name quantico::sd_flood_fill_to_position::1.0 script quantico::flood_fill_to_position::1.2 label "Flood Fill to Position" input input1 flood_fill output output1 dst noautosig signature default RGBA { RGBA } { RGBA } signature rgb RGB { RGBA } { RGB } signature uv UV { RGBA } { UV } help { "" } parm { name "signature" baseparm label "Signature" export none } } # Automatically generated script \set noalias = 1 # # Creation script for quantico::sd_flood_fill_to_position::1.0 operator # if ( "$arg1" == "" ) then echo This script is intended as a creation script exit endif # Node $arg1 (quantico::Cop/sd_flood_fill_to_position::1.0) opexprlanguage -s hscript $arg1 opuserdata -n '___Version___' -v '' $arg1  nodeconntype nodeparmtypeZm۸v/~Ի`tE;m\[L*6^P-YNpa p8C!:Ft\ʢCMX.gk=}$![R\HTjǁ9x_aR"//KLJ4b%\JD4VX%+)``j!GFh2>"rbB4VYg{ (H!QV@gxQ9$$eYRlgXK"-]Hr\uemus.YX6+ILf׌b"Wy6dAUdT732f+Fjhg[aJ*oQhY*`Q8ȋ3Jv2_pk⪾Տ׺(0ިuxh?$EEŢ `А GnPqFߍYQRq<~}#{ce=8ע}Xk1 ]wzBY^C_1!ӡ C;B]~iׄnna]/Lh9.VƺvexGYy0`C˳\{4#< #J7h/!yh <Z_71^!REYwwf_t~4{@&ل^?dۚ^`s? f>7mŽmϷ aRNR|IlR?GI6-G:H,i%:@0n$:Xq"|R,It~ҮTYjX1 FN9d weDRvf9Ich&V.Xl7Tnø׫77^ױ8+<ѺAemW-UhU;b9 4^`&loYi䲜Ng|: M#^kƽa*svØjMg0h:*b65vPr}V%P%k8>NoTJW,T^ՠIѳQ<\Dv#ck&3%.sLX:r48Zc=NIu0t N6s;q <޲-5HkOJwLKQyVoƀnZz}=\>>N>) ;(' !ލ|o)id{qNjhԷyV; # d)K& <.hUmpV뎦g::9ЉIV JW0(1UIHNI@bԐB9O q;vF^hxulnK3#ȘX,) |BiY/t! ֜[sa"iTv=p:~ }=:Vʸux⟚! ,:1D/}_]'v7ς]){<_>LĝpE$tt 7D\O>:Nz9PU&;LLaIu~DbD`K COP $HDA_TABLE_AND_NAME SD/Flood Fill PIC2#Nnye53Created by Houdini14.0.321 [12/05/24 09:49:39]g^]www-datak1ehungaryr1~@@uF@Q=tX?!v82ThG_Cp_oeREgV2_p!rVȄgVΌ%bB7xd{qLr2pA6ac @v 0hjApIEWBA{dqIXA0sas'?uyU3`/Fbo?`bב?`PsbצY?`'TbCs?uDyU3`/FbZ*17BE88FMHEGOIEFMOLGOW\SOR^]SEEV`aZNNZaH`bO$(/;9.**-.-.40--.32.49;315585-04.--..-(`ɳb:!`*jbMU?u,yU3`/Fb-0;8-`Eb!    !     `Rb'?u1yU3`/Fb-0;@Zxxº׷̨^`A b*393Bfxronnpyo\GFPQJFFVojigehj]HThpkkkklsaWZff[JIR[bd]UM>EKJJ=-`bV|h 1 `rbg?u=yU3`/Fb-0`/Fb-7DHjqmdgxuiqkoyɼZ`A b*Y}÷ͼѿ̳ļ̽Z`bN|h 9 `ObW bsy?uCyU3?`/FbP7?8CUUFMX^[LLT^XMDYgjcXXcvvsphZbgff]X\sjqwy~mba`xb13Ym[wzvqr~q[hyyddyhekrridguuvxz~k\``b9`Fn|bLbW ?HouLC1033600ba706751bd83064be737bnode_typeCop HouLC1033600ba006751bd830672b780ehdaroot.inittype = quantico::sd_flood_fill_to_position::1.0 matchesdef = 0 HouLC1033600ba106751bd83078f1fd91hdaroot.defcomment "" position 39.2525 -18.9787 connectornextid 0 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { } inputs { } stat { create 1733159355 modify 1733159365 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bbc06751bd8303ef0a9adhdaroot.userdata ___Version___HouLC1033600bb906751bd830a26abf12hdaroot/inputs.inittype = input matchesdef = 1 HouLC1033600bbe06751bd8308841f1f3hdaroot/inputs.defcomment "" position 0 5.55112e-17 connectornextid 1 flags = lock off model off template off footprint off xray off bypass off display off render on highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 0 "output1" } inputsNamed3 { } inputs { } stat { create 1730829133 modify 1731676853 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb906751bd830870458bdhdaroot/inputs.parm{ version 0.8 } HouLC1033600bb506751bd8306611d4e4hdaroot/inputs.userdata ___Version___20.5.410HouLC1033600bb806751bd830ecf989dchdaroot/outputs.inittype = output matchesdef = 1 HouLC1033600bb906751bd830efb52fbahdaroot/outputs.defcomment "" position 10.6236 5.55112e-17 connectornextid 1 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { 0 switch1 1 1 "input1" } inputs { 0 switch1 0 1 } stat { create 1730829133 modify 1733159359 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb806751bd8303ce2cd45hdaroot/outputs.parm{ version 0.8 } HouLC1033600bb406751bd830d572f688hdaroot/outputs.userdata ___Version___20.5.410HouLC1033600b8406751bd83056287879hdaroot/flood_fill_to_position_rgba.inittype = opencl matchesdef = 1 HouLC1033600b8506751bd83023b2a8d4hdaroot/flood_fill_to_position_rgba.defcomment "" position 3.762 2.16951 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 inputs 0 1 "input1" } inputs { 0 inputs 0 1 } stat { create 1730829161 modify 1733159359 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8406751bd830251f2c99hdaroot/flood_fill_to_position_rgba.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill float4 val=0 #bind layer !&dst float4 @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float2 iptr; @dst.set(@flood_fill.z != 0.0f ? (float4)(fract(fma(-@flood_fill.xy,@flood_fill.zw,fma(@flood_fill.zw,0.5f,pos)), &iptr), 0.0f, 1.0f) : (float4)(0.0f, 0.0f, 0.0f, 1.0f)); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "float4" ) input1_optional [ 0 locks=0 ] ( "off" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float4" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8006751bd830fabe11f7hdaroot/flood_fill_to_position_rgba.userdata ___Version___20.5.410HouLC1033600bb806751bd8304964e27ahdaroot/switch1.inittype = switch matchesdef = 1 HouLC1033600bb906751bd830d9f359d9hdaroot/switch1.defcomment "" position 6.94763 0.075 connectornextid 4 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "chosen" } inputsNamed3 { 0 flood_fill_to_position_rgba 1 1 "input1" 2 flood_fill_to_position_rgb 1 1 "input2" 3 flood_fill_to_position_uv 1 1 "input3" } inputs { 0 flood_fill_to_position_rgba 0 1 1 flood_fill_to_position_rgb 0 1 2 flood_fill_to_position_uv 0 1 } stat { create 1731676738 modify 1733159355 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb906751bd83087b8c3fdhdaroot/switch1.chn{ channel input { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = "if(strcmp(chs(\"../signature\"), \"default\") == 0, 0, if(strcmp(chs(\"../signature\"), \"rgb\") == 0, 1, if(strcmp(chs(\"../signature\"), \"uv\") == 0, 2, 0)))" } } } HouLC1033600bb806751bd8308e3def5fhdaroot/switch1.parm{ version 0.8 input [ 0 locks=0 ] ( [ input 0 ] ) } HouLC1033600bb406751bd830779b4964hdaroot/switch1.userdata ___Version___20.5.410HouLC1033600b8506751bd83009696e75hdaroot/flood_fill_to_position_rgb.inittype = opencl matchesdef = 1 HouLC1033600b8a06751bd83089c84a0ehdaroot/flood_fill_to_position_rgb.defcomment "" position 3.762 0 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 inputs 0 1 "input1" } inputs { 0 inputs 0 1 } stat { create 1730829161 modify 1733159359 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8506751bd8308f39859chdaroot/flood_fill_to_position_rgb.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill float4 val=0 #bind layer !&dst float3 @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float2 iptr; @dst.set(@flood_fill.z != 0.0f ? (float3)(fract(fma(-@flood_fill.xy,@flood_fill.zw,fma(@flood_fill.zw,0.5f,pos)), &iptr), 0.0f) : (float3)(0.0f)); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "float4" ) input1_optional [ 0 locks=0 ] ( "off" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float3" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8106751bd8300b478a4ahdaroot/flood_fill_to_position_rgb.userdata ___Version___20.5.410HouLC1033600b8a06751bd8309b66b71ahdaroot/flood_fill_to_position_uv.inittype = opencl matchesdef = 1 HouLC1033600b8b06751bd830cb536dcfhdaroot/flood_fill_to_position_uv.defcomment "" position 3.762 -2.1579 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display on render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 inputs 0 1 "input1" } inputs { 0 inputs 0 1 } stat { create 1730829161 modify 1733159359 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8a06751bd830ebc25ac9hdaroot/flood_fill_to_position_uv.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill float4 val=0 #bind layer !&dst float2 @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float2 iptr; @dst.set(@flood_fill.z != 0.0f ? fract(fma(-@flood_fill.xy,@flood_fill.zw,fma(@flood_fill.zw,0.5f,pos)), &iptr) : (float2)(0.0f)); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 0 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "float4" ) input1_optional [ 0 locks=0 ] ( "off" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float2" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) } HouLC1033600b8606751bd8306a572e2fhdaroot/flood_fill_to_position_uv.userdata ___Version___20.5.410HouLC1033600ba306751bd830da6bac85hdaroot.order6 inputs outputs flood_fill_to_position_rgba switch1 flood_fill_to_position_rgb flood_fill_to_position_uv HouLC1033600ba106751bd83019cf124ehdaroot.net1 HouLC1033600bb606751bd830f96ba020LIMITED_COMMERCIAL_FILE!!!INDX DialogScript$gM CreateScript$ngMInternalFileOptions0gM Contents.gz OgMTypePropertiesOptions.gMHelp?gM Tools.shelf?gM IconImage>?#gQExtraFileOptionsRagMContentsRe[gQ# Dialog script for quantico::sd_flood_fill_to_random_color::1.0 automatically generated { name quantico::sd_flood_fill_to_random_color::1.0 script quantico::flood_fill_to_random_color::1.2 label "Flood Fill to Random Color" input input1 flood_fill output output1 dst noautosig signature default RGBA { RGBA } { RGBA } signature float3 RGB { RGBA } { RGB } signature float2 UV { RGBA } { UV } signature float1 Mono { RGBA } { Mono } help { "" } parm { name "signature" baseparm label "Signature" export none } parm { name "seed" label "Seed" type integer default { "0" } range { 0 100 } parmtag { "script_callback_language" "python" } } } # Automatically generated script \set noalias = 1 # # Creation script for quantico::sd_flood_fill_to_random_color::1.0 operator # if ( "$arg1" == "" ) then echo This script is intended as a creation script exit endif # Node $arg1 (quantico::Cop/sd_flood_fill_to_random_color::1.0) opexprlanguage -s hscript $arg1 opuserdata -n '___Version___' -v '' $arg1  nodeconntype nodeparmtype\۸v?@1^ w' 0: mfI[`YHBdQ+QOy>pAɶd],g$D^!<{y'u݂6lP2_ IPPyJ E הٺ o#g"D)ѕʝD e*P+ F#]CWvO33 А'/_|%3|_6ڶ)yk/^BhIcGqh%"]Y֠S&_Gw?.$ xX,FR<[w!zjGVcZa.֠j.0US7ְkk&E4mqLWG;5۴QtT !Om7+dW8h "AL" L̜n@ȡo[ݧt{h)V2K|_M'4\Of./#N 5og轲)_ Q?9cwIDCڀMB|KP*ΡR=zLRVv9n@6Po3Bh(?zEno9`˟TM̾/aHM4xGm6&4 MwȀeFx4HRϮ 4wOHEޛɱ› ٷx,U;W29\H۝Ky]֥78ZJ3_t5gZTJMec텼ZهjRI5yp*^F0}|(uUu8C 1+K 5bZ29x#6RBv MEcT&]T+3&uf)IA=- -`D -k$ѲS& B2Mu'RaY&ᔢ!xGqFC-¼NR㺟)؃Z4߱,x&ꦇ+aX(bbm@@nAQY\tdZb8f)<9.wߩ& b2"}tc~ 0Wa#q7Cq! qGC=^9 E ]{V|S*t8MEe*ADæLv!Uo gOүr+5y&DydS9xP>ץ)um8ץ}rk6TlO6xp#{̇pp#{x84Wrm4oTwm݇顐从WR|b~-}Tږ:ÇRjW}kaXUl'3mzV'@o GT|^i@+Z)l*4Xt` R8Jp`u|9}y%W޵–}kPͿ5γomaglӞ.vCҌC#*F;.r5?\\_]GFR6[CheckExternal := 1; ContentsCompressionType := 1; ForbidOutsideParms := 1; GzipContents := 1; LockContents := 1; MakeDefault := 1; ParmsFromVfl := 0; PrefixDroppedParmLabel := 0; PrefixDroppedParmName := 0; SaveCachedCode := 0; SaveIcon := 1; SaveSpareParms := 0; UnlockOnCreate := 0; UseDSParms := 1; COP $HDA_TABLE_AND_NAME SD/Flood Fill PIC2#Nnye53Created by Houdini14.0.321 [12/05/24 09:49:39]g^]www-datak1ehungaryr1~@@uF@Q=tX?!v82ThG_Cp_oeREgV2_p!rVȄgVΌ%bB7xd{qLr2pA6ac @v 0hjApIEWBA{dqIXA0sas'?uyU3`/Fbo?`bב?`PsbצY?`'TbCs?u$yU3`/FbZ/518FXig\EAOSHGS`UEAA??:78;?BC?;GIF648=54,`kk[b;@a8MSA`b|h*5@NbeYdeevѽtbvХɹnyd<>`bx?uyU3`/Fb-*LޥƿꠄҩL 69`A b*ceüfh(%qvsgSK^owpŁh>`b|h?nN5.66Mhg]mqsqb^Y˲yn<>`bx?uyU3 `/Fb-$]Ͱ̾ǽëꟜȶcIH:`A b*Yzuh׸ns(#hd{佊T`b|h&cC.FBCFQzqt_]TDZu{WV`bx?uyU3 `/Fb-4ěұ㢞ԳݧnrZ;`A b*Capiӱzuk.*ûs{wk{Իݪ``b|h6ڮ^;KMH<9ysbleڽܺf}ܫa`bx?uyU3 `/Fb-IǡǶ׮Ҥﰀqe:`A b*/PubҳŹwY>676^rsgܿ^`b|hGƯsI=KOEBդxq^jZ`bx?uyU3 `/Fb-Wʽ߲uqsשɩtܫ|n}^:`A b*M{rn˾˥}z}rR7[ywt}ʿ^`b|hBrmF=K>BfɹѸwΰ~fm{reZ`bx?uyU3 `/Fb-a屑~yɗ՜rk~|]:`A b*SĔ||xzfJȏzu{Ⱦ^`b|hI|U5@DfŃɷvoZ`bx?uyU3`/Fb-fݰįŨugp~gvĭ\DFt{l}|]:`A b*Sнorxn~mvUNl^`b|hO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dXOheZOQTVX_ZgmQ5`~b ?uyU3?`/FbW'2?TfmeKGNXI_s|wiMIKLYjQV[YOB@HPmklnwqZAfmP`_~b{ 265tybTRYcTLLQNJOprJRm}xX98PP^^QTUUWexa(69`5`_bͿ̗\mLQdpronxqbcqiZQl{T- %=MPPZZOHGGHK?7:OA>H6LE`(b7x?HouLC1033600ba706751bd83064be737bnode_typeCop HouLC1033600ba006751bd830672b7872hdaroot.inittype = quantico::sd_flood_fill_to_random_color::1.0 matchesdef = 0 HouLC1033600ba106751bd83078f1fd91hdaroot.defcomment "" position 39.2692 -19.0119 connectornextid 0 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { } inputs { } stat { create 1733159394 modify 1733159406 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bbc06751bd8303ef0a9adhdaroot.userdata ___Version___HouLC1033600b8a06751bd8308fb7390ehdaroot/flood_fill_to_random_rgba.inittype = opencl matchesdef = 1 HouLC1033600b8b06751bd8300fee8fc0hdaroot/flood_fill_to_random_rgba.defcomment "" position 20.539 5.53402 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 input1 0 1 "input1" } inputs { 0 input1 0 1 } stat { create 1730727571 modify 1733159397 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8b06751bd83011b27769hdaroot/flood_fill_to_random_rgba.chn{ channel bindings1_intval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../seed\") } } } HouLC1033600b8a06751bd8308025151bhdaroot/flood_fill_to_random_rgba.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 2 2 2 2 2 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill? float4 val=0 #bind layer !&dst float4 #bind parm seed int #include \"random.h\" @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float4 res = (float4)(0.0f); float2 size = (float2)(@xres, @yres); if (@flood_fill.z != 0.0f) { float2 iptr; pos = fract(pos+fma(-@flood_fill.xy, @flood_fill.zw, floor(@flood_fill.zw/9.0f*size)/size), &iptr); uint seed_val = @seed; seed_val = SYSwang_inthash(seed_val); seed_val += (uint)(fma(pos.y,size.y,pos.x)*size.x); seed_val = SYSwang_inthash(seed_val); res = (float4)(fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f)); } @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 1 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "float4" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float4" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) stdswitcher0_1 [ 0 locks=0 ] ( 1 ) bindings1_name [ 0 locks=0 ] ( seed ) bindings1_type [ 0 locks=0 ] ( "int" ) bindings1_rampsize [ 0 locks=0 ] ( 1024 ) bindings1_ramptype [ 0 locks=0 ] ( "float" ) bindings1_ramp [ 0 locks=0 ] ( 2 ) bindings1_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings1_layertype [ 0 locks=0 ] ( "float4" ) bindings1_layerborder [ 0 locks=0 ] ( "input" ) bindings1_portname [ 0 locks=0 ] ( "" ) bindings1_volume [ 0 locks=0 ] ( "" ) bindings1_forcealign [ 0 locks=0 ] ( "on" ) bindings1_resolution [ 0 locks=0 ] ( "off" ) bindings1_voxelsize [ 0 locks=0 ] ( "off" ) bindings1_xformtoworld [ 0 locks=0 ] ( "off" ) bindings1_xformtovoxel [ 0 locks=0 ] ( "off" ) bindings1_vdbtype [ 0 locks=0 ] ( "any" ) bindings1_attribute [ 0 locks=0 ] ( "" ) bindings1_attribclass [ 0 locks=0 ] ( "point" ) bindings1_attribtype [ 0 locks=0 ] ( "float" ) bindings1_attribsize [ 0 locks=0 ] ( 1 ) bindings1_precision [ 0 locks=0 ] ( "node" ) bindings1_readable [ 0 locks=0 ] ( "on" ) bindings1_writeable [ 0 locks=0 ] ( "off" ) bindings1_optional [ 0 locks=0 ] ( "off" ) bindings1_defval [ 0 locks=0 ] ( "off" ) bindings1_intval [ 8 locks=0 ] ( [ bindings1_intval 0 ] ) bindings1_fval [ 0 locks=0 ] ( 0 ) bindings1_v2val [ 0 locks=0 ] ( 0 0 ) bindings1_v3val [ 0 locks=0 ] ( 0 0 0 ) bindings1_v4val [ 0 locks=0 ] ( 0 0 0 0 ) bindings1_timescale [ 0 locks=0 ] ( "none" ) bindings1_ramp1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp1value [ 0 locks=0 ] ( 0 ) bindings1_ramp1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp2value [ 0 locks=0 ] ( 1 ) bindings1_ramp2interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp_rgb1c [ 0 locks=0 ] ( 0 0 0 ) bindings1_ramp_rgb1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp_rgb2c [ 0 locks=0 ] ( 1 1 1 ) bindings1_ramp_rgb2interp [ 0 locks=0 ] ( "linear" ) } HouLC1033600b8606751bd830b05d87c7hdaroot/flood_fill_to_random_rgba.userdata ___Version___20.5.410HouLC1033600bb906751bd8303df2f8ddhdaroot/input1.inittype = input matchesdef = 1 HouLC1033600bbe06751bd83094dcf1a4hdaroot/input1.defcomment "" position 17.7307 1.96167 connectornextid 1 flags = lock off model off template off footprint off xray off bypass off display off render on highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 0 "output1" } inputsNamed3 { } inputs { } stat { create 1730744623 modify 1731668735 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb906751bd83017ded2a2hdaroot/input1.parm{ version 0.8 } HouLC1033600bb506751bd8304668c25fhdaroot/input1.userdata ___Version___20.5.410HouLC1033600bb806751bd830e3215dffhdaroot/output1.inittype = output matchesdef = 1 HouLC1033600bb906751bd830c38e6dfbhdaroot/output1.defcomment "" position 26.1899 1.96167 connectornextid 1 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { } inputsNamed3 { 0 switch_out 1 1 "input1" } inputs { 0 switch_out 0 1 } stat { create 1730744678 modify 1733159397 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bb806751bd83067407d07hdaroot/output1.parm{ version 0.8 } HouLC1033600bb406751bd830b3156880hdaroot/output1.userdata ___Version___20.5.410HouLC1033600bb506751bd83052b12859hdaroot/switch_out.inittype = switch matchesdef = 1 HouLC1033600bba06751bd8305134d5fehdaroot/switch_out.defcomment "" position 23.7303 1.96167 connectornextid 5 flags = lock off model off template off footprint off xray off bypass off display on render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "chosen" } inputsNamed3 { 0 flood_fill_to_random_rgba 1 1 "input1" 2 flood_fill_to_random_rgb 1 1 "input2" 3 flood_fill_to_random_uv 1 1 "input3" 4 flood_fill_to_random_mono 1 1 "input4" } inputs { 0 flood_fill_to_random_rgba 0 1 1 flood_fill_to_random_rgb 0 1 2 flood_fill_to_random_uv 0 1 3 flood_fill_to_random_mono 0 1 } stat { create 1731667355 modify 1733159394 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600bba06751bd830491da0f4hdaroot/switch_out.chn{ channel input { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = "if(strcmp(chs(\"../signature\"), \"default\") == 0, 0, if(strcmp(chs(\"../signature\"), \"float3\") == 0, 1, if(strcmp(chs(\"../signature\"), \"float2\") == 0, 2, if(strcmp(chs(\"../signature\"), \"float1\") == 0, 3, 0))))" } } } HouLC1033600bb506751bd830143c6665hdaroot/switch_out.parm{ version 0.8 input [ 8 locks=0 ] ( [ input 0 ] ) } HouLC1033600bb106751bd830838864eehdaroot/switch_out.userdata ___Version___20.5.410HouLC1033600b8b06751bd830a5f42158hdaroot/flood_fill_to_random_rgb.inittype = opencl matchesdef = 1 HouLC1033600b8806751bd8301ebc0292hdaroot/flood_fill_to_random_rgb.defcomment "" position 20.6655 3.43824 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 input1 0 1 "input1" } inputs { 0 input1 0 1 } stat { create 1730727571 modify 1733159397 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8806751bd8304eb4fd05hdaroot/flood_fill_to_random_rgb.chn{ channel bindings1_intval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../seed\") } } } HouLC1033600b8b06751bd830d15278a1hdaroot/flood_fill_to_random_rgb.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill? float4 val=0 #bind layer !&dst float3 #bind parm seed int #include \"random.h\" @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float3 res = (float3)(0.0f); float2 size = (float2)(@xres, @yres); if (@flood_fill.z != 0.0f) { float2 iptr; pos = fract(pos+fma(-@flood_fill.xy, @flood_fill.zw, floor(@flood_fill.zw/9.0f*size)/size), &iptr); uint seed_val = @seed; seed_val = SYSwang_inthash(seed_val); seed_val += (uint)(fma(pos.y,size.y,pos.x)*size.x); seed_val = SYSwang_inthash(seed_val); res = (float3)(fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f)); } @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 1 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "float4" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float3" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) stdswitcher0_1 [ 0 locks=0 ] ( 1 ) bindings1_name [ 0 locks=0 ] ( seed ) bindings1_type [ 0 locks=0 ] ( "int" ) bindings1_rampsize [ 0 locks=0 ] ( 1024 ) bindings1_ramptype [ 0 locks=0 ] ( "float" ) bindings1_ramp [ 0 locks=0 ] ( 2 ) bindings1_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings1_layertype [ 0 locks=0 ] ( "float4" ) bindings1_layerborder [ 0 locks=0 ] ( "input" ) bindings1_portname [ 0 locks=0 ] ( "" ) bindings1_volume [ 0 locks=0 ] ( "" ) bindings1_forcealign [ 0 locks=0 ] ( "on" ) bindings1_resolution [ 0 locks=0 ] ( "off" ) bindings1_voxelsize [ 0 locks=0 ] ( "off" ) bindings1_xformtoworld [ 0 locks=0 ] ( "off" ) bindings1_xformtovoxel [ 0 locks=0 ] ( "off" ) bindings1_vdbtype [ 0 locks=0 ] ( "any" ) bindings1_attribute [ 0 locks=0 ] ( "" ) bindings1_attribclass [ 0 locks=0 ] ( "point" ) bindings1_attribtype [ 0 locks=0 ] ( "float" ) bindings1_attribsize [ 0 locks=0 ] ( 1 ) bindings1_precision [ 0 locks=0 ] ( "node" ) bindings1_readable [ 0 locks=0 ] ( "on" ) bindings1_writeable [ 0 locks=0 ] ( "off" ) bindings1_optional [ 0 locks=0 ] ( "off" ) bindings1_defval [ 0 locks=0 ] ( "off" ) bindings1_intval [ 8 locks=0 ] ( [ bindings1_intval 0 ] ) bindings1_fval [ 0 locks=0 ] ( 0 ) bindings1_v2val [ 0 locks=0 ] ( 0 0 ) bindings1_v3val [ 0 locks=0 ] ( 0 0 0 ) bindings1_v4val [ 0 locks=0 ] ( 0 0 0 0 ) bindings1_timescale [ 0 locks=0 ] ( "none" ) bindings1_ramp1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp1value [ 0 locks=0 ] ( 0 ) bindings1_ramp1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp2value [ 0 locks=0 ] ( 1 ) bindings1_ramp2interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp_rgb1c [ 0 locks=0 ] ( 0 0 0 ) bindings1_ramp_rgb1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp_rgb2c [ 0 locks=0 ] ( 1 1 1 ) bindings1_ramp_rgb2interp [ 0 locks=0 ] ( "linear" ) } HouLC1033600b8706751bd830d4c7c910hdaroot/flood_fill_to_random_rgb.userdata ___Version___20.5.410HouLC1033600b8806751bd83023a87d42hdaroot/flood_fill_to_random_uv.inittype = opencl matchesdef = 1 HouLC1033600b8906751bd83047ef204fhdaroot/flood_fill_to_random_uv.defcomment "" position 20.6655 1.36167 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 input1 0 1 "input1" } inputs { 0 input1 0 1 } stat { create 1730727571 modify 1733159397 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8906751bd83054fb5012hdaroot/flood_fill_to_random_uv.chn{ channel bindings1_intval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../seed\") } } } HouLC1033600b8806751bd830735358echdaroot/flood_fill_to_random_uv.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill? float4 val=0 #bind layer !&dst float2 #bind parm seed int #include \"random.h\" @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float2 res = (float2)(0.0f); float2 size = (float2)(@xres, @yres); if (@flood_fill.z != 0.0f) { float2 iptr; pos = fract(pos+fma(-@flood_fill.xy, @flood_fill.zw, floor(@flood_fill.zw/9.0f*size)/size), &iptr); uint seed_val = @seed; seed_val = SYSwang_inthash(seed_val); seed_val += (uint)(fma(pos.y,size.y,pos.x)*size.x); seed_val = SYSwang_inthash(seed_val); res = (float2)(fma(SYSfastRandom(&seed_val),0.999f,0.001f), fma(SYSfastRandom(&seed_val),0.999f,0.001f)); } @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 1 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "float4" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float2" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) stdswitcher0_1 [ 0 locks=0 ] ( 1 ) bindings1_name [ 0 locks=0 ] ( seed ) bindings1_type [ 0 locks=0 ] ( "int" ) bindings1_rampsize [ 0 locks=0 ] ( 1024 ) bindings1_ramptype [ 0 locks=0 ] ( "float" ) bindings1_ramp [ 0 locks=0 ] ( 2 ) bindings1_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings1_layertype [ 0 locks=0 ] ( "float4" ) bindings1_layerborder [ 0 locks=0 ] ( "input" ) bindings1_portname [ 0 locks=0 ] ( "" ) bindings1_volume [ 0 locks=0 ] ( "" ) bindings1_forcealign [ 0 locks=0 ] ( "on" ) bindings1_resolution [ 0 locks=0 ] ( "off" ) bindings1_voxelsize [ 0 locks=0 ] ( "off" ) bindings1_xformtoworld [ 0 locks=0 ] ( "off" ) bindings1_xformtovoxel [ 0 locks=0 ] ( "off" ) bindings1_vdbtype [ 0 locks=0 ] ( "any" ) bindings1_attribute [ 0 locks=0 ] ( "" ) bindings1_attribclass [ 0 locks=0 ] ( "point" ) bindings1_attribtype [ 0 locks=0 ] ( "float" ) bindings1_attribsize [ 0 locks=0 ] ( 1 ) bindings1_precision [ 0 locks=0 ] ( "node" ) bindings1_readable [ 0 locks=0 ] ( "on" ) bindings1_writeable [ 0 locks=0 ] ( "off" ) bindings1_optional [ 0 locks=0 ] ( "off" ) bindings1_defval [ 0 locks=0 ] ( "off" ) bindings1_intval [ 8 locks=0 ] ( [ bindings1_intval 0 ] ) bindings1_fval [ 0 locks=0 ] ( 0 ) bindings1_v2val [ 0 locks=0 ] ( 0 0 ) bindings1_v3val [ 0 locks=0 ] ( 0 0 0 ) bindings1_v4val [ 0 locks=0 ] ( 0 0 0 0 ) bindings1_timescale [ 0 locks=0 ] ( "none" ) bindings1_ramp1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp1value [ 0 locks=0 ] ( 0 ) bindings1_ramp1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp2value [ 0 locks=0 ] ( 1 ) bindings1_ramp2interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp_rgb1c [ 0 locks=0 ] ( 0 0 0 ) bindings1_ramp_rgb1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp_rgb2c [ 0 locks=0 ] ( 1 1 1 ) bindings1_ramp_rgb2interp [ 0 locks=0 ] ( "linear" ) } HouLC1033600b8406751bd8307df2ca12hdaroot/flood_fill_to_random_uv.userdata ___Version___20.5.410HouLC1033600b8a06751bd83073c0f84fhdaroot/flood_fill_to_random_mono.inittype = opencl matchesdef = 1 HouLC1033600b8b06751bd830c64eee7bhdaroot/flood_fill_to_random_mono.defcomment "" position 20.6655 -0.766982 connectornextid 2 flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress off colordefault on exposed on lowdetail off mediumdetail off highdetail on outputsNamed3 { 1 "output1" } inputsNamed3 { 0 input1 0 1 "input1" } inputs { 0 input1 0 1 } stat { create 1730727571 modify 1733159397 author velor@veloromPC access 0777 } color UT_Color RGB 0.8 0.8 0.8 delscript "" exprlanguage hscript end HouLC1033600b8b06751bd83083d3b446hdaroot/flood_fill_to_random_mono.chn{ channel bindings1_intval { lefttype = extend righttype = extend flags = 0 segment { length = 0 expr = ch(\"../seed\") } } } HouLC1033600b8a06751bd830f579ebb8hdaroot/flood_fill_to_random_mono.parm{ version 0.8 stdswitcher [ 0 locks=0 ] ( 0 0 0 0 0 ) kernelcode [ 0 locks=0 ] ( "#bind layer flood_fill? float4 val=0 #bind layer !&dst float #bind parm seed int #include \"random.h\" @KERNEL { float2 pos = fma(@P.xy,0.5f,0.5f); float res = 0.0f; float2 size = (float2)(@xres, @yres); if (@flood_fill.z != 0.0f) { float2 iptr; pos = fract(pos+fma(-@flood_fill.xy, @flood_fill.zw, floor(@flood_fill.zw/9.0f*size)/size), &iptr); uint seed_val = @seed; seed_val = SYSwang_inthash(seed_val); seed_val += (uint)(fma(pos.y,size.y,pos.x)*size.x); seed_val = SYSwang_inthash(seed_val); res = fma(SYSfastRandom(&seed_val),0.999f,0.001f); } @dst.set(res); } " ) kerneloptions [ 0 locks=0 ] ( "" ) options_tile [ 0 locks=0 ] ( 1 1 ) options_iterations [ 0 locks=0 ] ( 1 ) options_iteration [ 0 locks=0 ] ( "off" ) usewritebackkernel [ 0 locks=0 ] ( "off" ) options_time [ 0 locks=0 ] ( "off" ) options_importprequel [ 0 locks=0 ] ( "on" ) options_timing [ 0 locks=0 ] ( "off" ) filter [ 0 locks=0 ] ( "box" ) options_precision [ 0 locks=0 ] ( "32" ) inputs [ 0 locks=0 ] ( 1 ) parm_spacerparm [ 0 locks=0 ] ( ) outputs [ 0 locks=0 ] ( 1 ) bindings [ 0 locks=0 ] ( 1 ) displaycode [ 0 locks=0 ] ( 0 ) generatedcode [ 0 locks=0 ] ( "" ) input1_name [ 0 locks=0 ] ( flood_fill ) input1_type [ 0 locks=0 ] ( "float4" ) input1_optional [ 0 locks=0 ] ( "on" ) output1_name [ 0 locks=0 ] ( dst ) output1_type [ 0 locks=0 ] ( "float" ) output1_metadata [ 0 locks=0 ] ( "first" ) output1_precision [ 0 locks=0 ] ( "node" ) output1_typeinfo [ 0 locks=0 ] ( "node" ) output1_metaname [ 0 locks=0 ] ( "" ) stdswitcher0_1 [ 0 locks=0 ] ( 1 ) bindings1_name [ 0 locks=0 ] ( seed ) bindings1_type [ 0 locks=0 ] ( "int" ) bindings1_rampsize [ 0 locks=0 ] ( 1024 ) bindings1_ramptype [ 0 locks=0 ] ( "float" ) bindings1_ramp [ 0 locks=0 ] ( 2 ) bindings1_ramp_rgb [ 0 locks=0 ] ( 2 ) bindings1_layertype [ 0 locks=0 ] ( "float4" ) bindings1_layerborder [ 0 locks=0 ] ( "input" ) bindings1_portname [ 0 locks=0 ] ( "" ) bindings1_volume [ 0 locks=0 ] ( "" ) bindings1_forcealign [ 0 locks=0 ] ( "on" ) bindings1_resolution [ 0 locks=0 ] ( "off" ) bindings1_voxelsize [ 0 locks=0 ] ( "off" ) bindings1_xformtoworld [ 0 locks=0 ] ( "off" ) bindings1_xformtovoxel [ 0 locks=0 ] ( "off" ) bindings1_vdbtype [ 0 locks=0 ] ( "any" ) bindings1_attribute [ 0 locks=0 ] ( "" ) bindings1_attribclass [ 0 locks=0 ] ( "point" ) bindings1_attribtype [ 0 locks=0 ] ( "float" ) bindings1_attribsize [ 0 locks=0 ] ( 1 ) bindings1_precision [ 0 locks=0 ] ( "node" ) bindings1_readable [ 0 locks=0 ] ( "on" ) bindings1_writeable [ 0 locks=0 ] ( "off" ) bindings1_optional [ 0 locks=0 ] ( "off" ) bindings1_defval [ 0 locks=0 ] ( "off" ) bindings1_intval [ 8 locks=0 ] ( [ bindings1_intval 0 ] ) bindings1_fval [ 0 locks=0 ] ( 0 ) bindings1_v2val [ 0 locks=0 ] ( 0 0 ) bindings1_v3val [ 0 locks=0 ] ( 0 0 0 ) bindings1_v4val [ 0 locks=0 ] ( 0 0 0 0 ) bindings1_timescale [ 0 locks=0 ] ( "none" ) bindings1_ramp1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp1value [ 0 locks=0 ] ( 0 ) bindings1_ramp1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp2value [ 0 locks=0 ] ( 1 ) bindings1_ramp2interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb1pos [ 0 locks=0 ] ( 0 ) bindings1_ramp_rgb1c [ 0 locks=0 ] ( 0 0 0 ) bindings1_ramp_rgb1interp [ 0 locks=0 ] ( "linear" ) bindings1_ramp_rgb2pos [ 0 locks=0 ] ( 1 ) bindings1_ramp_rgb2c [ 0 locks=0 ] ( 1 1 1 ) bindings1_ramp_rgb2interp [ 0 locks=0 ] ( "linear" ) } HouLC1033600b8606751bd830e8cfad7bhdaroot/flood_fill_to_random_mono.userdata ___Version___20.5.410HouLC1033600ba306751bd830da6bac6ehdaroot.order7 flood_fill_to_random_rgba input1 output1 switch_out flood_fill_to_random_rgb flood_fill_to_random_uv flood_fill_to_random_mono HouLC1033600ba106751bd83019cf124ehdaroot.net1 HouLC1033600bb606751bd830f96ba020LIMITED_COMMERCIAL_FILE!!!