Graphics: Add new functions to get default material types/presets

This commit is contained in:
SirLynix
2023-08-08 18:17:58 +02:00
parent 32f8141bd8
commit cf6fdf258f
20 changed files with 111 additions and 117 deletions

View File

@@ -132,7 +132,7 @@ namespace Nz
auto CreateMaterialFromTexture = [&](std::shared_ptr<Texture> texture)
{
std::shared_ptr<MaterialInstance> material = defaultBasicMaterial.basicMaterial->Instantiate();
std::shared_ptr<MaterialInstance> material = MaterialInstance::Instantiate(MaterialType::Basic);
material->DisablePass(depthPassIndex);
material->UpdatePassStates(forwardPassIndex, [](RenderStates& renderStates)
{