ShaderLab 之 UNITY_INITIALIZE_OUTPUT

  在 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”

上一篇:postgresql压力测试工具用法以及参数解读


下一篇:[转]分布式文件系统FastDFS架构剖析