From 077325c0ab01f3cdabc612035017556266efcf25 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Tue, 19 Feb 2019 13:58:29 -0600 Subject: [PATCH] swap over to wireframe, plus a few misc cleanups --- .../source/T3D/lighting/reflectionProbe.cpp | 19 +++++-------------- Engine/source/gfx/gfxDrawUtil.cpp | 2 +- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Engine/source/T3D/lighting/reflectionProbe.cpp b/Engine/source/T3D/lighting/reflectionProbe.cpp index a0b940f7b..82c6a6ca4 100644 --- a/Engine/source/T3D/lighting/reflectionProbe.cpp +++ b/Engine/source/T3D/lighting/reflectionProbe.cpp @@ -743,12 +743,6 @@ void ReflectionProbe::prepRenderImage(SceneRenderState *state) // Set the world matrix to the objects render transform MatrixF mat = getRenderTransform(); - mat.scale(Point3F(1, 1, 1)); - - Point3F centerPos = mat.getPosition(); - centerPos += mProbeRefOffset; - mat.setPosition(centerPos); - GFX->setWorldMatrix(mat); // Animate the the shape @@ -785,10 +779,9 @@ void ReflectionProbe::_onRenderViz(ObjectRenderInst *ri, desc.setZReadWrite(true, false); desc.setCullMode(GFXCullNone); desc.setBlend(true); - + desc.fillMode = GFXFillWireframe; // Base the sphere color on the light color. - ColorI color = ColorI::WHITE; - color.alpha = 25; + ColorI color = ColorI(255, 0, 255, 63); const MatrixF worldToObjectXfm = getTransform(); if (mProbeShapeType == ProbeRenderInst::Sphere) @@ -801,11 +794,9 @@ void ReflectionProbe::_onRenderViz(ObjectRenderInst *ri, projCube.setCenter(getPosition()); draw->drawCube(desc, projCube, color, &worldToObjectXfm); } - Box3F refCube = getWorldBox(); - refCube.set(mProbeRefScale); - refCube.setCenter(getPosition() + mProbeRefOffset); - color = ColorI::BLUE; - color.alpha = 25; + Box3F refCube = Box3F(-mProbeRefScale/2, mProbeRefScale/2); + refCube.setCenter(getPosition()+mProbeRefOffset); + color = ColorI(0, 255, 255, 63); draw->drawCube(desc, refCube, color, &worldToObjectXfm); } diff --git a/Engine/source/gfx/gfxDrawUtil.cpp b/Engine/source/gfx/gfxDrawUtil.cpp index 9796e30fa..688de6bcf 100644 --- a/Engine/source/gfx/gfxDrawUtil.cpp +++ b/Engine/source/gfx/gfxDrawUtil.cpp @@ -845,7 +845,7 @@ void GFXDrawUtil::_drawWireCube( const GFXStateBlockDesc &desc, const Point3F &s if ( xfm != NULL ) { for ( U32 i = 0; i < 30; i++ ) - xfm->mulP( verts[i].point ); + xfm->mulV( verts[i].point ); } // Apply position offset