1.7/1.8 scrolling with multiple passes
by Kirk Longendyke · in Torque Game Engine Advanced · 11/17/2008 (6:35 am) · 2 replies
Void ProcessedShaderMaterial::_setTextureTransforms(const U32 pass)
Seems to contain quite a few refferences to U32 i, wich presumably at some point was intended to support multiple passes for different directions/speeds. This has been hardcoded to pass 0, with the resulting error being multi-layer materials breaking horribly on a second scroll pass(miscalculations when it functions at all). Unfortunately, at this point in time, haven't had the time to look into the ancillary functionality thats also been altered arround it to even offer up a quick-hack fix for this one.
reproduction step for this ones simple:
new Material(someMat001)
{
baseTex[0] = "texture1";
bumpTex[0] = "texture1b";
pixelSpecular[0] = true;
specular[0] = "0.3 0.3 0.3 1.0";
specularPower[0] = 12.0;
animFlags[0] = $scroll;
scrollDir[0] = "-1.0 0.0";
scrollSpeed[0] = 0.00125;
//=============== pass 2 ===========
baseTex[1] = "texture2";
bumpTex[1] = "texture2b";
animFlags[1] = $scroll;
scrollDir[1] = "-0.5 0.0";
glow[1] = true;
//pixelSpecular[1] = true;
//specularPower[1] = 8;
translucent[1] = true;
translucentBlendOp[1] = AddAlpha;
translucentZWrite[1] = true;
alphaRef[1] = 20;
};
Seems to contain quite a few refferences to U32 i, wich presumably at some point was intended to support multiple passes for different directions/speeds. This has been hardcoded to pass 0, with the resulting error being multi-layer materials breaking horribly on a second scroll pass(miscalculations when it functions at all). Unfortunately, at this point in time, haven't had the time to look into the ancillary functionality thats also been altered arround it to even offer up a quick-hack fix for this one.
reproduction step for this ones simple:
new Material(someMat001)
{
baseTex[0] = "texture1";
bumpTex[0] = "texture1b";
pixelSpecular[0] = true;
specular[0] = "0.3 0.3 0.3 1.0";
specularPower[0] = 12.0;
animFlags[0] = $scroll;
scrollDir[0] = "-1.0 0.0";
scrollSpeed[0] = 0.00125;
//=============== pass 2 ===========
baseTex[1] = "texture2";
bumpTex[1] = "texture2b";
animFlags[1] = $scroll;
scrollDir[1] = "-0.5 0.0";
glow[1] = true;
//pixelSpecular[1] = true;
//specularPower[1] = 8;
translucent[1] = true;
translucentBlendOp[1] = AddAlpha;
translucentZWrite[1] = true;
alphaRef[1] = 20;
};
#2
11/17/2008 (12:59 pm)
There was definatly a post about this a year or so ago, and I used the 'fix' and it worked for at least two passes. I thought it was posted by the same OP as this thread, but obviously not.
Associate Tom Spilman
Sickhead Games
If anyone else fixes it first post the code and i'll merge it into TGEA 1.8 head for the next beta/release.