Version: Unity 6.0 (6000.0)
언어 : 한국어
URP의 디퍼드 렌더링 경로에서 정확한 G-Buffer 노멀 활성화
URP의 포워드+ 렌더링 경로 문제 해결

URP에서 셰이더와 디퍼드 렌더링 경로의 호환성 확보

디퍼드 렌더링 경로에서 셰이더 사용

디퍼드 렌더링 경로에서 셰이더를 사용하려면__ ShaderLab__셰이더 오브젝트의 구조를 정의하기 위한 Unity 언어입니다. 자세한 정보
See in Glossary
코드의 패스에 UniversalGBuffer 태그를 추가해야 합니다. Unity는 G-버퍼 렌더 패스 동안 해당 셰이더를 실행합니다.

예시:

Shader "Examples/ExamplePassFlag"
{
    SubShader
    {
        Pass
        {    
              Tags
              { 
                "RenderPipeline" = "UniversalPipeline"
                "LightMode" = "UniversalGBuffer"
              }
            
              // The rest of the code that defines the Pass goes here.
        }
    }
}

디퍼드 렌더링 경로의 포워드 패스에서 셰이더 사용

디퍼드 렌더링 경로에서 셰이더를 사용하려면 ShaderLab 코드의 패스에 UniversalForwardOnlyDepthNormalsOnly태그를 추가해야 합니다. Unity는 G-버퍼 렌더 패스 동안 해당 셰이더를 실행합니다.

예시:

Shader "Examples/ExamplePassFlag"
{
    SubShader
    {
        Pass
        {    
              Tags { 
                "RenderPipeline" = "UniversalPipeline"
                "LightMode" = "UniversalForwardOnly"
                "LightMode" = "DepthNormalsOnly"
              }
            
              // The rest of the code that defines the Pass goes here.
        }
    }
}

셰이더 조명 모델 지정

셰이더 조명 모델을 릿 또는 심플 릿으로 지정하려면 UniversalMaterialType 태그를 사용해야 합니다. 예시:

Shader "Examples/ExamplePassFlag"
{
    SubShader
    {
        Pass
        {    
              Tags
              { 
                "RenderPipeline" = "UniversalPipeline"
                "LightMode" = "UniversalGBuffer"
                "UniversalMaterialType" = "Lit" 
              }
            
              // The rest of the code that defines the Pass goes here.
        }
    }
}

추가 리소스

URP의 디퍼드 렌더링 경로에서 정확한 G-Buffer 노멀 활성화
URP의 포워드+ 렌더링 경로 문제 해결
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961