标签:style blog ar color sp 文件 div log bs
在 HLSLSupport.cginc 文件中定义了此宏:
#if defined(UNITY_COMPILER_HLSL) #define UNITY_INITIALIZE_OUTPUT(type,name) name = (type)0; #else #define UNITY_INITIALIZE_OUTPUT(type,name) #endif
只有在HLSL编译器编译时,它才工作,初始化name参数,否则编译器可能会报如下错误:
“Shader error in ‘Jie/Test‘: ‘vert‘: output parameter ‘o‘ not completely initialized at line 37”
ShaderLab 之 UNITY_INITIALIZE_OUTPUT
标签:style blog ar color sp 文件 div log bs
原文地址:http://www.cnblogs.com/jietian331/p/4118677.html