How do you calculate these coordinates actually?
I have been surfing through wiki, wikipedia and openGL tutorials, but I'm not finding much sense out of it all.
DLing rendermonkey, maybe that will do it for me.
I guess decals would only be practical for vehicles that all use the same texture/model and are expected to have decals? Racers, police etc.
As each different model would need to have a different decal-shader...in order to apply the effect on the right place on the model... ?
Just coming to grips with the texcoord calculus now.
I can see how you could use the method you used in the animation-example to apply a given frame on a model.
Not sure how exactly tex1 is mapped on tex0 (which is AFAIK the model-base-texture.) I'll figure it out...someday.
// Load texture data
vec2 texCoord = gl_TexCoord.st;
vec4 colorMap = texture2D(tex0, texCoord);
vec4 glowMapFullOn = texture2D(tex1, texCoord);
vec4 effectsMap = texture2D(tex2, texCoord);
gl_TexCoord is the coords for texture 0. (I assume it creates a 2D matrix from the dimensions of the texture's pixels?)
so these lines define that the other textures use the coord-system of tex0.
Fine as long as the textures are of the same proportions. (else you need to offset the coord system as examplified in the animation-example)
em. rambling along...nothing to see here.