mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
swap over to wireframe, plus a few misc cleanups
This commit is contained in:
parent
b9176d22fa
commit
077325c0ab
2 changed files with 6 additions and 15 deletions
|
|
@ -743,12 +743,6 @@ void ReflectionProbe::prepRenderImage(SceneRenderState *state)
|
||||||
|
|
||||||
// Set the world matrix to the objects render transform
|
// Set the world matrix to the objects render transform
|
||||||
MatrixF mat = getRenderTransform();
|
MatrixF mat = getRenderTransform();
|
||||||
mat.scale(Point3F(1, 1, 1));
|
|
||||||
|
|
||||||
Point3F centerPos = mat.getPosition();
|
|
||||||
centerPos += mProbeRefOffset;
|
|
||||||
mat.setPosition(centerPos);
|
|
||||||
|
|
||||||
GFX->setWorldMatrix(mat);
|
GFX->setWorldMatrix(mat);
|
||||||
|
|
||||||
// Animate the the shape
|
// Animate the the shape
|
||||||
|
|
@ -785,10 +779,9 @@ void ReflectionProbe::_onRenderViz(ObjectRenderInst *ri,
|
||||||
desc.setZReadWrite(true, false);
|
desc.setZReadWrite(true, false);
|
||||||
desc.setCullMode(GFXCullNone);
|
desc.setCullMode(GFXCullNone);
|
||||||
desc.setBlend(true);
|
desc.setBlend(true);
|
||||||
|
desc.fillMode = GFXFillWireframe;
|
||||||
// Base the sphere color on the light color.
|
// Base the sphere color on the light color.
|
||||||
ColorI color = ColorI::WHITE;
|
ColorI color = ColorI(255, 0, 255, 63);
|
||||||
color.alpha = 25;
|
|
||||||
|
|
||||||
const MatrixF worldToObjectXfm = getTransform();
|
const MatrixF worldToObjectXfm = getTransform();
|
||||||
if (mProbeShapeType == ProbeRenderInst::Sphere)
|
if (mProbeShapeType == ProbeRenderInst::Sphere)
|
||||||
|
|
@ -801,11 +794,9 @@ void ReflectionProbe::_onRenderViz(ObjectRenderInst *ri,
|
||||||
projCube.setCenter(getPosition());
|
projCube.setCenter(getPosition());
|
||||||
draw->drawCube(desc, projCube, color, &worldToObjectXfm);
|
draw->drawCube(desc, projCube, color, &worldToObjectXfm);
|
||||||
}
|
}
|
||||||
Box3F refCube = getWorldBox();
|
Box3F refCube = Box3F(-mProbeRefScale/2, mProbeRefScale/2);
|
||||||
refCube.set(mProbeRefScale);
|
refCube.setCenter(getPosition()+mProbeRefOffset);
|
||||||
refCube.setCenter(getPosition() + mProbeRefOffset);
|
color = ColorI(0, 255, 255, 63);
|
||||||
color = ColorI::BLUE;
|
|
||||||
color.alpha = 25;
|
|
||||||
draw->drawCube(desc, refCube, color, &worldToObjectXfm);
|
draw->drawCube(desc, refCube, color, &worldToObjectXfm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -845,7 +845,7 @@ void GFXDrawUtil::_drawWireCube( const GFXStateBlockDesc &desc, const Point3F &s
|
||||||
if ( xfm != NULL )
|
if ( xfm != NULL )
|
||||||
{
|
{
|
||||||
for ( U32 i = 0; i < 30; i++ )
|
for ( U32 i = 0; i < 30; i++ )
|
||||||
xfm->mulP( verts[i].point );
|
xfm->mulV( verts[i].point );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply position offset
|
// Apply position offset
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue