UINT PixelShaderDynamic::AddInterfaceByName(LPCSTR szAbstractObjectName, UINT unArrayIndex)
{
	if(m_pReflector)
	{
		ID3D11ShaderReflectionVariable* pVariable = m_pReflector->GetVariableByName(szAbstractObjectName);

		if(!pVariable)
		{
			MessageBox(NULL, L"Failed To Add Interface to Dynamic Linkage Array (Pixel Shader)" , L"", MB_OK | MB_ICONERROR);
			return UINT_MAX;
		}

		UINT unSlotIndex = pVariable->GetInterfaceSlot(unArrayIndex);

		if((size_t)unSlotIndex < m_vInterfaceNames.size())
		{
			m_vInterfaceNames[unSlotIndex] = szAbstractObjectName;
			return unSlotIndex;
		}
	}

	return UINT_MAX;
}