Code: Select all
// colors hard coded for Cusa_1_7OldschoolUsa.dds
// Note how they are listed in the file is NOT the order needed
// to mix them correctly!
// convert to 0.0 to 1.0 by dividing by 255.0
vec4 c2 = vec4(52 , 87 , 95 , 0 )/255.0;
vec4 c0 = vec4(239, 169, 105, 158)/255.0;
vec4 c3 = vec4(138, 21 , 39 , 96)/255.0;
vec4 c1 = vec4(52 , 87 , 95 , 148)/255.0;
// from custimiztion file/ Default UV scale and shift.
//<A31_M36_Slagger>2.8 2.8 1 0.31</A31_M36_Slagger>
vec2 ctc = TC1*2.8*1.125; // also hard coded uv scaling.
ctc.x += 1.0; // from
ctc.y += .031;
//This is the Cusa_1_7OldschoolUsa.dds texture
vec4 camoTexture = texture2D(camoMap, ctc.st );
//Also need the AN or diffuse map and AO map.
vec4 color = texture2D(colorMap, TC1.st);
vec4 AO = texture2D(aoMap, TC1.st);
// mixing the colors to get the correct looking camouflage.
cc = color ;
cc = mix(cc, c0, camoTexture.r * c0.a);
cc = mix(cc, c1, camoTexture.g * c1.a);
cc = mix(cc, c2, camoTexture.b * c2.a);
cc = mix(cc, c3, camoTexture.a * c3.a);
color = mix(color, cc, AO.a); // AO.a is the AO maps alpha channel