ALIEN_JL Posted June 26, 2002 Share Posted June 26, 2002 Do you know why in JK2 saber trail is usually that type 1 ?? And if you do then do you know how to change it to that type 2 ?? Link to comment Share on other sites More sharing options...
Tchouky Posted June 26, 2002 Share Posted June 26, 2002 here is the trail code . I didn't really understand how it did work. It's in the cg_addsaber function in the cgame . Good luck ! { float oldAlpha = 1.0f - ( diff / SABER_TRAIL_TIME ); // New muzzle VectorCopy( rgb1, fx.mVerts[0].rgb ); fx.mVerts[0].alpha = 255.0f; fx.mVerts[0].ST[0] = 0.0f; fx.mVerts[0].ST[1] = 1.0f; fx.mVerts[0].destST[0] = 1.0f; fx.mVerts[0].destST[1] = 1.0f; // new tip VectorCopy( rgb1, fx.mVerts[1].rgb ); fx.mVerts[1].alpha = 255.0f; fx.mVerts[1].ST[0] = 0.0f; fx.mVerts[1].ST[1] = 0.0f; fx.mVerts[1].destST[0] = 1.0f; fx.mVerts[1].destST[1] = 0.0f; // old tip VectorCopy( rgb1, fx.mVerts[2].rgb ); fx.mVerts[2].alpha = 255.0f; fx.mVerts[2].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want fx.mVerts[2].ST[1] = 0.0f; fx.mVerts[2].destST[0] = 1.0f + fx.mVerts[2].ST[0]; fx.mVerts[2].destST[1] = 0.0f; // old muzzle VectorCopy( rgb1, fx.mVerts[3].rgb ); fx.mVerts[3].alpha = 255.0f; fx.mVerts[3].ST[0] = 1.0f - oldAlpha; // NOTE: this just happens to contain the value I want fx.mVerts[3].ST[1] = 1.0f; fx.mVerts[3].destST[0] = 1.0f + fx.mVerts[2].ST[0]; fx.mVerts[3].destST[1] = 1.0f; fx.mShader = cgs.media.saberBlurShader; fx.mSetFlags = FX_USE_ALPHA; fx.mKillTime = SABER_TRAIL_TIME; trap_FX_AddPrimitive(&fx); } Link to comment Share on other sites More sharing options...
ALIEN_JL Posted June 28, 2002 Author Share Posted June 28, 2002 It starts with this: Go from new muzzle to new end...then to old end...back down to old muzzle...finally connect back to the new muzzle...this is our trail quad And if i understand right that means that saber trail is always quadrangle... But that screenshot of mine prove otherwise:mad: Does anyone have any idea how this works... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.