介紹
在unity shader中經(jīng)常會使用一些#include
,可以看這些文件包含了什么嗎,當(dāng)然可以,具體路徑是在Unity安裝目錄下的\Editor\Data\CGIncludes
文章來源:http://www.zghlxwxcb.cn/news/detail-506473.html
自定一個cginc文件并使用
這里是在\Editor\Data\CGIncludes
目錄下新建一個mycginc
目錄,里面新建一個sbin.cginc
文件,這個文件命名好像還必須是sbin.cginc
或者sbin2.cginc
,shader里面可以按照下面這個路徑引入文章來源地址http://www.zghlxwxcb.cn/news/detail-506473.html
#include "mycginc/sbin.cginc"
到了這里,關(guān)于【Unity Shader】Shader中內(nèi)置文件目錄與自定義的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!