docs.unity3d.com
    目次を表示する/隠す

    Radial Shear ノード

    説明

    入力 UV の値に、放射状シアーの波のようなワープ (ゆがみ) 効果を適用します。 ワープ効果の中心の基準点は入力 Center で定義され、エフェクトの全体的な強度は入力 Strength で定義されます。入力 Offset を使用して結果の各チャンネルをオフセットできます。

    ポート

    Name Direction タイプ バインディング 説明
    UV 入力 Vector 2 UV 入力 UV 値
    Center 入力 Vector 2 なし 中心の基準点
    Strength 入力 Vector 1 なし 効果の強度
    Offset 入力 Vector 2 なし 個々のチャンネルのオフセット
    Out 出力 Vector 2 なし 出力 UV 値

    生成されるコードの例

    以下のサンプルコードは、このノードの出力の一例を示したものです。

    void Unity_RadialShear_float(float2 UV, float2 Center, float Strength, float2 Offset, out float2 Out)
    {
        float2 delta = UV - Center;
        float delta2 = dot(delta.xy, delta.xy);
        float2 delta_offset = delta2 * Strength;
        Out = UV + float2(delta.y, -delta.x) * delta_offset + Offset;
    }
    
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)