INNER CODE UNIT · C++

pMaterialComponent

meta4d-me/CatDogEngine · Engine/Source/Editor/EditorApp.cpp:399

		engine::MaterialComponent* pMaterialComponent = m_pSceneWorld->GetMaterialComponent(entity);
		if (!pMaterialComponent)
		{
			continue;
		}

		const std::string& programName = pMaterialComponent->GetShaderProgramName();
		const std::string& featuresCombine = pMaterialComponent->GetFeaturesCombine();

		// New shader feature added, need to compile new variants.
		m_pRenderContext->CheckShaderProgram(entity, programName, featuresCombine);

		// Shader source files have been modified, need to re-compile existing variants.
		if (m_crtInputFocus && !m_preInputFocus)
		{
			m_pRenderContext->OnShaderHotModified(entity, programName, featuresCombine);
		}
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…