mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Oriented Particles UV Correction
With Permission from Jeff Faust. // AFX CODE BLOCK (bug-fix) << // this fix re-orders the UV coords to produce a consistent orientation // with oriented particles in TGE.
This commit is contained in:
parent
84430a46a8
commit
8c979a6d7b
|
|
@ -1825,22 +1825,22 @@ void ParticleEmitter::setupOriented( Particle *part,
|
|||
lVerts->point = start + crossDir;
|
||||
lVerts->color = partCol;
|
||||
// Here and below, we copy UVs from particle datablock's texCoords (oriented)
|
||||
lVerts->texCoord = part->dataBlock->texCoords[0];
|
||||
lVerts->texCoord = part->dataBlock->texCoords[1];
|
||||
++lVerts;
|
||||
|
||||
lVerts->point = start - crossDir;
|
||||
lVerts->color = partCol;
|
||||
lVerts->texCoord = part->dataBlock->texCoords[1];
|
||||
lVerts->texCoord = part->dataBlock->texCoords[2];
|
||||
++lVerts;
|
||||
|
||||
lVerts->point = end - crossDir;
|
||||
lVerts->color = partCol;
|
||||
lVerts->texCoord = part->dataBlock->texCoords[2];
|
||||
lVerts->texCoord = part->dataBlock->texCoords[3];
|
||||
++lVerts;
|
||||
|
||||
lVerts->point = end + crossDir;
|
||||
lVerts->color = partCol;
|
||||
lVerts->texCoord = part->dataBlock->texCoords[3];
|
||||
lVerts->texCoord = part->dataBlock->texCoords[0];
|
||||
++lVerts;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue