디퍼드 렌더링 경로에서 셰이더를 사용하려면__ 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 코드의 패스에 UniversalForwardOnly 및 DepthNormalsOnly태그를 추가해야 합니다. 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.
}
}
}