Minor improvements
This commit is contained in:
@@ -491,6 +491,13 @@ void GPUContextVulkan::BeginRenderPass()
|
||||
else
|
||||
{
|
||||
handle = _rtHandles[0];
|
||||
#if !BUILD_RELEASE
|
||||
if (!handle)
|
||||
{
|
||||
LOG(Error, "BeginRenderPass called with no render targets bound");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
layout.ReadDepth = false;
|
||||
layout.WriteDepth = false;
|
||||
}
|
||||
|
||||
@@ -48,8 +48,15 @@ void BoneSocket::UpdateTransformation()
|
||||
Transform t;
|
||||
if (nodes.IsValidIndex(_index))
|
||||
nodes.Get()[_index].Decompose(t);
|
||||
else
|
||||
else if (parent->SkinnedModel->Skeleton.Nodes.IsValidIndex(_index))
|
||||
t = parent->SkinnedModel->Skeleton.GetNodeTransform(_index);
|
||||
else
|
||||
{
|
||||
// Retry when cached index become invalid (eg. model reimport)
|
||||
_index = -1;
|
||||
UpdateTransformation();
|
||||
return;
|
||||
}
|
||||
if (!_useScale)
|
||||
t.Scale = _localTransform.Scale;
|
||||
SetLocalTransform(t);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "Editor/Editor.h"
|
||||
#endif
|
||||
|
||||
void LightmapEntry::Serialize(ISerializable::SerializeStream& stream)
|
||||
void LightmapEntry::Serialize(ISerializable::SerializeStream& stream) const
|
||||
{
|
||||
stream.JKEY("LightmapIndex");
|
||||
stream.Int(TextureIndex);
|
||||
|
||||
@@ -61,14 +61,14 @@ Actor* Prefab::GetDefaultInstance()
|
||||
// Skip if not loaded
|
||||
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;
|
||||
}
|
||||
|
||||
// Prevent recursive calls
|
||||
if (_isCreatingDefaultInstance)
|
||||
{
|
||||
LOG(Warning, "Loop call to Prefab::GetDefaultInstance.");
|
||||
LOG(Warning, "Loop call to Prefab::GetDefaultInstance for '{}'", GetPath());
|
||||
return nullptr;
|
||||
}
|
||||
_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)
|
||||
{
|
||||
if (!emitter->IsUsingLights || _graph._attrPosition == -1)
|
||||
if (!emitter->IsUsingLights ||
|
||||
_graph._attrPosition == -1 ||
|
||||
data.Version != _graph.Version)
|
||||
return;
|
||||
|
||||
// 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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user