PixelSort

AIと読む
全ドキュメントを1ファイルで(llms-full.txt)
pixelsort #ProFx #ノード
PixelSort

明るさ(0.298912R + 0.586611G + 0.114478B)が Threshold MinMax の範囲に入る連続した画素列を1つの区間とみなし、その区間内だけを明るさ順に並べ替えます。並べ替えはコンピュートシェーダー上のバイトニックソートで、行(または列)ごとに1回のDispatchで走ります。

  • Enable — OFFで素通し。初期値ON(Enable 入力 / isUsingInput / currentIsUsing
  • Direction — ONで水平(行方向)、OFFで垂直(列方向)。初期値ON。ノードUIのトグル名は「Horizontal」です(Direction 入力 / directionInput / currentDirection
  • Ascending — 並び順。初期値ON(Ascending 入力 / ascendingInput / currentAscending
  • Threshold Min — 初期値0.4。UIスライダーは0〜1(ThresholdMin 入力 / thresholdMinInput / currentThresholdMin
  • Threshold Max — 初期値0.6。UIスライダーは0〜1(ThresholdMax 入力 / thresholdMaxInput / currentThresholdMax
  • Mask — 白い(Rが1の)ところがソート結果、黒いところが元の絵になります(lerp(元, ソート結果, mask.r))。未接続ならソート結果がそのまま出ます

ソートする軸のサイズが2048以上だと処理されず素通しになります(コンソールにエラーが出ます)。水平ソートなら幅、垂直ソートなら高さが対象なので、4K横(3840)を水平ソートすると効きません。

出力はグローバル解像度で確保され、入力の解像度には追従しません。解像度が違う場合は最後に拡大縮小されます。

出力ポートへの初回publishは起動から15フレーム後です。

入力(Layer)が未接続のときは出力が黒で塗られます。

入力ポート

Port ID
LayerRenderTexture
MaskRenderTexture
Enablebool
Directionbool
Ascendingbool
ThresholdMinfloat
ThresholdMaxfloat

出力ポート

Port ID
OutRenderTexture

スクリプトから設定可能なメンバー

パス
isUsingInputbool
directionInputbool
ascendingInputbool
thresholdMinInputfloat
thresholdMaxInputfloat
currentIsUsingbool
currentDirectionbool
currentAscendingbool
currentThresholdMinfloat
currentThresholdMaxfloat

Synapse Apps(スクリプティング)

await synapse.modules.create({ type: "pixelsort" })

同じページを参照しているページ