].w - normal_depth[ pos1 ].w ), 1.0 ); const float depth_similarity_a1 = min( 1.3 - abs( ( normal_depth[ pos0 ].w + normal_depth[ pos2 ].w ) * 0.5 - normal_depth[ pos1 ].w ), 1.0 ); const float depth_similarity_12 = min( 1.3 - abs( normal_depth[ pos1 ].w - normal_depth[ pos2 ].w ), 1.0 ); const float depth_similarity_b1 = min( 1.3 - abs( ( normal_depth[ pos3 ].w + normal_depth[ pos4 ].w ) * 0.5 - normal_depth[ pos1 ].w ), 1.0 ); const float depth_similarity_13 = min( 1.3 - abs( normal_depth[ pos1 ].w - normal_depth[ pos3 ].w ), 1.0 ); const float depth_similarity_14 = min( 1.3 - abs( normal_depth[ pos1 ].w - normal_depth[ pos4 ].w ), 1.0 ); const float normal_similarity_01 = min( 1.3 * max( dot( normal_depth[ pos0 ].xyz, normal_depth[ pos1 ].xyz ), 0.0 ),1.0 ); const float normal_similarity_a1 = min( 1.3 * max( dot( normalize( normal_depth[ pos0 ].xyz + normal_depth[ pos2 ].xyz ), normal_depth[ pos1 ].xyz ), 0.0 ), 1.0 ); const float normal_similarity_12 = min( 1.3 * max( dot( normal_depth[ pos1 ].xyz, normal_depth[ pos2 ].xyz ), 0.0 ), 1.0 ); const float normal_similarity_b1 = min( 1.3 * max( dot( normalize( normal_depth[ pos3 ].xyz + normal_depth[ pos4 ].xyz ), normal_depth[ pos1 ].xyz ), 0.0 ), 1.0 ); const float normal_similarity_13 = min( 1.3 * max( dot( normal_depth[ pos1 ].xyz, normal_depth[ pos3 ].xyz ), 0.0 ), 1.0 ); const float normal_similarity_14 = min( 1.3 * max( dot( normal_depth[ pos1 ].xyz, normal_depth[ pos4 ].xyz ), 0.0 ), 1.0 ); const float similarity_01 = instance_similarity_01 * depth_similarity_01 * normal_similarity_01; const float similarity_a1 = instance_similarity_02 * instance_similarity_01 * depth_similarity_a1 * normal_similarity_a1; const float similarity_12 = instance_similarity_12 * depth_similarity_12 * normal_similarity_12; const float similarity_b1 = instance_similarity_34 * instance_similarity_13 * depth_similarity_b1 * normal_similarity_b1; const float similarity_13 = instance_similarity_13 * depth_similarity_13 * normal_similarity_13; const float similarity_14 = instance_similarity_14 * depth_similarity_14 * normal_similarity_14; const float similarity_center = max( similarity_a1, similarity_b1 ); float highest = similarity_center; xy = 4; xy = ( highest < similarity_01 ) ? 0 : xy; highest = max( highest, similarity_01 ); xy = ( highest < similarity_12 ) ? 3 : xy; highest = max( highest, similarity_12 ); xy = ( highest < similarity_13 ) ? 1 : xy; highest = max( highest, similarity_13 ); xy = ( highest < similarity_14 ) ? 2 : xy; highest = max( highest, similarity_14 ); ίϯϐϡʔτγΣʔμͰ όΠϥςϥϧΦϑηοτΛٻΊΔ