TexGen Parameters?

Is there some more documentation of the TexGen options available in the Unity shader language? I figured out the overall mode (eg EyeLinear) but I can’t work out how to specify the actual parameters. I understand the OpenGL level concepts, I just need to know the scripting format.

For the record, I know I could do this with a vertex program… I’m just lazy (in the good way). But if I have to, I will :slight_smile:

The modes are: ObjectLinear, SphereMap, CubeReflect, CubeNormal. These correspond to OpenGL texgen modes directly. Additionally you can specify a Matrix inside SetTexture statement, like:

SetTexture[_MainTex] { combine texture Matrix [_MyMatrix] }

Then the UVs will additionally be transformed with the matrix.

Of course, if you do your own vertex programs then all texgen is up to you.

I’ll add this to the documentation.

Great. So, just to be clear, is EyeLinear one of the options too (GL_EYE_LINEAR)?

Not at the moment. The parser recognizes the EyeLinear keyword, but it does not actually work yet. Will be working in Unity 1.5.1.

No problem at all, I can always use a VP. Thanks for the quick answers!