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:
AzaezelX 2024-02-10 13:36:55 -06:00
parent 25a3c3325f
commit de87d2f6ad
6 changed files with 24 additions and 0 deletions

View file

@ -378,6 +378,7 @@ public:
/// Invokes a cubemap bake action for this probe
/// </summary>
void bake();
ProbeInfo* getProbeInfo() { return &mProbeInfo; }
};
typedef ReflectionProbe::ProbeInfo::ProbeShapeType ReflectProbeType;

View file

@ -59,6 +59,8 @@ extern bool gEditingMission;
extern ColorI gCanvasClearColor;
bool Skylight::smRenderSkylights = true;
SimObjectPtr<Skylight> Skylight::smSkylightProbe = nullptr;
IMPLEMENT_CO_NETOBJECT_V1(Skylight);
ConsoleDocClass(Skylight,
@ -117,6 +119,8 @@ bool Skylight::onAdd()
if (!Parent::onAdd())
return false;
if (isClientObject())
smSkylightProbe = this;
return true;
}

View file

@ -108,6 +108,7 @@ public:
void prepRenderImage(SceneRenderState *state);
void setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat);
static SimObjectPtr<Skylight> smSkylightProbe;
};
#endif // _Skylight_H_