{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Gradient Noise 노드 | Shader Graph | 10.8.0
docs.unity3d.com
"{0}"의 검색 결과

    목차 표시/숨기기

    Gradient Noise 노드

    설명

    UV 입력을 기반으로 그레디언트 또는 Perlin 노이즈를 생성합니다. 생성된 노이즈의 스케일은 Scale 입력에서 제어됩니다.

    포트

    이름 방향 Type 바인딩 설명
    UV 입력 벡터 2 UV 입력 UV 값
    Scale 입력 플로트 None 노이즈 스케일
    Out 출력 플로트 None 출력 값

    생성된 코드 예제

    다음 예제 코드는 이 노드의 가능한 결과 중 하나입니다.

    float2 unity_gradientNoise_dir(float2 p)
    {
        p = p % 289;
        float x = (34 * p.x + 1) * p.x % 289 + p.y;
        x = (34 * x + 1) * x % 289;
        x = frac(x / 41) * 2 - 1;
        return normalize(float2(x - floor(x + 0.5), abs(x) - 0.5));
    }
    
    float unity_gradientNoise(float2 p)
    {
        float2 ip = floor(p);
        float2 fp = frac(p);
        float d00 = dot(unity_gradientNoise_dir(ip), fp);
        float d01 = dot(unity_gradientNoise_dir(ip + float2(0, 1)), fp - float2(0, 1));
        float d10 = dot(unity_gradientNoise_dir(ip + float2(1, 0)), fp - float2(1, 0));
        float d11 = dot(unity_gradientNoise_dir(ip + float2(1, 1)), fp - float2(1, 1));
        fp = fp * fp * fp * (fp * (fp * 6 - 15) + 10);
        return lerp(lerp(d00, d01, fp.y), lerp(d10, d11, fp.y), fp.x);
    }
    
    void Unity_GradientNoise_float(float2 UV, float Scale, out float Out)
    {
        Out = unity_gradientNoise(UV * Scale) + 0.5;
    }
    
    문서 개요
    맨 위로
    Copyright © 2023 Unity Technologies — 상표 및 이용약관
    • 법률정보
    • 개인정보처리방침
    • 쿠키
    • 내 개인정보 판매 금지
    • Your Privacy Choices (Cookie Settings)