iman_sh
iman_sh

Reputation: 430

How can I use built-in cginc shaders in my Unity3d project?

I want to know how can I use builtin .cginc Shader files in my unity's project ? I just copy this files in my project Assets folder but unity does not recognize them !

does somebody knows how can I use this files ? Thanks

Upvotes: 1

Views: 1398

Answers (1)

Nain
Nain

Reputation: 1222

.cginc files can be used inside the shader they are the include files for the shader. You can use them inside subshader code like this

#include "UnityCG.cginc" 

One use of these file is if you have some common functions that you want to use in different shaders write them in a cginc file and include it in different shaders you do not have to write those functions again and again.

Upvotes: 1

Related Questions