mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
fix guishapeedpreview not displaying IBL
note this *does* require a baked skylight in the main scene todo: track down why a similar protocol does not operate for guimaterialpreview and guiobjectview
This commit is contained in:
parent
25a3c3325f
commit
de87d2f6ad
6 changed files with 24 additions and 0 deletions
|
|
@ -31,6 +31,8 @@
|
|||
#include "math/mathTypes.h"
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "renderInstance/renderProbeMgr.h"
|
||||
#include "T3D/lighting/skylight.h"
|
||||
|
||||
IMPLEMENT_CONOBJECT( GuiObjectView );
|
||||
|
||||
|
|
@ -541,6 +543,12 @@ void GuiObjectView::renderWorld( const RectI& updateRect )
|
|||
|
||||
// Render primary model.
|
||||
|
||||
if (Skylight::smSkylightProbe.isValid())
|
||||
PROBEMGR->submitProbe(Skylight::smSkylightProbe->getProbeInfo());
|
||||
|
||||
FogData savedFogData = gClientSceneGraph->getFogData();
|
||||
gClientSceneGraph->setFogData(FogData()); // no fog in preview window
|
||||
|
||||
if(mModelInstance)
|
||||
{
|
||||
if( mRunThread )
|
||||
|
|
@ -567,6 +575,7 @@ void GuiObjectView::renderWorld( const RectI& updateRect )
|
|||
|
||||
renderPass->renderPass( &state );
|
||||
|
||||
gClientSceneGraph->setFogData(savedFogData); // restore fog setting
|
||||
// Make sure to remove our fake sun.
|
||||
LIGHTMGR->unregisterAllLights();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue