Version: Unity 6.0 (6000.0)
언어 : 한국어
HLSL 셰이더 프로그램 추가
버텍스 데이터를 셰이더에 입력

여러 프로그램에서 HLSL 복제

HLSLINCLUDE 지시문을 사용하여 다른 HLSLPROGRAM 섹션에 HLSL 코드를 추가할 수 있습니다.

예제

Shader "Examples/ExampleShader"
{
    SubShader
    {

        HLSLINCLUDE
            // HLSL code that you want to share goes here
        ENDHLSL

        Pass
        {                
              Name "ExampleFirstPassName"
              Tags { "LightMode" = "ExampleLightModeTagValue" }

              // ShaderLab commands to set the render state go here

              HLSLPROGRAM
                // This HLSL shader program automatically includes the contents of the HLSLINCLUDE block above
                // HLSL shader code goes here
              ENDHLSL
        }

        Pass
        {                
              Name "ExampleSecondPassName"
              Tags { "LightMode" = "ExampleLightModeTagValue" }

              // ShaderLab commands to set the render state go here

              HLSLPROGRAM
                // This HLSL shader program automatically includes the contents of the HLSLINCLUDE block above
                // HLSL shader code goes here
              ENDHLSL
        }

    }
}

추가 리소스

HLSL 셰이더 프로그램 추가
버텍스 데이터를 셰이더에 입력
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961