3 個答案
- 最新
- 最多得票
- 最多評論
0
Try this:
IMaterial* DynamicUITextureComponent::SetupNewMaterial()
{
AZStd::string materialName = "EntMat_" + GetEntityId().ToString();
IMaterialManager* matManager = GetIEditor()->Get3DEngine()->GetMaterialManager();
IMaterial* material{ matManager->CloneMaterial(matManager->GetDefaultMaterial()) };
material->SetName(materialName.c_str());
SInputShaderResources inputShaderResources{ material->GetShaderItem().m_pShaderResources };
inputShaderResources.m_Textures[EFTT_DIFFUSE].m_Name = m_renderTargetName.c_str();
material->AssignShaderItem(gEnv->pRenderer->EF_LoadShaderItem("Illum", true, 0, &inputShaderResources));
return material;
}
已回答 7 年前
此貼文已關閉:已停用新增新答案、評論和投票功能。
相關內容
- 已提問 6 個月前
- 已提問 1 年前
- AWS 官方已更新 7 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前