Built-in shader include files //内置的材质包含文件
来源:互联网 发布:软件项目验收表 编辑:程序博客网 时间:2024/05/18 11:48
Built-in shader include files 内置的材质包含文件
Unity contains several files that can be used by your shader programs to bring in predefined variables and helper functions. This is done by the standard #include
directive, e.g.:
Unity包含几个文件,这些文件可以被你的着色程序用来引入预先定义的变量和帮助函数。这是由标准的include指令完成的,例如:
CGPROGRAM// ...#include "UnityCG.cginc"// ...ENDCG
Shader include files in Unity are with .cginc
extension, and the built-in ones are:
Shader包括了unity的文件。cginc的扩展,内置的是:
HLSLSupport.cginc
- (automatically included) Helper macros and definitions for cross-platform shader compilation.- (自动包含)帮助器宏和跨平台着色编译的定义。
UnityShaderVariables.cginc
- (automatically included) Commonly used global variables.- (自动包含)常用的全局变量。
UnityCG.cginc
- commonly used helper functions.- 常用的辅助函数。
AutoLight.cginc
- lighting & shadowing functionality, e.g. surface shaders use this file internally.- 照明和阴影功能,如表面着色器在内部使用这个文件。
Lighting.cginc
- standard surface shader lighting models; automatically included when you’re writing surface shaders.TerrainEngine.cginc
- helper functions for Terrain & Vegetation shaders.- 标准的表面着色照明模型;当你书写表面着色时,自动包括。 TerrainEngine。cginc-辅助功能,用于地形和植被的着色。
These files are found inside Unity application ({unity install path}/Data/CGIncludes/UnityCG.cginc on Windows,/Applications/Unity/Unity.app/Contents/CGIncludes/UnityCG.cginc on Mac), if you want to take a look at what exactly is done in any of the helper code.
这些文件在里面统一应用程序({统一安装路径} /数据/ CGIncludes / UnityCG。cginc在Windows上,/应用程序/ / Unity.app /内容/ CGIncludes / UnityCG统一。在Mac上的cginc),如果你想看看在任何辅助代码中都做了什么。
HLSLSupport.cginc
This file is automatically included when compiling CGPROGRAM shaders (but not included for HLSLPROGRAM ones). It declares various preprocessor macros to aid in multi-platform shader development.
在编译CGPROGRAM着色器时,这个文件会自动被包含(但是对于HLSLPROGRAM的文件不包括在内)。它声明了各种预处理器宏来支持多平台的着色开发。
UnityShaderVariables.cginc
This file is automatically included when compiling CGPROGRAM shaders (but not included for HLSLPROGRAM ones). It declares various built-in global variables that are commonly used in shaders.
在编译CGPROGRAM着色器时,这个文件会自动被包含(但是对于HLSLPROGRAM的文件不包括在内)。它声明了在着色器中常用的各种内置全局变量。
UnityCG.cginc
This file is often included in Unity shaders. It declares many built-in helper functions and data structures.
这个文件通常包含在统一着色。它宣布许多内置的辅助函数和数据结构。
Data structures in UnityCG.cginc 数据结构在UnityCG.cginc
- struct
appdata_base
: vertex shader input with position, normal, one texture coordinate. - struct
appdata_tan
: vertex shader input with position, normal, tangent, one texture coordinate. - struct
appdata_full
: vertex shader input with position, normal, tangent, vertex color and two texture coordinates. - struct
appdata_img
: vertex shader input with position and one texture coordinate.
- Built-in shader include files //内置的材质包含文件
- 内置的材质包含文件 .cginc
- Built-in shader variables //内置的着色器变量
- Built-in shader variables 内置的着色器变量
- Unity3D Built-in Shader,unity3d内置shader详解1
- Unity Shader 内置变量(Built-in shader variables)
- Built-in shader helper functions //内置的着色器辅助函数
- Built-in shader variables
- Built-in shader variables
- 为bash添加内置命令(built-in)的方法
- nginx built-in variables (nginx 内置的变量)
- Unity3D Built-in Shader详解一
- Unity Built-in Shader详解二
- Unity Built-in Shader详解三
- Unity3D Built-in Shader详解一
- Unity3D Built-in Shader详解一
- unity3d设置材质的shader
- Include EPS files in LaTeX
- 20170705
- 容易_53_翻转字符串(2)
- 前台js数组json字符串,后台json字符串转为json数组,最后转换成集合的具体实现
- 微信公众平台 接口返回码45047 说明
- 一根线通讯芯片介绍
- Built-in shader include files //内置的材质包含文件
- href和src的区别
- pyfolio的information_ratio无法使用的问题
- 部分A+B(B1016)
- Web15
- 在ABAQUS中使用修正DPC帽盖模型
- GIT 入门使用
- must be of typexxx解决方法
- 剑指offer——从尾到头打印链表