Minor improvements
This commit is contained in:
@@ -491,6 +491,13 @@ void GPUContextVulkan::BeginRenderPass()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
handle = _rtHandles[0];
|
handle = _rtHandles[0];
|
||||||
|
#if !BUILD_RELEASE
|
||||||
|
if (!handle)
|
||||||
|
{
|
||||||
|
LOG(Error, "BeginRenderPass called with no render targets bound");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
layout.ReadDepth = false;
|
layout.ReadDepth = false;
|
||||||
layout.WriteDepth = false;
|
layout.WriteDepth = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,15 @@ void BoneSocket::UpdateTransformation()
|
|||||||
Transform t;
|
Transform t;
|
||||||
if (nodes.IsValidIndex(_index))
|
if (nodes.IsValidIndex(_index))
|
||||||
nodes.Get()[_index].Decompose(t);
|
nodes.Get()[_index].Decompose(t);
|
||||||
else
|
else if (parent->SkinnedModel->Skeleton.Nodes.IsValidIndex(_index))
|
||||||
t = parent->SkinnedModel->Skeleton.GetNodeTransform(_index);
|
t = parent->SkinnedModel->Skeleton.GetNodeTransform(_index);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Retry when cached index become invalid (eg. model reimport)
|
||||||
|
_index = -1;
|
||||||
|
UpdateTransformation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!_useScale)
|
if (!_useScale)
|
||||||
t.Scale = _localTransform.Scale;
|
t.Scale = _localTransform.Scale;
|
||||||
SetLocalTransform(t);
|
SetLocalTransform(t);
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include "Editor/Editor.h"
|
#include "Editor/Editor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void LightmapEntry::Serialize(ISerializable::SerializeStream& stream)
|
void LightmapEntry::Serialize(ISerializable::SerializeStream& stream) const
|
||||||
{
|
{
|
||||||
stream.JKEY("LightmapIndex");
|
stream.JKEY("LightmapIndex");
|
||||||
stream.Int(TextureIndex);
|
stream.Int(TextureIndex);
|
||||||
|
|||||||
@@ -61,14 +61,14 @@ Actor* Prefab::GetDefaultInstance()
|
|||||||
// Skip if not loaded
|
// Skip if not loaded
|
||||||
if (!IsLoaded())
|
if (!IsLoaded())
|
||||||
{
|
{
|
||||||
LOG(Warning, "Cannot instantiate object from not loaded prefab asset.");
|
LOG(Warning, "Cannot instantiate object from not loaded prefab asset '{}'", GetPath());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent recursive calls
|
// Prevent recursive calls
|
||||||
if (_isCreatingDefaultInstance)
|
if (_isCreatingDefaultInstance)
|
||||||
{
|
{
|
||||||
LOG(Warning, "Loop call to Prefab::GetDefaultInstance.");
|
LOG(Warning, "Loop call to Prefab::GetDefaultInstance for '{}'", GetPath());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
_isCreatingDefaultInstance = true;
|
_isCreatingDefaultInstance = true;
|
||||||
|
|||||||
@@ -370,7 +370,9 @@ bool ParticleEmitterGraphCPUExecutor::ComputeBounds(ParticleEmitter* emitter, Pa
|
|||||||
|
|
||||||
void ParticleEmitterGraphCPUExecutor::Draw(ParticleEmitter* emitter, ParticleEffect* effect, ParticleEmitterInstance& data, RenderContext& renderContext, Matrix& transform)
|
void ParticleEmitterGraphCPUExecutor::Draw(ParticleEmitter* emitter, ParticleEffect* effect, ParticleEmitterInstance& data, RenderContext& renderContext, Matrix& transform)
|
||||||
{
|
{
|
||||||
if (!emitter->IsUsingLights || _graph._attrPosition == -1)
|
if (!emitter->IsUsingLights ||
|
||||||
|
_graph._attrPosition == -1 ||
|
||||||
|
data.Version != _graph.Version)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Prepare particles buffer access
|
// Prepare particles buffer access
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ struct LightmapEntry
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void Serialize(ISerializable::SerializeStream& stream);
|
void Serialize(ISerializable::SerializeStream& stream) const;
|
||||||
void Deserialize(ISerializable::DeserializeStream& stream);
|
void Deserialize(ISerializable::DeserializeStream& stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user