This stuff is kinda confusing too me.
This is from the shaderlab.com manual:
q3map_tcGen
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 ) will project the texture every 256 units in x, and every 256 units in y, along the z-axis. Ivector means inverse vector, and this means you don't have to do the divide with windows calc. :)
ivector ( 256 0 0 ) ( 0 256 0 ) == vector ( 1/256 0 0 ) ( 0 1/256 0 )
inverse = 1.0 / n, unless the value is 0. If the value is 0, then the matrix value is set to 0. A bit of dodgy math, but it works.
The wolf_et template in EasyGen adds this line to the terrain shader:
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
This line should repeat the texture every 512 units. But somewhere along the line it gets screwed. Ydnar states that u shouldnt use tcmod scale as is slows performance, but i havent found any other way around the scaling problem.
I always have to use “tcmod scale 0.250 0.250” to get the proper texture size.
They way i figured this is:
Default scale of texture: 0.5
Default Terrain Scale: 0.5
Ending up with: 0.5*0.5=0.25
So getting a 0.25 scaling makes it very repeating.
So after reading a bit more on this i understood that the tcgen doesnt only set the repeat factor its also a scaling factor.
Or am i totally wrong here? As i said…very confusing stuff!