diff --git a/Engine/Source/Runtime/ECWorld/MaterialComponent.cpp b/Engine/Source/Runtime/ECWorld/MaterialComponent.cpp index 675108d7..f8bba0f4 100644 --- a/Engine/Source/Runtime/ECWorld/MaterialComponent.cpp +++ b/Engine/Source/Runtime/ECWorld/MaterialComponent.cpp @@ -147,8 +147,8 @@ void MaterialComponent::SetTextureResource(cd::MaterialTextureType textureType, TextureInfo& textureInfo = propertyGroup.textureInfo; textureInfo.slot = optTextureSlot.value(); textureInfo.pTextureResource = pTextureResource; - textureInfo.uvScale = uvOffset; - textureInfo.uvOffset = uvScale; + textureInfo.uvScale = uvScale; + textureInfo.uvOffset = uvOffset; } } diff --git a/Engine/Source/Runtime/Rendering/WorldRenderer.cpp b/Engine/Source/Runtime/Rendering/WorldRenderer.cpp index f340ebc5..11d35d6a 100644 --- a/Engine/Source/Runtime/Rendering/WorldRenderer.cpp +++ b/Engine/Source/Runtime/Rendering/WorldRenderer.cpp @@ -200,8 +200,6 @@ void WorldRenderer::Render(float deltaTime) continue; } - BlendShapeComponent* pBlendShapeComponent = m_pCurrentSceneWorld->GetBlendShapeComponent(entity); - // SkinMesh if(m_pCurrentSceneWorld->GetAnimationComponent(entity)) { @@ -388,7 +386,7 @@ void WorldRenderer::Render(float deltaTime) bgfx::setState(state); // Mesh - if (pBlendShapeComponent) + if (BlendShapeComponent* pBlendShapeComponent = m_pCurrentSceneWorld->GetBlendShapeComponent(entity)) { bgfx::setVertexBuffer(0, bgfx::DynamicVertexBufferHandle{ pBlendShapeComponent->GetFinalMorphAffectedVB() }); bgfx::setVertexBuffer(1, bgfx::VertexBufferHandle{ pBlendShapeComponent->GetNonMorphAffectedVB() });