Skip to content

Commit

Permalink
fix uv offset/scale mistake (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
T-rvw authored Feb 28, 2024
1 parent c6b7231 commit 25b8341
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Engine/Source/Runtime/ECWorld/MaterialComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}
4 changes: 1 addition & 3 deletions Engine/Source/Runtime/Rendering/WorldRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ void WorldRenderer::Render(float deltaTime)
continue;
}

BlendShapeComponent* pBlendShapeComponent = m_pCurrentSceneWorld->GetBlendShapeComponent(entity);

// SkinMesh
if(m_pCurrentSceneWorld->GetAnimationComponent(entity))
{
Expand Down Expand Up @@ -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() });
Expand Down

0 comments on commit 25b8341

Please sign in to comment.